summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2018-01-03 19:57:08 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-01-03 20:05:32 +0100
commitfed9ddae48ce54ebd8f7064426400297cfb2b6bd (patch)
tree9916518df81149dfd7686fbd18d4f478c07b38e0 /libpthread
parentdc382b5a91dec9f29e51b0bf10f4c4df2a276b9b (diff)
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.
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads/pthread.c2
1 files changed, 1 insertions, 1 deletions
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)