aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-support.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-10-25 16:50:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-10-25 16:50:10 +0200
commit9897ced8e78db5d813166a7ccccfd5a42c69ef20 (patch)
tree9108d5467a61db2594fc4ffacbe46fd0db122ecd /elf/dl-support.c
parent4f5f8343c3af0630b72a27e8a3adaa3ed006455d (diff)
downloadglibc-9897ced8e78db5d813166a7ccccfd5a42c69ef20.tar.xz
glibc-9897ced8e78db5d813166a7ccccfd5a42c69ef20.zip
elf: Run constructors on cyclic recursive dlopen (bug 31986)
This is conceptually similar to the reported bug, but does not depend on auditing. The fix is simple: just complete execution of the constructors. This exposed the fact that the link map for statically linked executables does not have l_init_called set, even though constructors have run. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r--elf/dl-support.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 451932dd03..94e8197c63 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -99,6 +99,7 @@ static struct link_map _dl_main_map =
.l_used = 1,
.l_tls_offset = NO_TLS_OFFSET,
.l_serial = 1,
+ .l_init_called = 1,
};
/* Namespace information. */