Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: