public inbox for
help / color / mirror / Atom feed
* [glibc] elf: Fix tst-nodeps2 test failure.
@ 2024-01-10 21:16 Carlos O'Donell
  0 siblings, 0 replies; only message in thread
From: Carlos O'Donell @ 2024-01-10 21:16 UTC (permalink / raw)
  To: glibc-cvs;h=94aa256a47253d2202240c8696cbe824a969d3cc

commit 94aa256a47253d2202240c8696cbe824a969d3cc
Author: Carlos O'Donell <>
Date:   Wed Jan 10 10:46:03 2024 -0500

    elf: Fix tst-nodeps2 test failure.
    After 78ca44da0160a0b442f0ca1f253e3360f044b2ec
    ("elf: Relocate early during startup and dlmopen (bug 31083)")
    we start seeing tst-nodeps2 failures when building the testsuite with
    When building the testsuite with --enable-hard-coded-path-in-tests
    the is not built with the required DT_RUNPATH
    values and the test escapes the test framework and loads the system
    libraries and aborts. The fix is to use the existing
    $(link-test-modules-rpath-link) variable to set DT_RUNPATH correctly.
    No regressions on x86_64.
    Reviewed-by: Florian Weimer <>

 elf/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/elf/Makefile b/elf/Makefile
index 600812e573..5d78b659ce 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -3022,6 +3022,8 @@ $(objpfx)tst-env-setuid: $(objpfx)
 $(objpfx)tst-env-setuid-static.out: $(objpfx)
 # The object has no explicit dependencies on
+# We do not use $(link-test-modules-rpath-link) since the object has no
 $(objpfx) $(objpfx)tst-nodeps1-mod.os
 	$(LINK.o) -nostartfiles -nostdlib -shared -o $@ $^ = yes
@@ -3032,7 +3034,8 @@ $(objpfx)tst-nodeps1: $(objpfx)
 # with the IFUNC resolver reference.
 $(objpfx) $(common-objpfx) \
   $(objpfx) $(objpfx)tst-nodeps2-mod.os
-	$(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^
+	$(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^ \
+	$(link-test-modules-rpath-link)
 $(objpfx)tst-nodeps2.out: \
   $(objpfx) $(objpfx)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-10 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 21:16 [glibc] elf: Fix tst-nodeps2 test failure Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).