diff options
Diffstat (limited to 'ldso/libdl/libdl.c')
-rw-r--r-- | ldso/libdl/libdl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 3c1eab43a..d68ff1356 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -225,6 +225,10 @@ void *_dlopen(const char *libname, int flag) dl_elf_init = (int (*)(void)) (tpnt->loadaddr + tpnt->dynamic_info[DT_INIT]); (*dl_elf_init) (); } + if (tpnt->dynamic_info[DT_FINI]) { + atexit((void (*)(void)) (tpnt->loadaddr + tpnt->dynamic_info[DT_FINI])); + } + } #ifdef USE_CACHE |