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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 17 14:25:25 PST 2010


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

           Summary: [MC assembler] incorrect reloc type for push of a
                    label argument (on i386)
           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


This is a similar issue as bug 8798.  In some FreeBSD kernel assembly
code for i386, there is this fragment:

    pushl    $foo
foo:

Assembling this with gas produces an R_386_32 relocation for pushl's
operand:

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000001 R_386_32          .text

while the disassembly looks like this:

00000000 <foo>:
   0:   68 00 00 00 00          push   $0x0

Clang's integrated assembler (I tested r122085) gives an R_386_8
relocation instead:

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000001 R_386_8           .text

Also, the disassembly shows an 8-byte operand to push:

00000000 <foo>:
   0:   6a 00                   push   $0x0

At link time, this leads to a "relocation truncated to fit: R_386_8
.text" error.  A difference with bug 8798 is that now the produced
opcodes are also changed.

-- 
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