elf: Get the real kept section
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 26 Nov 2020 00:14:13 +0000 (16:14 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 26 Nov 2020 00:14:29 +0000 (16:14 -0800)
commit58349d00f461904f20dae88d48c1fda11cbb47bc
treeabac11dad512c2375cb95d025c470b7e2099f833
parent93bbe484a4fd41832383d4d781140d8cb5b18e76
elf: Get the real kept section

When mixing linkonce and comdat sections, we need to keep searching to
get the real kept section.

bfd/

PR ld/26936
* elflink.c (_bfd_elf_check_kept_section): Get the real kept
section.

ld/

PR ld/26936
* testsuite/ld-elf/pr26936.d: New file.
* testsuite/ld-elf/pr26936a.s: Likewise.
* testsuite/ld-elf/pr26936b.s: Likewise.
* testsuite/ld-elf/pr26936c.s: Likewise.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr26936.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr26936a.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr26936b.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr26936c.s [new file with mode: 0644]