From fed9ddae48ce54ebd8f7064426400297cfb2b6bd Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 3 Jan 2018 19:57:08 +0100 Subject: fdpic: fix ld.so crashing Newer binutils is creating a section INIT_ARRAY from any .init_array and .ctors in the code. When ld.so runs initialization functions for loaded objects with _dl_run_init_array() it crashes on Bfin FDPIC system. It is trying to execute the function in pthread.c, which is no longer useful with the combined C library approach. Gcc -Wl,-M debugging output was very useful to find the reason for the INIT_ARRAY section. --- libpthread/linuxthreads/pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpthread') diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index d02da6b6c..a248bd20a 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -243,7 +243,7 @@ int (*__pthread_timedsuspend)(pthread_descr, const struct timespec *) = __pthrea mask with e.g. sigsetjmp before creating the first thread); - a regular function called from pthread_create when needed. */ -static void pthread_initialize(void) __attribute__((constructor)); +static void pthread_initialize(void); libpthread_hidden_proto(pthread_attr_destroy) libpthread_hidden_proto(pthread_attr_init) -- cgit v1.2.3