git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS.

Jessica Clarke jrtc27 at freebsd.org
Fri Feb 19 00:00:33 UTC 2021


On 18 Feb 2021, at 23:57, Brandon Bergren <bdragon at FreeBSD.org> wrote:
> On Thu, Feb 18, 2021, at 3:07 PM, Jessica Clarke wrote:
>>> But, I wonder, what does CALL_ELF mean?  Is it for old 64bit PowerPC ABI,
>>> that was abandoned with the switch to ELFv2?
>> 
>> Yes, _CALL_ELF == 2 for ELFv2. I highly doubt the defines were needed
>> for the ELFv1 ABI, but they're especially redundant now. Presumably
>> David's original fixed commit[1] added powerpc64 to that list because
>> TLS wasn't yet supported in LLVM; that happened later in 2012 and our
>> wiki changed it to being implemented in December 2012[2]. So I suspect
>> it should have been deleted 8 years ago.
> 
> FreeBSD 13 will be the first ELFv2 release. FreeBSD 12 and below are ELFv1.
> 
> The reason for the line was to avoid breaking things during the development period for ELFv2. Switching TLS on was one of the things I did at the same time as the official ELFv2 transition. See 2db975b0eb0f3378a39d63eeabe4e3617f4557f0.
> 
> This is NOT an 8 year old change, but I believe it can go away in HEAD as long as the change isn't MFC'd to 12 or earlier.

But TLS isn't broken for ELFv1? Otherwise jemalloc would die in a fire
and nothing would ever work. TLS should have been working for ELFv1 for
many years by this point.

Jess



More information about the dev-commits-src-all mailing list