Remove srcdir from x86 testcase "source:" lines

Alan Modra amodra@gmail.com
Fri Jul 26 05:56:35 GMT 2024


It's wrong to have ${srcdir} in run_dump_test "source:" lines, as
run_dump_test adds $srcdir/$subdir/ to the line passed to the shell
except when the source path starts with "./".  The tests work
currently because the shell expands ${srcdir} to an empty string.

	PR 31728
	* testsuite/ld-i386/code16.d: Correct "source:".
	* testsuite/ld-x86-64/code16.d: Likewise.
	* testsuite/ld-x86-64/rela.d: Likewise.

diff --git a/ld/testsuite/ld-i386/code16.d b/ld/testsuite/ld-i386/code16.d
index c44fb03b7fb..cca8e8f63c1 100644
--- a/ld/testsuite/ld-i386/code16.d
+++ b/ld/testsuite/ld-i386/code16.d
@@ -1,6 +1,6 @@
 #name: i386 R_386_PC16 reloc in 16-bit mode
 #as: --32 -mx86-used-note=no --generate-missing-build-notes=no
-#source: ${srcdir}/../../../gas/testsuite/gas/i386/code16-2.s
+#source: ../../../gas/testsuite/gas/i386/code16-2.s
 #ld: -T code16.t
 #objdump: -dw -Mi8086
 
diff --git a/ld/testsuite/ld-x86-64/code16.d b/ld/testsuite/ld-x86-64/code16.d
index 5b83681d73c..ff21913b566 100644
--- a/ld/testsuite/ld-x86-64/code16.d
+++ b/ld/testsuite/ld-x86-64/code16.d
@@ -1,6 +1,6 @@
 #name: x86-64 R_X86_64_PC16 reloc in 16-bit mode
 #as: --64 -mx86-used-note=no --generate-missing-build-notes=no
-#source: ${srcdir}/../../../gas/testsuite/gas/i386/code16-2.s
+#source: ../../../gas/testsuite/gas/i386/code16-2.s
 #ld: -T code16.t
 #objdump: -dw -Mi8086
 
diff --git a/ld/testsuite/ld-x86-64/rela.d b/ld/testsuite/ld-x86-64/rela.d
index 20bb7e35232..94bcc7fa6e4 100644
--- a/ld/testsuite/ld-x86-64/rela.d
+++ b/ld/testsuite/ld-x86-64/rela.d
@@ -1,6 +1,6 @@
 #name: x86-64 rela relocs w/ non-zero relocated fields
 #as: --64
-#source: ${srcdir}/../../../gas/testsuite/gas/i386/rela.s
+#source: ../../../gas/testsuite/gas/i386/rela.s
 #ld: -melf_x86_64
 #objdump: -sj .data
 

-- 
Alan Modra


More information about the Binutils mailing list