diff options
| author | Florian Weimer <fw@deneb.enyo.de> | 2019-10-28 19:49:46 +0100 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2019-10-29 18:11:36 +0100 |
| commit | 8c59ed1f7454cba46c29ceba07322a75f9eb78ad (patch) | |
| tree | b2a6f0b4f55a39907c1e1bd8b1d2bb5658bd7b87 /elf/Makefile | |
| parent | 93e07b2f9ef6825c7165f4587d2204464c83959a (diff) | |
| download | glibc-fw/bug25112.tar.xz glibc-fw/bug25112.zip | |
Remove all loaded objects if dlopen fails [BZ #20839]fw/bug25112
Diffstat (limited to 'elf/Makefile')
| -rw-r--r-- | elf/Makefile | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile index a09b6508b3..a443050ae0 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -193,7 +193,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note \ tst-unwind-ctor tst-unwind-main tst-audit13 \ tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-tlsmodid \ - tst-dlopen-self tst-initfinilazyfail + tst-dlopen-self tst-initfinilazyfail tst-dlopenfail # reldep9 tests-internal += loadtest unload unload2 circleload1 \ neededtest neededtest2 neededtest3 neededtest4 \ @@ -282,7 +282,8 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \ tst-audit13mod1 tst-sonamemove-linkmod1 \ tst-sonamemove-runmod1 tst-sonamemove-runmod2 \ - tst-initlazyfailmod tst-finilazyfailmod + tst-initlazyfailmod tst-finilazyfailmod \ + tst-dlopenfailmod1 tst-dlopenfaillinkmod tst-dlopenfailmod2 # Most modules build with _ISOMAC defined, but those filtered out # depend on internal headers. modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\ @@ -1580,3 +1581,13 @@ LDFLAGS-tst-initlazyfailmod.so = \ -Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all LDFLAGS-tst-finilazyfailmod.so = \ -Wl,-z,lazy -Wl,--unresolved-symbols=ignore-all + +$(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. +$(objpfx)tst-dlopenfailmod1.so: \ + $(shared-thread-library) $(objpfx)tst-dlopenfaillinkmod.so +LDFLAGS-tst-dlopenfaillinkmod.so = -Wl,-soname,tst-dlopenfail-missingmod.so +$(objpfx)tst-dlopenfailmod2.so: $(shared-thread-library) |
