[lsb-discuss] [Bug 993] ELF extensions for thread local storage

bugzilla-daemon at linux-foundation.org bugzilla-daemon at linux-foundation.org
Tue Jun 16 08:34:09 PDT 2009


http://bugs.linuxbase.org/show_bug.cgi?id=993


Pavel Shved <shved at ispras.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shved at ispras.ru




--- Comment #4 from Pavel Shved <shved at ispras.ru>  2009-06-16 08:34:08 ---
Just for information.

ls-linux.so provides non-LSB ___tls_get_addr function.  ___tls_get_addr is used
in backend-generated code to access and allocate thread-local variables in
shared libraries.  Under specific circumstances the call to this function may
be optimized out (see man gcc /-ftls-model and Drepper's article referenced
above).

The ability to declare a variable thread-local is a gnu extension to gcc and is
not available on all LSB architectures. 

This function may be an external dependency both to applications, that
reference __thread variables, and to libraries, that provide such variables. 
However, no uploaded applications reference this symbol so far.

On my system libstdc++ provides a __thread variable (gcc may be ./configure'd
with special option to avoid it), and therefore depends on ___tls_get_addr. 
Among others, this means that the apps statically linked with it (vanilla
OpenJDK, for example; see bug #2674) will gain it as dependency as well.

So, maybe, such a function is needed to applications that utilize TLS and
should be added (or implemented in lsb-linker somehow)?


-- 
Configure bugmail: http://bugs.linuxbase.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the lsb-discuss mailing list