This is the same as D57749, but for x64 target.
"ELF Handling For Thread-Local Storage" p41 says (https://www.akkadia.org/drepper/tls.pdf):
R_X86_64_GOTTPOFF relocation is used for IE TLS models.
Hence if linker sees this relocation we should add DF_STATIC_TLS flag.
This is the relocation which FreeBSD was interested in initially I think (https://reviews.freebsd.org/D19072)
For LE model (p49), the R_X86_64_TPOFF32 is used.
But linkers do not allow to use it for DSO, for example, LLD would report:
"error: relocation R_X86_64_TPOFF32 cannot be used against symbol var; recompile with -fPIC"
So seems we only want to catch the R_X86_64_GOTTPOFF?