[uclibc-ng-devel] problem with stack protection, threads and static binaries
daniel at fahlgren.se
Thu Sep 10 14:53:29 CEST 2015
I'm experiencing problems with uClibc-ng when creating static binaries
that uses threads. I originally reported this to the buildroot mailing
list but got redirected here instead.
The problem is when using a combination of stack protection, threads and
static binaries. The program will during start up get a sigsegv in
__pthread_initialize_minimal_internal(), and gdb says the instruction is
where %fs is 0x00. The reason for that is that the pthread library is
compiled with stack protection but __pthread_initialize_minimal_internal
is called before __libc_setup_tls in static binaries.
I have created an ugly patch to verify my hypothesis (attached). With
that patch the test program works, but what is the proper way to solve
With uClibc 0.9.33.x the same thing happens. With glibc the program
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 515 bytes
Desc: not available
More information about the devel