On Thu, 27 May 2021, Ho, Lennox via Gcc-help wrote: > So my question is, is there a way to inform gcc that my_tls is always located > in a static TLS segment and so it can just emit a @gottpoff placeholder > instead of __tls_get_addr() in libtls_import.so? You need to pass -ftls-model=initial-exec when compiling libtls_import.so, not the exporting library. I am a bit surprised you've decided to do that the other way around :) (alternatively, you could place __attribute__((tls_model("initial-exec"))) on the declaration of the variable in the header file) Alexander