[glibc/release/2.39/master] aarch64: Do not link conform tests with -Wl, -z, force-bti (bug 33601)
Florian Weimer
fw@sourceware.org
Thu Nov 13 14:11:20 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c74d59a656f8f98ee48b501a0d0653f4d9b3b59d
commit c74d59a656f8f98ee48b501a0d0653f4d9b3b59d
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Nov 6 11:14:53 2025 +0100
aarch64: Do not link conform tests with -Wl,-z,force-bti (bug 33601)
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.
Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
(cherry picked from commit 75b6b263e928eaca01d836f6bb8b539346b6bb2d)
Diff:
---
NEWS | 1 +
sysdeps/aarch64/Makefile | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 47bf061d76..bf1887b3ec 100644
--- a/NEWS
+++ b/NEWS
@@ -108,6 +108,7 @@ The following bugs are resolved with this release:
[32483] ctype macros segfault in multithreaded programs with multiple libc.so
[33234] Use TLS initial-exec model for __libc_tsd_CTYPE_* thread variables
[33361] nss: Group merge does not react to ERANGE during merge
+ [33601] aarch64: Do not link conform tests with -Wl,-z,force-bti
Version 2.39
diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile
index 141d7d9cc2..eb34f4541e 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),conform)
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 += dl-bti
More information about the Glibc-cvs
mailing list