diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2020-10-02 11:08:19 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-10-02 11:08:19 +0100 |
commit | 7026832e52cff026f877616ac0033c7bb8d1df6f (patch) | |
tree | f51aba6d7c5928bdf994047762182a07ba7a6627 /ld/testsuite/ld-elf/pr26681.s | |
parent | 048fde1ef43843aa67e9ac30829e0d30f019a7dd (diff) | |
download | gdb-7026832e52cff026f877616ac0033c7bb8d1df6f.zip gdb-7026832e52cff026f877616ac0033c7bb8d1df6f.tar.gz gdb-7026832e52cff026f877616ac0033c7bb8d1df6f.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite/ld-elf/pr26681.s')
-rw-r--r-- | ld/testsuite/ld-elf/pr26681.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr26681.s b/ld/testsuite/ld-elf/pr26681.s new file mode 100644 index 0000000..0417bed --- /dev/null +++ b/ld/testsuite/ld-elf/pr26681.s @@ -0,0 +1,10 @@ + .text + .globl _start +_start: + .nop + + .section .unused1, "ax", %progbits + .nop + + .section .gnu.note1, "o", %note, .unused1 + .word 2 |