ELF: Hide symbols defined in discarded input sections
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 25 Oct 2018 01:08:13 +0000 (18:08 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 25 Oct 2018 01:08:24 +0000 (18:08 -0700)
commit0a640d719684f25bdb88ae60148c6978e6131701
tree847a75473aa7a2d0009da97e8a8665d2261b44e2
parent0e139b87870258ce666826efd14fafd543c778d0
ELF: Hide symbols defined in discarded input sections

When assigning symbol version, we should hide debug symbols defined in
discarded sections from IR objects so that they can be removed later.

bfd/

PR ld/23818
* elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
defined in discarded input sections.

ld/

PR ld/23818
* testsuite/ld-plugin/lto.exp: Run PR ld/23818 test.
* testsuite/ld-plugin/pr23818.d: New file.
* testsuite/ld-plugin/pr23818.t: Likewise.
* testsuite/ld-plugin/pr23818a.c: Likewise.
* testsuite/ld-plugin/pr23818b.c: Likewise.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr23818.d [new file with mode: 0644]
ld/testsuite/ld-plugin/pr23818.t [new file with mode: 0644]
ld/testsuite/ld-plugin/pr23818a.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr23818b.c [new file with mode: 0644]