[Bug lto/102426] [12 regression] Fix for PR 49664 breaks Solaris bootstrap with gld
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 17 19:21:54 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102426
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #8)
> > --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> > So, shouldn't we instead of the -export-symbols-regex use a version script?
>
> We certainly could, but IIUC this would lose the functionality on
> non-ELF targets that do support -export-symbols-regex in a different
> way. No idea if this is deemed acceptable...
The world doesn't end if other symbols are exported, it worked that way for
years.
Perhaps we could test in configure whether -export-symbols-regex works and only
use a fallback if it doesn't? Or decide it based on target triplet,
do those GNU and SUN version script checks and if neither of them works, fall
back to -export-symbols-regex ?
gld supports version scripts like:
{ global: onload; local: *; };
which makes onload a non-versioned GLOBAL symbol while everything else LOCAL,
does Sun ld support that too or similar?
More information about the Gcc-bugs
mailing list