On Thu, Jan 17, 2013 at 12:07 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > If you put code that accesses TLS variables into a shared library, and > that code was not compiled with -fpic/-fPIC nor with > -ftls-model=global-dynamic, then accessing the TLS variables will read > the wrong values. Is there a way to verify if there are wrongly initialized TLS variables in some application or I can only detect such cases when the application fails? Can the linker or runtime linker warn about these cases? Or because we haven't compiled with -fpic or -ftls-model=global-dynamic, then the runtime linker doesn't know there are TLS variables in our binary? Thanks, Saul