about summary refs log tree commit diff
path: root/elf/dl-init.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-10-18 14:28:07 +0200
committerFlorian Weimer <fweimer@redhat.com>2023-10-18 14:28:07 +0200
commit55d3dfadf84f934d84645265728fcc95b37499fd (patch)
tree08689a51b57e0ec2691388c2147fc9e3a4b4e7a2 /elf/dl-init.c
parent512e30fd56a7a6c4dcf36b3e2e6a4f28a7e4b273 (diff)
downloadglibc-55d3dfadf84f934d84645265728fcc95b37499fd.tar.gz
glibc-55d3dfadf84f934d84645265728fcc95b37499fd.tar.xz
glibc-55d3dfadf84f934d84645265728fcc95b37499fd.zip
Revert "elf: Always call destructors in reverse constructor order (bug 30785)"
This reverts commit a7e34a667585f675143563569688756f4f4a6e47.

Reason for revert: Incompatibility with existing applications.
Diffstat (limited to 'elf/dl-init.c')
-rw-r--r--elf/dl-init.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/elf/dl-init.c b/elf/dl-init.c
index ffd05b7806..ba4d2fdc85 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -21,7 +21,6 @@
 #include <ldsodefs.h>
 #include <elf-initfini.h>
 
-struct link_map *_dl_init_called_list;
 
 static void
 call_init (struct link_map *l, int argc, char **argv, char **env)
@@ -43,21 +42,6 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
      dependency.  */
   l->l_init_called = 1;
 
-  /* Help an already-running dlclose: The just-loaded object must not
-     be removed during the current pass.  (No effect if no dlclose in
-     progress.)  */
-  l->l_map_used = 1;
-
-  /* Record execution before starting any initializers.  This way, if
-     the initializers themselves call dlopen, their ELF destructors
-     will eventually be run before this object is destructed, matching
-     that their ELF constructors have run before this object was
-     constructed.  _dl_fini uses this list for audit callbacks, so
-     register objects on the list even if they do not have a
-     constructor.  */
-  l->l_init_called_next = _dl_init_called_list;
-  _dl_init_called_list = l;
-
   /* Check for object which constructors we do not run here.  */
   if (__builtin_expect (l->l_name[0], 'a') == '\0'
       && l->l_type == lt_executable)