diff options
author | David 'Digit' Turner <digit@google.com> | 2009-07-18 01:11:10 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2009-07-18 01:11:10 +0200 |
commit | b56b5659b3996e98c2060f168d1cff1474e77d2a (patch) | |
tree | 11135868d3dc4a731f7288bcb00abdf48c5c7202 /libc/bionic/libc_init_common.h | |
parent | ef0bd1857041ffde069cf52138aaf22c1af7130e (diff) | |
download | android_bionic-b56b5659b3996e98c2060f168d1cff1474e77d2a.tar.gz android_bionic-b56b5659b3996e98c2060f168d1cff1474e77d2a.tar.bz2 android_bionic-b56b5659b3996e98c2060f168d1cff1474e77d2a.zip |
Fix the C library runtime initialization order.
This allows libc.so to run the C runtime initializer as soon as the
dynamic linker loads the shared library, i.e. before any other initializers
(e.g. static C++ constructors in other shared libraries the executable depends
on).
This also removes the bug where the initializers from the executable itself
were run twice: once by the dynamic linker, and another time by __libc_init
as defined by libc_init_dynamic.c
Diffstat (limited to 'libc/bionic/libc_init_common.h')
-rw-r--r-- | libc/bionic/libc_init_common.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libc/bionic/libc_init_common.h b/libc/bionic/libc_init_common.h index bbc82e4b7..8663c611b 100644 --- a/libc/bionic/libc_init_common.h +++ b/libc/bionic/libc_init_common.h @@ -38,10 +38,6 @@ typedef struct void (**ctors_array)(void); } structors_array_t; -extern __noreturn void __libc_init_common(uintptr_t *elfdata, - void (*onexit)(void), - int (*slingshot)(int, char**, char**), - structors_array_t const * const structors, - void (*pre_ctor_hook)()); +extern void __libc_init_common(uintptr_t *elfdata); #endif |