[PATCH] aarch64: Do not link conform tests with -Wl,-z,force-bti (bug 33601)
Florian Weimer
fweimer@redhat.com
Thu Nov 6 11:15:25 GMT 2025
If the toolchain does not default to generate BTI markers in GCC,
the main program for conform runtime tests will not have the
BTI marker that -Wl,-z,force-bti requires. Without -Wl,-z,force-bti,
the link editor will not tell the dynamic linker to enable BTI,
and the missing BTI marker is harmless.
---
sysdeps/aarch64/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile
index 9479fb9679..8a98e1d978 100644
--- a/sysdeps/aarch64/Makefile
+++ b/sysdeps/aarch64/Makefile
@@ -2,11 +2,15 @@ long-double-fcts = yes
ifeq (yes,$(aarch64-bti))
# Mark linker output BTI compatible, it warns on non-BTI inputs.
+# Do not do this for conform tests because they may not be compiled
+# with the appropriate compiler flags.
+ifneq ($(subdir),confirm)
sysdep-LDFLAGS += -Wl,-z,force-bti
# Make warnings fatal outside the test system.
LDFLAGS-lib.so += -Wl,--fatal-warnings
LDFLAGS-rtld += -Wl,-z,force-bti,--fatal-warnings
-endif
+endif # $(subdir) != conform
+endif # $(aarch64-bit)
ifeq ($(subdir),elf)
sysdep-dl-routines += \
base-commit: a61332f0869885b3f2fd3266ec0f28a2ed13ff75
More information about the Libc-alpha
mailing list