x86-64: Remove BND from 64-bit IBT PLT
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 6 Dec 2022 19:35:42 +0000 (11:35 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 8 Dec 2022 16:05:45 +0000 (08:05 -0800)
commite9c11d58b951ed64255a7889fdcb087e3bed89de
tree3cf56fe61dc7ab7b53fc7259b1aad93d37508de8
parent2d77a94ff17a81260b80997db476f87cba5f4b11
x86-64: Remove BND from 64-bit IBT PLT

Since MPX support has been removed from x86-64 psABI, remove BND from
64-bit IBT PLT by using x32 IBT PLT.

bfd/

PR ld/29851
* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Also check
x32 IBT PLT for 64-bit.
(elf_x86_64_link_setup_gnu_properties): Always use x32 IBT PLT.

ld/

PR ld/29851
* testsuite/ld-x86-64/ibt-plt-1.d: Updated.
* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2d.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3b.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3c.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
* testsuite/ld-x86-64/plt-main-ibt-x32.dd: Moved to ...
* testsuite/ld-x86-64/plt-main-ibt.dd: This.
* testsuite/ld-x86-64/x86-64.exp: Don't use plt-main-ibt-x32.dd.
13 files changed:
bfd/elf64-x86-64.c
ld/testsuite/ld-x86-64/ibt-plt-1.d
ld/testsuite/ld-x86-64/ibt-plt-2a.d
ld/testsuite/ld-x86-64/ibt-plt-2b.d
ld/testsuite/ld-x86-64/ibt-plt-2c.d
ld/testsuite/ld-x86-64/ibt-plt-2d.d
ld/testsuite/ld-x86-64/ibt-plt-3a.d
ld/testsuite/ld-x86-64/ibt-plt-3b.d
ld/testsuite/ld-x86-64/ibt-plt-3c.d
ld/testsuite/ld-x86-64/ibt-plt-3d.d
ld/testsuite/ld-x86-64/plt-main-ibt-x32.dd [deleted file]
ld/testsuite/ld-x86-64/plt-main-ibt.dd
ld/testsuite/ld-x86-64/x86-64.exp