CHECK_STATIC_TLS in R_X86_64_TPOFF64 type relocation
Fengkai Sun
qcloud1014@gmail.com
Sun Dec 26 13:29:13 GMT 2021
Hi list,
I noticed that when resolving R_X86_64_TPOFF64 type relocations, the
runtime dynamic linker would call the macro CHECK_STATIC_TLS, which can be
expanded into a call to _dl_try_allocate_static_tls. (in
sysdeps/x86_64/dl-machine.h)
The comments of _dl_try_allocate_static_tls says:
> We are trying to perform a static TLS relocation in MAP, but it was
dynamically loaded.
To the best of my knowledge, I found that R_X86_64_TPOFF64 is for
Initial-exec TLS model, which only appears in executables.
Since glibc has refused to dlopen PIEs since 2.29, why does it not see it
as an error, but still try to allocate static TLS for PIEs?
---
Thanks,
Fengkai
More information about the Libc-help
mailing list