aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2023-09-26 16:27:38 +0100
committerWilco Dijkstra <wilco.dijkstra@arm.com>2023-09-26 16:37:38 +0100
commite1e18ea0defe9e1ee35abbbe5279028ecf786957 (patch)
tree9ae3a5fe67b073416bfe81efdf96ebbefc7af3ff /libgcc
parentc3c6f30496d945b77dcb7f4ad8c3f8094f5a64a4 (diff)
downloadgcc-e1e18ea0defe9e1ee35abbbe5279028ecf786957.zip
gcc-e1e18ea0defe9e1ee35abbbe5279028ecf786957.tar.gz
gcc-e1e18ea0defe9e1ee35abbbe5279028ecf786957.tar.bz2
AArch64: Remove BTI from outline atomics
The outline atomic functions have hidden visibility and can only be called directly. Therefore we can remove the BTI at function entry. This improves security by reducing the number of indirect entry points in a binary. The BTI markings on the objects are still emitted. libgcc/ChangeLog: * config/aarch64/lse.S (BTI_C): Remove define.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config/aarch64/lse.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S
index dde3a28..f64a3e9 100644
--- a/libgcc/config/aarch64/lse.S
+++ b/libgcc/config/aarch64/lse.S
@@ -46,6 +46,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
* direct branch. The choice of LSE vs non-LSE is done via one byte load
* followed by a well-predicted direct branch. The functions are compiled
* separately to minimize code size.
+ *
+ * Since these functions have hidden visibility and are never called
+ * indirectly, they do not need to start with a BTI instruction.
*/
#include "auto-target.h"
@@ -161,8 +164,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define tmp1 17
#define tmp2 15
-#define BTI_C hint 34
-
/* Start and end a function. */
.macro STARTFN name
.text
@@ -172,7 +173,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
.type \name, %function
.cfi_startproc
\name:
- BTI_C
.endm
.macro ENDFN name