http://sourceware.org/bugzilla/show_bug.cgi?id=12980
Summary: bad GOT reloc generation in -shared for STV_PROTECTED with primary PLT/copy reference Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: rol...@gnu.org This comes up in a glibc dynamic linker test. See elf/vis{main,mod[123]}.c in the sourceware glibc tree. Here vismod1.c generates an STV_PROTECTED definition of "protinmod" and code with a R_X86_64_GOTPCREL taking its address. vismain.c generates an undefined reference to protinmod, and uses both &protinmod and direct calls to protinmod; so it has a PLT entry for protinmod that is the canonical function pointer address for &protinmod. BFD ld -shared building vismod1.so emits an R_X86_64_GLOB_DAT for the R_X86_64_GOTPCREL referencing protinmod. gold -shared generates an R_X86_64_RELATIVE instead. This yields the wrong address for &protinmind (the DSO real definition address rather than the non-PIC executable's PLT entry). There may be other similar cases, but I suspect all the failures in this test are the same bug or ones obviously related enough you will find them by looking at your code. -- 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