[PATCH] elf: Fix tst-gnu2-tls2 on some environments
Florian Weimer
fweimer@redhat.com
Mon Jan 19 16:24:36 GMT 2026
* Adhemerval Zanella Netto:
> On 19/01/26 12:18, Florian Weimer wrote:
>> * Adhemerval Zanella Netto:
>>
>>> On 19/01/26 11:22, Florian Weimer wrote:
>>>> * Adhemerval Zanella:
>>>>
>>>>> On armv7a vfpv4 tst-gnu2-tls2 fails with:
>>>>>
>>>>> open tst-gnu2-tls2mod0.so
>>>>> open tst-gnu2-tls2mod1.so
>>>>> open tst-gnu2-tls2mod2.so
>>>>> close tst-gnu2-tls2mod0.so
>>>>> close tst-gnu2-tls2mod1.so
>>>>> open tst-gnu2-tls2mod0.so
>>>>> open tst-gnu2-tls2mod1.so
>>>>> Didn't expect signal from child: got `Aborted'
>>>>>
>>>>> Because AFTER_TLSDESC_CALL might clobber caller-saved registers and
>>>>> the zero array might call the memset function resolution, which itself
>>>>> might clobber some vector registers.
>>>>
>>>> Isn't AFTER_TLSDESC_CALL a noop on 32-bit Arm
>>>
>>> It depends on the hardware, with HWCAP_ARM_VFP we checks if d0-d15 register
>>> are correctly handled, and with HWCAP_ARM_VFPD32 with also check d16-d31.
>>
>> What does the ABI say about preserving vector registers?
> This is related to 64c7e344289ed085517c2227d8e3b06388242c13, where
> _dl_tlsdesc_dynamic slow-path has the peculiar calling convention.
Ah, so the test is somewhat invalid because it assumes that memset et
al. do not clobber vector registers?
Maybe add a comment to that effect to AFTER_TLSDESC_CALL, and mention
the need for BIND_NOW.
Thanks,
Florian
More information about the Libc-alpha
mailing list