[Bug target/108940] Offset of pointer to global variable not set correctly for position independent executable
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 27 16:26:53 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108940
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You need to link with -pie if you want a PIE executable. BUT that does not work
with -elf/-eabi targets as there is no loader.
Since there is no loader and shared libraries are not supported with bare
metal, you need to have a modified binutils to do the right thing and have a
correct target.
More information about the Gcc-bugs
mailing list