That's not the case with many other standard libraries. Granted, only supporting static link for now does help.
Main program refs to TLS in DT_NEEDED libs are accessed at a ldso-time constant (can't vary per thread) offset from thread pointer.
-
-
This requires a contiguous VA range whose size is sum of all library TLS sizes.
-
Actual dynamic TLS access goes thru a function call so you can make the lookup as complex as you want, if you're happy paying.
-
Ah so it's not a nice constant time memory access relative to the segment. OK, I start to see how this could work.
-
Yes. The offset is assigned by ldso and stored with GOT. Then the program just loads the offset from GOT and applies it.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.