diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-10-15 10:44:49 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-01-04 04:56:08 -0800 |
commit | bfb5ed5df3dd4d9507b4922248dc445b690d19c0 (patch) | |
tree | 844dc10ce1770a0d44c8d372e021d3053c2e7f43 /elf/Makefile | |
parent | 7ac2bee49540b87e6e1c309e23ea170b0fa6e5df (diff) | |
download | glibc-bfb5ed5df3dd4d9507b4922248dc445b690d19c0.zip glibc-bfb5ed5df3dd4d9507b4922248dc445b690d19c0.tar.gz glibc-bfb5ed5df3dd4d9507b4922248dc445b690d19c0.tar.bz2 |
elf: Also try DT_RUNPATH for LD_AUDIT dlopen [BZ #28455]
DT_RUNPATH is only used to find the immediate dependencies of the
executable or shared object containing the DT_RUNPATH entry. Update
LD_AUDIT dlopen call to try the DT_RUNPATH entry of the executable.
Add tst-audit14a, which is copied from tst-audit14, to DT_RUNPATH and
build tst-audit14 with -Wl,--disable-new-dtags to test DT_RPATH.
This partially fixes BZ #28455.
Diffstat (limited to 'elf/Makefile')
-rw-r--r-- | elf/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/elf/Makefile b/elf/Makefile index d6b33fe..8eb7e6e 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -353,10 +353,10 @@ ifneq ($(selinux-enabled),1) tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog endif ifeq ($(have-depaudit),yes) -tests += tst-audit14 tst-audit15 tst-audit16 +tests += tst-audit14 tst-audit15 tst-audit16 tst-audit14a ifeq ($(run-built-tests),yes) tests-special += $(objpfx)tst-audit14-cmp.out $(objpfx)tst-audit15-cmp.out \ - $(objpfx)tst-audit16-cmp.out + $(objpfx)tst-audit16-cmp.out $(objpfx)tst-audit14a-cmp.out endif endif endif @@ -1825,9 +1825,11 @@ $(objpfx)tst-auditmany.out: $(objpfx)tst-auditmanymod1.so \ tst-auditmany-ENV = \ LD_AUDIT=tst-auditmanymod1.so:tst-auditmanymod2.so:tst-auditmanymod3.so:tst-auditmanymod4.so:tst-auditmanymod5.so:tst-auditmanymod6.so:tst-auditmanymod7.so:tst-auditmanymod8.so:tst-auditmanymod9.so -LDFLAGS-tst-audit14 = -Wl,--audit=tst-auditlogmod-1.so +LDFLAGS-tst-audit14 = -Wl,--audit=tst-auditlogmod-1.so,--disable-new-dtags $(objpfx)tst-auditlogmod-1.so: $(libsupport) $(objpfx)tst-audit14.out: $(objpfx)tst-auditlogmod-1.so +LDFLAGS-tst-audit14a = -Wl,--audit=tst-auditlogmod-1.so,--enable-new-dtags +$(objpfx)tst-audit14a.out: $(objpfx)tst-auditlogmod-1.so LDFLAGS-tst-audit15 = \ -Wl,--audit=tst-auditlogmod-1.so,--depaudit=tst-auditlogmod-2.so $(objpfx)tst-auditlogmod-2.so: $(libsupport) @@ -1854,6 +1856,9 @@ tst-audit17-ENV = LD_AUDIT=$(objpfx)tst-auditmod17.so $(objpfx)tst-audit14-cmp.out: tst-audit14.exp $(objpfx)tst-audit14.out cmp $^ > $@; \ $(evaluate-test) +$(objpfx)tst-audit14a-cmp.out: tst-audit14.exp $(objpfx)tst-audit14a.out + cmp $^ > $@; \ + $(evaluate-test) $(objpfx)tst-audit15-cmp.out: tst-audit15.exp $(objpfx)tst-audit15.out cmp $^ > $@; \ $(evaluate-test) |