Page MenuHomeFreeBSD

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

Authored by jrtc27 on Wed, May 7, 3:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 22, 9:03 AM
Unknown Object (File)
Sun, May 18, 12:02 AM
Unknown Object (File)
Thu, May 15, 11:38 AM
Unknown Object (File)
Thu, May 15, 11:38 AM
Unknown Object (File)
Thu, May 15, 11:38 AM
Unknown Object (File)
Thu, May 15, 11:38 AM
Unknown Object (File)
Thu, May 15, 11:38 AM
Unknown Object (File)
Thu, May 15, 11:26 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 Not Applicable
Unit
Tests Not Applicable
OSZAR »