[llvm-bugs] [Bug 27939] New: R_X86_64_GOTPCRELX reocations are not produced properly

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 30 06:45:42 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27939

            Bug ID: 27939
           Summary: R_X86_64_GOTPCRELX reocations are not produced
                    properly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: grimar at accesssoftek.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16438
  --> https://llvm.org/bugs/attachment.cgi?id=16438&action=edit
testcase

Using attached testcase and following commandline, there is no
R_X86_64_GOTPCRELX relocations produced my llvm-mc:

llvm-mc -relax-relocations -filetype=obj -triple=x86_64-pc-linux test.s -o
test.o
llvm-readobj -r test.o

LoadName: 
Relocations [
  Section (3) .rela.text {
    0x2 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x8 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0xE R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x14 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x1A R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x20 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x26 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x2D R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x34 R_X86_64_GOTPCREL bar 0xFFFFFFFFFFFFFFFC
    0x3B R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x42 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x49 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x50 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x57 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x5E R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x65 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x6C R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x73 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x79 R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x7F R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x85 R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x8B R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x91 R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x97 R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0x9D R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0xA4 R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0xAB R_X86_64_GOTPCREL foo 0xFFFFFFFFFFFFFFFC
    0xB2 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xB9 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xC0 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xC7 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xCE R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xD5 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xDC R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xE3 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xEA R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
  }
]


While gas produces them:
as --64 -mrelax-relocations=yes test.s -o test.o

LoadName: 
Relocations [
  Section (2) .rela.text {
    0x2 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x8 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0xE R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x14 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x1A R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x20 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x26 R_X86_64_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x2D R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x34 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x3B R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x42 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x49 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x50 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x57 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x5E R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x65 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x6C R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x73 R_X86_64_REX_GOTPCRELX bar 0xFFFFFFFFFFFFFFFC
    0x79 R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x7F R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x85 R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x8B R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x91 R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x97 R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0x9D R_X86_64_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xA4 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xAB R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xB2 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xB9 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xC0 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xC7 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xCE R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xD5 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xDC R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xE3 R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
    0xEA R_X86_64_REX_GOTPCRELX foo 0xFFFFFFFFFFFFFFFC
  }
]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160530/0bfb9555/attachment.html>


More information about the llvm-bugs mailing list