aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
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/Makefile
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/Makefile')
-rw-r--r--elf/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 09d77093a7..f3b453dd54 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -414,6 +414,7 @@ tests += \
tst-dlmopen1 \
tst-dlmopen3 \
tst-dlmopen4 \
+ tst-dlopen-recurse \
tst-dlopen-self \
tst-dlopen-tlsmodid \
tst-dlopen-tlsreinit1 \
@@ -865,6 +866,8 @@ modules-names += \
tst-dlmopen-twice-mod1 \
tst-dlmopen-twice-mod2 \
tst-dlmopen1mod \
+ tst-dlopen-recursemod1 \
+ tst-dlopen-recursemod2 \
tst-dlopen-tlsreinitmod1 \
tst-dlopen-tlsreinitmod2 \
tst-dlopen-tlsreinitmod3 \
@@ -3153,3 +3156,6 @@ $(objpfx)tst-dlopen-tlsreinit3.out: $(objpfx)tst-auditmod1.so
tst-dlopen-tlsreinit3-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
$(objpfx)tst-dlopen-tlsreinit4.out: $(objpfx)tst-auditmod1.so
tst-dlopen-tlsreinit4-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so
+
+$(objpfx)tst-dlopen-recurse.out: $(objpfx)tst-dlopen-recursemod1.so
+$(objpfx)tst-dlopen-recursemod1.so: $(objpfx)tst-dlopen-recursemod2.so