elf/x86: Issue an error on discarded output .plt section
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 18 Nov 2021 15:54:34 +0000 (07:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 18 Nov 2021 15:58:52 +0000 (07:58 -0800)
commit7c80aab93666727965c2d5d6e17b1338d88293e0
treeafa7fa215c740c62255a2b2580804d466d8055b7
parenta0cfd0ca0ea26f157957c42b359b750c6f53d4bf
elf/x86: Issue an error on discarded output .plt section

Issue an error, instead of crash, on discarded output .plt section.

bfd/

PR ld/28597
* elf32-i386.c (elf_i386_finish_dynamic_sections): Issue an error
on discarded output .plt section.
* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.

ld/

PR ld/28597
* testsuite/ld-elf/pr28597.d: New file.
* testsuite/ld-elf/pr28597.s: Likewise.
* testsuite/ld-elf/pr28597.t: Likewise.
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ld-elf/pr28597.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr28597.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr28597.t [new file with mode: 0644]