[Bug lto/86175] LTO code generator does not respect ld -u option to force symbol inclusion in the link product

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 18 14:58:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86175

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
> but really gets an empty blob from the LTO plugin for foo.

Are you sure about this? Compiling with -save-temps shows that the symbol is
present in GCC's assembly output; specifying --print-gc-sections also shows
that the linker is discarding it:

/usr/bin/ld.bfd: Removing unused section '.text.KeepMe' in file
'/tmp/ccWbtSKK.ltrans0.ltrans.o'


Gold linker does not exhibit this (try -fuse-ld=gold). Can you report it
against the BFD linker at sourceware.org/bugzilla?


More information about the Gcc-bugs mailing list