fdpic: fix ld.so crashing
commitfed9ddae48ce54ebd8f7064426400297cfb2b6bd
authorWaldemar Brodkorb <wbx@uclibc-ng.org>
Wed, 3 Jan 2018 18:57:08 +0000 (3 19:57 +0100)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>
Wed, 3 Jan 2018 19:05:32 +0000 (3 20:05 +0100)
tree9916518df81149dfd7686fbd18d4f478c07b38e0
parentdc382b5a91dec9f29e51b0bf10f4c4df2a276b9b
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