[PATCH] aarch64: Do not link conform tests with -Wl,-z,force-bti (bug 33601)
Florian Weimer
fweimer@redhat.com
Wed Nov 12 17:43:09 GMT 2025
* Yury Khrustalev:
> On Thu, Nov 06, 2025 at 08:54:55PM +0100, Florian Weimer wrote:
>> * Wilco Dijkstra:
>>
>> > Hi Florian,
>> >
>> >> 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.
>> >
>> > +ifneq ($(subdir),confirm)
>> >
>> > Eh, did you mean conform here?
>> >
>> > OK with that change.
>> >
>> > Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>>
>> It's not correct either way. 8-/
>>
>> This:
>>
>> commit 2c421fc4302ecb729823ca442f9dfab95afba752
>> Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
>> Date: Wed May 14 16:32:31 2025 +0000
>>
>> ...
>>
>> removed
>>
>> LIBC_CONFIG_VAR([aarch64-bti], [$libc_cv_aarch64_bti])
>>
>> so the sysdeps/aarch64/Makefile check is a no-op since then, and the bug
>> isn't in the current upstream sources, but it's still present in glibc
>> 2.41 and earlier.
>>
>> Should I apply the fixed patch there?
>>
>
> Apologies for the delay. I think it makes sense to apply this patch to
> 2.41 and earlier if necessary.
>
> However, I cannot reproduce an issue. I have a GCC 14.2.0 that supports
> BTI but does not enable branch protection by default, so, if I'm not
> mistaken, this should trigger 33601 [1] but it does not: with and without
> this patch (with confirm -> conform), I get some failed conform tests
> but none of them have BTI in the test output logs. So, I'm a bit
> confused.
I see it with:
./configure --prefix=/usr CFLAGS="-O2 -Wall -g -mbranch-protection=standard"
On release/2.41/master.
Thanks,
Florian
More information about the Libc-alpha
mailing list