https://sourceware.org/bugzilla/show_bug.cgi?id=22791
--- Comment #11 from Rafael Ávila de Espíndola <rafael.espindola at gmail dot com> --- (In reply to Cary Coutant from comment #10) > The "official" or "canonical" PLT entry is the one that serves as the > address of the function throughout the program. OK, so we were talking about the same plt entry. > If you make the function protected in your shared library, I think the PIC > sequence to get its address will always load the address of the function > itself, while the PC32 relocation in the main program will have no > alternative but to load the address of its own PLT entry. (Gnu ld will > refuse to build a shared library with a PC32 ref to a protected symbol, but > gold will build it.) That is what I would expect. Using a PLT entry in the main executable as the canonical PLT entry should work in the same cases where a copy relocation works: The use is in the main program and the definition has default visibility. -- 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