[Bug target/94391] gcc refers to absolute symbols with R_X86_64_PC32 relocation
i at maskray dot me
gcc-bugzilla@gcc.gnu.org
Mon Mar 30 02:42:52 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94391
--- Comment #6 from Fangrui Song <i at maskray dot me> ---
> It is incorrect to reference a non-preemptible symbol with a PC relative relocation in a -pie link. GNU ld allows it but the code can be incorrect at runtime.
Correction: It is incorrect to reference a non-preemptible SHN_ABS symbol with
a PC relative relocation in a PIC (-shared or -pie) link. This is
non-representable due to ASLR (load base not fixed at link time)
More information about the Gcc-bugs
mailing list