Don't merge 2 sections with different SHF_EXCLUDE
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 29 Sep 2016 19:58:29 +0000 (12:58 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 29 Sep 2016 19:58:40 +0000 (12:58 -0700)
commit93dc595d7659a8cf224a9fc33aa9071f38328334
treeca3ecb2f8119d7437396be2cb8e90920bc193dbc
parentbb805577d2b212411fb7b0a2d01644567fac4e8d
Don't merge 2 sections with different SHF_EXCLUDE

SEC_EXCLUDE is ignored when doing a relocatable link.  But we can't
merge 2 input sections with the same name when only one of them has
SHF_EXCLUDE.

PR ld/20528
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
merge 2 sections with different SHF_EXCLUDE.
* testsuite/ld-elf/pr20528a.d: New file.
* testsuite/ld-elf/pr20528a.s: Likewise.
* testsuite/ld-elf/pr20528b.d: Likewise.
* testsuite/ld-elf/pr20528b.s: Likewise.
ld/ChangeLog
ld/emultempl/elf32.em
ld/testsuite/ld-elf/pr20528a.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr20528a.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr20528b.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr20528b.s [new file with mode: 0644]