diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-11-11 22:08:23 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-11-11 22:08:23 -0500 |
commit | ad1cd43a86645ba2d4f7c8747240452a349d6bc1 (patch) | |
tree | db609558e4f10ed6554517d30b47bababec06c76 /src/ldso/dynlink.c | |
parent | 4aaf879eb08a22c501b43d8604e67614f7dbc55f (diff) | |
download | musl-ad1cd43a86645ba2d4f7c8747240452a349d6bc1.tar.gz musl-ad1cd43a86645ba2d4f7c8747240452a349d6bc1.tar.bz2 musl-ad1cd43a86645ba2d4f7c8747240452a349d6bc1.tar.xz musl-ad1cd43a86645ba2d4f7c8747240452a349d6bc1.zip |
unify static and dynamic libc init/fini code paths
use weak definitions that the dynamic linker can override instead of
preprocessor conditionals on SHARED so that the same libc start and
exit code can be used for both static and dynamic linking.
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r-- | src/ldso/dynlink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 5fbe2bb5..ac755d94 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -1175,7 +1175,7 @@ static void kernel_mapped_dso(struct dso *p) p->kernel_mapped = 1; } -static void do_fini() +void __libc_exit_fini() { struct dso *p; size_t dyn[DYN_CNT]; @@ -1659,8 +1659,6 @@ _Noreturn void __dls3(size_t *sp) debug.state = 0; _dl_debug_state(); - __init_libc(envp, argv[0]); - atexit(do_fini); errno = 0; CRTJMP((void *)aux[AT_ENTRY], argv-1); |