Page MenuHomeFreeBSD

rtld-elf: Use variables more consistent with Variant I for Variant II TLS
ClosedPublic

Authored by jrtc27 on May 7 2025, 3:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 23, 6:49 PM
Unknown Object (File)
Fri, Aug 15, 12:16 AM
Unknown Object (File)
Mon, Aug 11, 11:10 PM
Unknown Object (File)
Mon, Aug 11, 2:02 AM
Unknown Object (File)
Sat, Aug 2, 11:50 PM
Unknown Object (File)
Sat, Aug 2, 7:51 PM
Unknown Object (File)
Aug 2 2025, 2:25 AM
Unknown Object (File)
Jul 29 2025, 9:58 AM
Subscribers

Details

Summary

Firstly, the second argument to allocate_tls is the old TCB (versus
oldtls, which has less of a clear meaning), so rename it to oldtcb like
Variant I.

Secondly, segbase and oldsegbase are oriented towards what ends up in
the segment registers, but that's not the main concern here, and those
don't convey what they actually point to. Instead, rename segbase to tcb
and change it to a uintptr_t **, and remove oldsegbase as it's always
equal to oldtcb, again both matching Variant I.

Thirdly, rename tls to tls_block, again both matching Variant I.

Finally, similarly rename tls to tcb in free_tls, and oldtls to oldtcb
in the common _rtld_allocate_tls.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63984
Build 60868: arc lint + arc unit