]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf/tst-dlopenfail: Disable --no-as-needed for tst-dlopenfailmod1.so
authorFlorian Weimer <fweimer@redhat.com>
Mon, 2 Dec 2019 13:53:16 +0000 (14:53 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 2 Dec 2019 13:54:38 +0000 (14:54 +0100)
Otherwise, the shared object dependency which triggers the load
failure is dropped, invalidating the test.

elf/Makefile

index 305bed2d38ef9f0305570a5dfe85122f99ef9dbf..f7adebec880ed470baf17e7147d4f3c87773f0e5 100644 (file)
@@ -1602,8 +1602,11 @@ LDFLAGS-tst-finilazyfailmod.so = \
 $(objpfx)tst-dlopenfail: $(libdl)
 $(objpfx)tst-dlopenfail.out: \
   $(objpfx)tst-dlopenfailmod1.so $(objpfx)tst-dlopenfailmod2.so
-# Order matters here.  tst-dlopenfaillinkmod.so's soname ensures
-# a run-time loader failure.
+# Order matters here.  tst-dlopenfaillinkmod.so's soname ensures a
+# run-time loader failure.  --as-needed breaks this test because
+# nothing actually references tst-dlopenfailmod2.so (with its soname
+# tst-dlopenfail-missingmod.so).
+LDFLAGS-tst-dlopenfailmod1.so = -Wl,--no-as-needed
 $(objpfx)tst-dlopenfailmod1.so: \
   $(shared-thread-library) $(objpfx)tst-dlopenfaillinkmod.so
 LDFLAGS-tst-dlopenfaillinkmod.so = -Wl,-soname,tst-dlopenfail-missingmod.so