[PATCH] aarch64: Do not link conform tests with -Wl, -z, force-bti (bug 33601)
Yury Khrustalev
yury.khrustalev@arm.com
Fri Nov 7 16:27:23 GMT 2025
Hi Florian,
On Thu, Nov 06, 2025 at 12:15:25PM +0100, Florian Weimer wrote:
> 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
>
I'll need to look at this more carefully on Monday but does this patch
try to change the place that is removed in [1]?
[1]: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=259adb087dd99a199b125e7b955f1d35044664b4
Yury
More information about the Libc-alpha
mailing list