|
|
|
|
|
by LegionMammal978
492 days ago
|
|
I think GP is talking about something like this [0]. You let it call __tls_get_addr() once in a constructor, take the offset from %fs, store it in a static variable, and use that offset directly. (The static variable doesn't need to be atomic, since it's only written to once, at dlopen() time.) [0] https://godbolt.org/z/o6se3je8v |
|