[Bug ipa/85801] LTO linking fails to reconcile symbol from common an data sections (-fPIE -Wl, --as-needed -flto): unresolvable R_ARM_REL32 relocation against symbol `progname'
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 11 04:35:48 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85801
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Target|arm |arm, aarch64
Last reconfirmed|2018-05-17 00:00:00 |2021-9-10
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So obvious in GCC 10+, this fails for all targets even without lto since the
default is now -fno-common.
Change:
char * progname;
to:
char * progname __attribute__((common));
Will allow it to work without LTO.
More information about the Gcc-bugs
mailing list