Question: Does uclibc support NPTL TLS ?

Rich Felker dalias at libc.org
Wed May 27 19:18:47 UTC 2015


On Wed, May 27, 2015 at 05:10:53PM +0800, Sheng Yong wrote:
> Hi,
> 
> I encountered a problem when I test thread local storage
> on my arm board (kernel 3.10.77 and uclibc 0.99.3.2).
> 
> Please let me know if I am doing something wrong for
> debugging TLS.
> 
> on my x86 host machine:
> root at kernel-host:~> cat tls.c
> __thread int i =5;
> 
> int
> main (int argc, char **argv)
> {
>   return 0;
> }
> 
> root at kernel-host:~> arm-linux-uclibceabi-gcc -o tls tls.c -g -lpthread

If you add output (printf("%d", i)) to the program and actually run
it, does it work? It looks to me like the failure you're observing is
the inability of gdb to find the TLS while debugging, which is
separate from whether TLS is supported.

Rich


More information about the uClibc mailing list