elf/tst-dlopenfail: Disable --no-as-needed for tst-dlopenfailmod1.so

Otherwise, the shared object dependency which triggers the load
failure is dropped, invalidating the test.
This commit is contained in:
Florian Weimer 2019-12-02 14:53:16 +01:00
parent dd67928700
commit 61a7c9df71

View 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