Check ELF section header only for ELF output
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 2 Aug 2017 12:10:29 +0000 (05:10 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 2 Aug 2017 12:10:48 +0000 (05:10 -0700)
commitdb99ecc08f5b66fbe9cb72e90352c7f77ec71a6e
tree3c6c4906c1e655f5adbb331e668923591fd647f9
parentb8f4abd342cc54bc2b90c796a2aae93e6c3bda6b
Check ELF section header only for ELF output

When placing an orphan input section, check ELF section header only for
ELF output.

PR ld/21884
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Check
ELF section header only for ELF output.
* testsuite/ld-elf/pr21884.d: New test.
* testsuite/ld-elf/pr21884.t: Likewise.
* testsuite/ld-elf/pr21884a.s: Likewise.
* testsuite/ld-elf/pr21884b.s: Likewise.
ld/ChangeLog
ld/emultempl/elf32.em
ld/testsuite/ld-elf/pr21884.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr21884.t [new file with mode: 0644]
ld/testsuite/ld-elf/pr21884a.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr21884b.s [new file with mode: 0644]