From 00f6968bbd4857f9eba2d19d3f825df0da181cd6 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 28 Sep 2026 15:55:08 -0300 Subject: [PATCH] aarch64: Return with ret from the la_pltexit path of _dl_runtime_profile The la_pltexit path returned to the caller with 'br lr', and an indirect branch must land on a BTI instruction (which the caller's return site does not have). Checked on aarch64-linux-gnu. Reviewed-by: Yury Khrustalev (cherry picked from commit 9976a737bef1ff4d52514dfb9808483a58331032) --- sysdeps/aarch64/dl-trampoline.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/aarch64/dl-trampoline.S b/sysdeps/aarch64/dl-trampoline.S index b40d8bb31b..412fb85906 100644 --- a/sysdeps/aarch64/dl-trampoline.S +++ b/sysdeps/aarch64/dl-trampoline.S @@ -321,7 +321,9 @@ _dl_runtime_profile: add sp, sp, SF_SIZE + 16 cfi_adjust_cfa_offset (- SF_SIZE - 16) - br lr + /* Use ret instead of br: the caller's return site is not a BTI + landing pad. */ + ret cfi_endproc .size _dl_runtime_profile, .-_dl_runtime_profile