bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13082] New: Invalid R_X86_64_64 relocation for x32


From: hjl.tools at gmail dot com
Subject: [Bug ld/13082] New: Invalid R_X86_64_64 relocation for x32
Date: Fri, 12 Aug 2011 04:22:31 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13082

             Bug #: 13082
           Summary: Invalid R_X86_64_64 relocation for x32
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


address@hidden pr-y]$ cat x.s
    .text
    .globl main
main:
    lea    .Ljmp(%rip), %rax
    jmp    *(%rax)
    .section    .data.rel.ro.local,"aw",@progbits
    .align    8, 0x90
.Ljmp:
    .quad main
address@hidden pr-y]$ make X32=1
as --x32 -o x.o x.s
./ld -shared -m elf32_x86_64 -o x.so x.o
./ld -pie -m elf32_x86_64 -o x.pie x.o
./ld: warning: cannot find entry symbol _start; defaulting to 0000000000000184
./ld -m elf32_x86_64 -o x x.o
./ld: warning: cannot find entry symbol _start; defaulting to 0000000000400074
readelf -r x

There are no relocations in this file.
readelf -r x.pie

Relocation section '.rela.dyn' at offset 0x178 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00200190  00000101 R_X86_64_64       000000d4   .interp + 184
readelf -r x.so

Relocation section '.rela.dyn' at offset 0x140 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00200158  00000301 R_X86_64_64       0000014c   main + 0
address@hidden pr-y]$ 
address@hidden pr-x]$ make clean
rm -f a.out *.o *.so
address@hidden pr-x]$ cat x.s
    .text
    .globl main
main:
    lea    .Ljmp(%rip), %rax
    jmp    *(%rax)
.L1:
    nop
    .section    .data.rel.ro.local,"aw",@progbits
    .align    8, 0x90
.Ljmp:
    .quad .L1
address@hidden pr-x]$ make X32=yes
as --x32 -o x.o x.s
./ld -shared -m elf32_x86_64 -o x.so x.o
./ld -pie -m elf32_x86_64 -o x.pie x.o
./ld: warning: cannot find entry symbol _start; defaulting to 0000000000000184
./ld -m elf32_x86_64 -o x x.o
./ld: warning: cannot find entry symbol _start; defaulting to 0000000000400074
readelf -r x

There are no relocations in this file.
readelf -r x.pie

Relocation section '.rela.dyn' at offset 0x178 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00200190  00000101 R_X86_64_64       000000d4   .interp + 18d
readelf -r x.so

Relocation section '.rela.dyn' at offset 0x140 contains 1 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00200158  00000101 R_X86_64_64       0000014c   .text + 155
address@hidden pr-x]$

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]