Finding the source code for ___tls_get_addr_internal()

Saul Tamari stamari@gmail.com
Thu Jan 17 23:13:00 GMT 2013


On Thu, Jan 17, 2013 at 12:07 AM, Ian Lance Taylor <iant@google.com> 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



More information about the Gcc-help mailing list