]> git.ipfire.org Git - thirdparty/gcc.git/commit - libiberty/simple-object-elf.c
PR82575, lto debugobj references __gnu_lto_slim, ld test liblto-17 fails
authorAlan Modra <amodra@gmail.com>
Thu, 19 Oct 2017 23:06:20 +0000 (09:36 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 19 Oct 2017 23:06:20 +0000 (09:36 +1030)
commitebd208bf7b4e8265738cf774549842f3895739ac
tree4b1c24d5264cc33e69ddff9c62f34b72142e02a1
parentef9eec0b599d533b58e29fe0c0bf6435e5368378
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.

From-SVN: r253914
libiberty/ChangeLog
libiberty/simple-object-elf.c