https://sourceware.org/bugzilla/show_bug.cgi?id=22791

--- Comment #10 from Cary Coutant <ccoutant at gmail dot com> ---
The "official" or "canonical" PLT entry is the one that serves as the address
of the function throughout the program.

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's probably not the only way to break function pointer comparison. I'm just
really leery of treating this relocation as PIC-/PIE-compatible.

-- 
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

Reply via email to