http://sourceware.org/bugzilla/show_bug.cgi?id=13178
Bug #: 13178 Summary: Unnecessary GOT relocation created for IFUNC Product: binutils Version: 2.21 Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sources.redhat.com ReportedBy: drepper....@gmail.com Classification: Unclassified Host: x86_64-linux Created attachment 5926 --> http://sourceware.org/bugzilla/attachment.cgi?id=5926 Test program to show unnecessary IFUNC relocation When compiling the attached code using gcc -shared -o u.so -fpic u.so on an x86-64 system you will see the following relocations: Relocation section [ 7] '.rela.dyn' for section [ 0] '' at offset 0x3e8 contains 5 entries: Offset Type Value Addend Name 0x0000000000200760 X86_64_RELATIVE 000000000000000000 +2099040 0x00000000002008e8 X86_64_GLOB_DAT 000000000000000000 +0 __gmon_start__ 0x00000000002008f0 X86_64_GLOB_DAT 000000000000000000 +0 _Jv_RegisterClasses 0x00000000002008f8 X86_64_GLOB_DAT 000000000000000000 +0 __cxa_finalize 0x0000000000200900 X86_64_GLOB_DAT 0x00000000000005d8 +0 f Relocation section [ 8] '.rela.plt' for section [10] '.plt' at offset 0x460 contains 3 entries: Offset Type Value Addend Name 0x0000000000200920 X86_64_JUMP_SLOT 000000000000000000 +0 __cxa_finalize 0x0000000000200928 X86_64_JUMP_SLOT 0x00000000000005d8 +0 f 0x0000000000200930 X86_64_JUMP_SLOT 0x00000000000005e5 +0 g There are two relocations against f. Since there is no reference to f other than through a call there is no need for a GOT relocation. The PLT relocation is all that's needed. It works fine for normal symbols (there is only one relocation for g) and IFUNCs should be handled just like that. -- 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. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils