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

--- Comment #8 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Thu Oct 19 23:06:20 2017
New Revision: 253914

URL: https://gcc.gnu.org/viewcvs?rev=253914&root=gcc&view=rev
Log:
PR82575, lto debugobj references __gnu_lto_slim, ld test liblto-17 fails

If __gnu_lto_slim is global, undefined, default visibility in the
early debug object, then it finds its way into .dynsym when creating
shared libraries.  __gnu_lto_slim in a symbol table (.dynsym or
.symtab) signals nm and other binutils that the object is an LTO
object needing a plugin, but that isn't the case for the ld liblti-17
tests.  So, make __gnu_lto_slim hidden to prevent it becoming
dynamic.  Further, make it weak because some linkers may warn on
finding an undefined global non-default visibility symbol.

        PR lto/82575
        * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
        Make discarded non-local symbols weak and hidden.


Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/simple-object-elf.c

Reply via email to