about summary refs log tree commit diff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/Makefile1
-rw-r--r--support/support.h4
-rw-r--r--support/support_paths.c8
-rw-r--r--support/test-container.c3
4 files changed, 14 insertions, 2 deletions
diff --git a/support/Makefile b/support/Makefile
index 545bfa2727..8b4a7bf8c5 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -160,6 +160,7 @@ endif
 CFLAGS-support_paths.c = \
 		-DSRCDIR_PATH=\"`cd .. ; pwd`\" \
 		-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
+		-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
 		-DINSTDIR_PATH=\"$(prefix)\" \
 		-DLIBDIR_PATH=\"$(libdir)\"
 
diff --git a/support/support.h b/support/support.h
index d0e15bca1d..9418cd11ef 100644
--- a/support/support.h
+++ b/support/support.h
@@ -91,6 +91,10 @@ char *xstrndup (const char *, size_t);
 extern const char support_srcdir_root[];
 extern const char support_objdir_root[];
 
+/* Corresponds to the path to the runtime linker used by the testsuite,
+   e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2  */
+extern const char support_objdir_elf_ldso[];
+
 /* Corresponds to the --prefix= passed to configure.  */
 extern const char support_install_prefix[];
 /* Corresponds to the install's lib/ or lib64/ directory.  */
diff --git a/support/support_paths.c b/support/support_paths.c
index a1c22315bd..6d0beb102c 100644
--- a/support/support_paths.c
+++ b/support/support_paths.c
@@ -36,6 +36,14 @@ const char support_objdir_root[] = OBJDIR_PATH;
 # error please -DOBJDIR_PATH=something in the Makefile
 #endif
 
+#ifdef OBJDIR_ELF_LDSO_PATH
+/* Corresponds to the path to the runtime linker used by the testsuite,
+   e.g. OBJDIR_PATH/elf/ld-linux-x86-64.so.2  */
+const char support_objdir_elf_ldso[] = OBJDIR_ELF_LDSO_PATH;
+#else
+# error please -DOBJDIR_ELF_LDSO_PATH=something in the Makefile
+#endif
+
 #ifdef INSTDIR_PATH
 /* Corresponds to the --prefix= passed to configure.  */
 const char support_install_prefix[] = INSTDIR_PATH;
diff --git a/support/test-container.c b/support/test-container.c
index c56b53ed81..fbdfb4a06a 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -674,8 +674,7 @@ main (int argc, char **argv)
 	}
     }
 
-  if (strncmp (argv[1], concat (support_objdir_root, "/elf/ld-linux-", NULL),
-	       strlen (support_objdir_root) + 14) == 0)
+  if (strcmp (argv[1], support_objdir_elf_ldso) == 0)
     {
       ++argv;
       --argc;