]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[BFD, AArch64] Improve bti/pac plts.
authorSudakshina Das <sudi.das@arm.com>
Thu, 25 Apr 2019 10:37:25 +0000 (11:37 +0100)
committerSudakshina Das <sudi.das@arm.com>
Thu, 25 Apr 2019 10:37:25 +0000 (11:37 +0100)
commit68bb0359eec3093560929b8ad2b3f5d30e7a7e1d
tree64d5f1e62bc1ad0bd4fb79e91feb42c488ad5dc9
parentcd0923370be1a6412e9b8fb5c8e9e39d90f1d3ea
[BFD, AArch64] Improve bti/pac plts.

This patch aims to improve the definitions of BTI and PAC based PLTs.
The following changes are made:
   * PLT0 does not need PAC instructions since the PLTGOT[2] (and PLTGOT[1])
     are readonly so they cannot be corrupted at runtime. Thus both PAC plt0
     and BTI+PAC plt0 are removed and we can use basic plt0 and BTI plt0
     instead, respectively.
   * We can remove the extra padding nops when we add the new bti instructions.
     BTI plt0 and BTI TLSDESC plt are updated.
   * For better performance PLTn could be padded to 24bytes. Both BTI pltn and
     PAC pltn are updated.

*** bfd/ChangeLog ***

2019-04-25  Sudakshina Das  <sudi.das@arm.com>

* elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
(PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
(PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
(PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
(elfNN_aarch64_small_plt0_pac_entry): Remove.
(elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
(elfNN_aarch64_small_plt0_bti_entry): Update.
(elfNN_aarch64_small_plt_bti_entry): Update.
(elfNN_aarch64_small_plt_pac_entry): Update.
(elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
(setup_plt_values): Setup new entries.
(elfNN_aarch64_finish_dynamic_sections): Remove size change.
(elfNN_aarch64_plt_sym_val): Likewise.

*** ld/ChangeLog ***

2019-04-25  Sudakshina Das  <sudi.das@arm.com>

* testsuite/ld-aarch64/bti-pac-plt-1.d: Update.
* testsuite/ld-aarch64/bti-pac-plt-2.d: Update.
* testsuite/ld-aarch64/bti-plt-1.d: Update.
* testsuite/ld-aarch64/bti-plt-3.d: Update.
* testsuite/ld-aarch64/bti-plt-5.d: Update.
* testsuite/ld-aarch64/pac-plt-1.d: Update.
* testsuite/ld-aarch64/pac-plt-2.d: Update.
bfd/ChangeLog
bfd/elfnn-aarch64.c
ld/ChangeLog
ld/testsuite/ld-aarch64/bti-pac-plt-1.d
ld/testsuite/ld-aarch64/bti-pac-plt-2.d
ld/testsuite/ld-aarch64/bti-plt-1.d
ld/testsuite/ld-aarch64/bti-plt-3.d
ld/testsuite/ld-aarch64/bti-plt-5.d
ld/testsuite/ld-aarch64/pac-plt-1.d
ld/testsuite/ld-aarch64/pac-plt-2.d