[LLVMbugs] [Bug 8798] New: [MC assembler] incorrect reloc type for push of a label argument (on x86_64)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 16 13:48:40 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8798

           Summary: [MC assembler] incorrect reloc type for push of a
                    label argument (on x86_64)
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dimitry at andric.com
                CC: llvmbugs at cs.uiuc.edu


In the FreeBSD kernel tree, there is an assembler fragment for use on
x86_64, that approximately looks like this:

    pushq    $foo
foo:

Assembling this with gas produces an R_X86_64_32S relocation for pushq's
operand:

Relocation section '.rela.text' at offset 0x300 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000000001  00010000000b R_X86_64_32S      0000000000000000 .text + 5

However, clang's integrated assembler (I tested r121705) gives an
R_X86_64_32 relocation instead:

Relocation section '.rela.text' at offset 0x100 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000000001  00020000000a R_X86_64_32       0000000000000000 .text + 5

Apparently this type is incorrect, as it leads to a "relocation
truncated to fit: R_X86_64_32 .text" error later during linking.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list