ld -r: Don't merge with member of output section group
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 18 Jul 2019 15:01:45 +0000 (08:01 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 18 Jul 2019 15:01:54 +0000 (08:01 -0700)
commit54d7dae59a2239720c848985a7d50a0a8b3319eb
treedf6fb11da6155641175b1840bf6b04df81779e50
parent71c4e95abe66ec9fc2c064268e3f9640a5b951d8
ld -r: Don't merge with member of output section group

When doing a relocatable link, members of input section group are
placed in their own output sections.  We need to make sure that no
input sections are merged with member of output section group.

PR ld/24819
* emultempl/elf32.em (elf_orphan_compatible): Return FALSE for
member of output section group when doing a relocatable link.
* testsuite/ld-elf/pr24819.d: New file.
* testsuite/ld-elf/pr24819.s: Likewise.
ld/ChangeLog
ld/emultempl/elf32.em
ld/testsuite/ld-elf/pr24819.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr24819.s [new file with mode: 0644]