This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/49833] [x32] PIC doesn't work


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49833

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-25 18:03:51 UTC ---
(In reply to comment #5)
> Created attachment 24831 [details]
> A testcase
> 
> elf/rtld.c in glibc is miscompiled by
> 
> -std=gnu99 -fgnu89-inline -O2 -fPIC

GCC generates many relocations in .text section:

Relocation section '.rela.text' at offset 0x5e8 contains 15 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00001714  00000008 R_X86_64_RELATIVE                            00001150
00002557  00000008 R_X86_64_RELATIVE                            0021f5f8

readelf -r elf/rtld.os

000005c4  0000ab0a R_X86_64_32       00000000   _start + 0
00001407  0000ae0a R_X86_64_32       00000000   _rtld_local + 5b8
0000141d  0000ae0a R_X86_64_32       00000000   _rtld_local + 5b8
00001d58  0000ae0a R_X86_64_32       00000000   _rtld_local + 5b8
00002e42  0000ae0a R_X86_64_32       00000000   _rtld_local + 5b8


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]