Allow note sections to be discarded when they are linked to another discarded secction.
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 2 Oct 2020 10:08:19 +0000 (11:08 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 2 Oct 2020 10:08:19 +0000 (11:08 +0100)
commit7026832e52cff026f877616ac0033c7bb8d1df6f
treef51aba6d7c5928bdf994047762182a07ba7a6627
parent048fde1ef43843aa67e9ac30829e0d30f019a7dd
Allow note sections to be discarded when they are linked to another discarded secction.

PR 26681
bfd * elflink.c (bfd_elf_gc_sections): Do not arbitrarily keep note
sections which are linked to another section.

ld * testsuite/ld-elf/pr26681.s: New test.
* testsuite/ld-elf/pr26681.d: New test driver.
* testsuite/ld-elf/pr26681.l: New test output.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr26681.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr26681.l [new file with mode: 0644]
ld/testsuite/ld-elf/pr26681.s [new file with mode: 0644]