[PATCH 3/4] powerpc: Runtime selection between sc and scv for syscalls
Matheus Castanho
msc@linux.ibm.com
Mon Nov 23 18:00:54 GMT 2020
Hi Florian,
On 11/19/20 5:35 PM, Florian Weimer wrote:
> * Matheus Castanho:
>
>> That should work for shared libc, but in the static case we may also
>> hit the same problem: trying to access the TLS to read hwcap2 before
>> it has been initialized, but this time in csu/libc-tls.c
>
> Ahh.
>
>> Is there a way to also check if we are in the static startup code at
>> compile time? If not, I'm afraid I'll have to keep the check for the
>> thread pointer.
>
> Is the thread pointer in a regular register? Then you could install a
> fake TCB early on that has a zero bit in the right place.
>
> The other option would be to always use the old interface for !SHARED.
> Just saying. 8-)
>
I believe adding the fake TCB is a bit out of the scope of this patch, and I'd
also prefer to keep the same behavior for both static and shared libcs, so we
avoid surprises in the future.
Do you see this as a blocker for merging this patch?
Thanks,
Matheus Castanho
More information about the Libc-alpha
mailing list