Browse Source

libdl: remove LDSO_NO_CLEANUP

Waldemar Brodkorb 6 years ago
parent
commit
0c8cc6e7eb
3 changed files with 0 additions and 28 deletions
  1. 0 11
      extra/Configs/Config.in
  2. 0 4
      ldso/libdl/Makefile.in
  3. 0 13
      ldso/libdl/libdl.c

+ 0 - 11
extra/Configs/Config.in

@@ -470,17 +470,6 @@ config LDSO_LD_LIBRARY_PATH
 
 	  If unsure, simply say Y here.
 
-config LDSO_NO_CLEANUP
-	bool "Disable automatic unloading of dynamically loaded shared objects"
-	depends on HAVE_SHARED
-	help
-	  If you need complete allocation traces when debugging memory leaks
-	  using Valgrind in a process that dynamically loads shared objects,
-	  then answer Y here. Unlike glibc, uClibc unloads all dynamically
-	  loaded shared objects when a process exits, which prevents Valgrind
-	  from correctly resolving the symbols from the unloaded shared objects.
-	  Unless you know you need this, you should answer N.
-
 config UCLIBC_CTOR_DTOR
 	bool
 	default y

+ 0 - 4
ldso/libdl/Makefile.in

@@ -20,10 +20,6 @@ CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
 LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3
 LDFLAGS-libdl.so := $(LDFLAGS)
 
-ifeq ($(LDSO_NO_CLEANUP),)
-LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup
-endif
-
 LIBS-libdl.so := $(LIBS) $(ldso)
 
 libdl_DIR := $(top_srcdir)ldso/libdl

+ 0 - 13
ldso/libdl/libdl.c

@@ -270,19 +270,6 @@ remove_slotinfo(size_t idx, struct dtv_slotinfo_list *listp, size_t disp,
 }
 #endif
 
-#ifndef __LDSO_NO_CLEANUP__
-void dl_cleanup(void) attribute_hidden __attribute__ ((destructor));
-void dl_cleanup(void)
-{
-	struct dyn_elf *h, *n;
-
-	for (h = _dl_handles; h; h = n) {
-		n = h->next_handle;
-		do_dlclose(h, 1);
-	}
-}
-#endif
-
 static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list,
 	struct elf_resolve *map)
 {