bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/22791] Don't error when a -pie executable uses a shared functi


From: ccoutant at gmail dot com
Subject: [Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation
Date: Tue, 06 Feb 2018 03:38:40 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]