------- Comment From <email address hidden> 2015-09-02 22:11 EDT-------
Today's work on this..
This is not so simple to "fix".
libchecktur.so really requires a dynamic libgcc because it uses pthreads (namely pthread_cancel).
it can go without a link-time dependency on libgcc *if* it's not built with -fexceptions.
it will run, but crash when pthread_cancel() is called.
I think this is already happening w/ other pieces of the code (libmultipath, iirc) - it's just luck it didn't crash yet.
------- Comment From <email address hidden> 2015-09-02 22:11 EDT-------
Today's work on this..
This is not so simple to "fix".
libchecktur.so really requires a dynamic libgcc because it uses pthreads (namely pthread_cancel).
it can go without a link-time dependency on libgcc *if* it's not built with -fexceptions.
it will run, but crash when pthread_cancel() is called.
I think this is already happening w/ other pieces of the code (libmultipath, iirc) - it's just luck it didn't crash yet.
Some testing/ experiments.
$ cat test.c
#include <pthread.h>
#include <stdlib.h>
void * loop(void *arg) {
}
int main() { create( &thread, NULL, &loop, NULL); cancel( thread) ; // this requires libgcc_s.so
pthread_t thread;
pthread_
pthread_
return 0;
}
$ gcc -pthread -o test test.c
$ ./test; echo $?
0
$ ldd test 0000) e-linux- gnu/libpthread. so.0 (0x00003fff816e 0000) e-linux- gnu/libc. so.6 (0x00003fff8150 0000) 0000)
linux-vdso64.so.1 => (0x00003fff8173
libpthread.so.0 => /lib/powerpc64l
libc.so.6 => /lib/powerpc64l
/lib64/ld64.so.2 (0x000000005013
^ notice there's no dependency on libgcc_s at link-time, it's a run-time dlopen() in pthread_ cancel_ init()
$ find /lib -name libgcc_s.so.1 e-linux- gnu/libgcc_ s.so.1
/lib/powerpc64l
On installer:
~ # ./test
libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted
~ # find /lib -name libgcc_s.so.1
~ #
To be continued.