aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ld-elf/interleave-0.d13
-rw-r--r--ld/testsuite/ld-elf/interleave-4.d13
-rw-r--r--ld/testsuite/ld-gc/all-debug-sections.d2
-rw-r--r--ld/testsuite/ld-scripts/provide-4.d2
-rw-r--r--ld/testsuite/ld-scripts/provide-5.d2
-rw-r--r--ld/testsuite/ld-scripts/provide-6.d2
-rw-r--r--ld/testsuite/ld-scripts/provide-7.d2
-rw-r--r--ld/testsuite/ld-scripts/provide-8.d2
-rw-r--r--ld/testsuite/ld-scripts/segment-start.d2
-rw-r--r--ld/testsuite/lib/ld-lib.exp13
10 files changed, 25 insertions, 28 deletions
diff --git a/ld/testsuite/ld-elf/interleave-0.d b/ld/testsuite/ld-elf/interleave-0.d
index 837223c..c497a53 100644
--- a/ld/testsuite/ld-elf/interleave-0.d
+++ b/ld/testsuite/ld-elf/interleave-0.d
@@ -1,9 +1,12 @@
#name: --interleave test byte 0
#source: interleave.s
#ld: -Tinterleave.ld
-#objcopy: --interleave=8 --interleave-width=1 --byte=0 -O verilog
+#objcopy_linked_file: --interleave=8 --interleave-width=1 --byte=0
+#objdump: -s
-@0+0
-00
-@0+2
-14
+.*: file format .*
+
+Contents of section \.a0:
+ 0+0 00 .*
+Contents of section \.a1:
+ 0+c 14 .*
diff --git a/ld/testsuite/ld-elf/interleave-4.d b/ld/testsuite/ld-elf/interleave-4.d
index a4bb808..fa104bc 100644
--- a/ld/testsuite/ld-elf/interleave-4.d
+++ b/ld/testsuite/ld-elf/interleave-4.d
@@ -1,9 +1,12 @@
#name: --interleave test byte 4
#source: interleave.s
#ld: -Tinterleave.ld
-#objcopy: --interleave=8 --interleave-width=1 --byte=4 -O verilog
+#objcopy_linked_file: --interleave=8 --interleave-width=1 --byte=4
+#objdump: -s
-@0+0
-04
-@0+1
-10
+.*: file format .*
+
+Contents of section \.a0:
+ 0+0 04 .*
+Contents of section \.a1:
+ 0+c 10 .*
diff --git a/ld/testsuite/ld-gc/all-debug-sections.d b/ld/testsuite/ld-gc/all-debug-sections.d
index 5e3373a..45ed1ba 100644
--- a/ld/testsuite/ld-gc/all-debug-sections.d
+++ b/ld/testsuite/ld-gc/all-debug-sections.d
@@ -1,7 +1,7 @@
#name: --gc-sections with multiple debug sections for a function section
#as: -gdwarf-sections
#ld: --gc-sections -e _start
-#PROG: nm
+#nm: -B
#...
[0-9a-f]+ N +debug_aranges_main
diff --git a/ld/testsuite/ld-scripts/provide-4.d b/ld/testsuite/ld-scripts/provide-4.d
index 18699f2..b77b7dc 100644
--- a/ld/testsuite/ld-scripts/provide-4.d
+++ b/ld/testsuite/ld-scripts/provide-4.d
@@ -1,6 +1,6 @@
#source: provide-2.s
#ld: -T provide-4.t
-#PROG: nm
+#nm: -B
#map: provide-4.map
#...
0+3 A baz
diff --git a/ld/testsuite/ld-scripts/provide-5.d b/ld/testsuite/ld-scripts/provide-5.d
index 2a8baec..c7f9ddb 100644
--- a/ld/testsuite/ld-scripts/provide-5.d
+++ b/ld/testsuite/ld-scripts/provide-5.d
@@ -1,6 +1,6 @@
#source: provide-5.s
#ld: -T provide-5.t
-#PROG: nm
+#nm: -B
#map: provide-5.map
#...
0+10 A foo
diff --git a/ld/testsuite/ld-scripts/provide-6.d b/ld/testsuite/ld-scripts/provide-6.d
index dd40515..fda3c2b 100644
--- a/ld/testsuite/ld-scripts/provide-6.d
+++ b/ld/testsuite/ld-scripts/provide-6.d
@@ -1,6 +1,6 @@
#source: provide-5.s
#ld: -T provide-6.t
-#PROG: nm
+#nm: -B
#xfail: x86_64-*-cygwin
#...
diff --git a/ld/testsuite/ld-scripts/provide-7.d b/ld/testsuite/ld-scripts/provide-7.d
index c524fe4..e2c9504 100644
--- a/ld/testsuite/ld-scripts/provide-7.d
+++ b/ld/testsuite/ld-scripts/provide-7.d
@@ -1,6 +1,6 @@
#source: provide-5.s
#ld: -T provide-7.t
-#PROG: nm
+#nm: -B
#...
0+10 A foo
diff --git a/ld/testsuite/ld-scripts/provide-8.d b/ld/testsuite/ld-scripts/provide-8.d
index a402937..f5abc52 100644
--- a/ld/testsuite/ld-scripts/provide-8.d
+++ b/ld/testsuite/ld-scripts/provide-8.d
@@ -1,6 +1,6 @@
#source: provide-5.s
#ld: -T provide-8.t
-#PROG: nm
+#nm: -B
#xfail: x86_64-*-cygwin mmix-*-* sh-*-pe spu-*-*
#...
diff --git a/ld/testsuite/ld-scripts/segment-start.d b/ld/testsuite/ld-scripts/segment-start.d
index fcbcfb3..fde7661 100644
--- a/ld/testsuite/ld-scripts/segment-start.d
+++ b/ld/testsuite/ld-scripts/segment-start.d
@@ -1,7 +1,7 @@
-#PROG: nm
#name: SEGMENT_START expression not absolute
#source: segment-start.s
#ld: -e 0 -u __executable_start -T segment-start.ld
+#nm: -B
#xfail: mmix-*-* pdp11-*-* powerpc-*-aix* powerpc-*-beos* rs6000-*-* sh-*-pe
#xfail: c30-*-*aout* tic30-*-*aout* c54x*-*-*coff* tic54x-*-*coff*
# XFAIL targets that are not expected to handle SEGMENT_START correctly.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 1833bdd..c1ce8ee 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -511,7 +511,6 @@ proc ld_link_defsyms {} {
# readelf: FLAGS
# objdump: FLAGS
# nm: FLAGS
-# objcopy: FLAGS
# Use the specified program to analyze the assembler or linker
# output file, and pass it FLAGS, in addition to the output name.
# Note that they are run with LC_ALL=C in the environment to give
@@ -568,7 +567,7 @@ proc ld_link_defsyms {} {
#
# error: REGEX
# An error with message matching REGEX must be emitted for the test
-# to pass. The PROG, readelf, objdump, nm and objcopy options have
+# to pass. The PROG, readelf, objdump, and nm options have
# no meaning and need not be supplied if this is present. Multiple
# "error" directives append to the expected linker error message.
#
@@ -647,7 +646,6 @@ proc run_dump_test { name {extra_options {}} } {
set opts(noskip) {}
set opts(objdump) {}
set opts(nm) {}
- set opts(objcopy) {}
set opts(readelf) {}
set opts(name) {}
set opts(PROG) {}
@@ -825,7 +823,6 @@ proc run_dump_test { name {extra_options {}} } {
switch -- $opts(PROG) {
objdump { set program objdump }
nm { set program nm }
- objcopy { set program objcopy }
readelf { set program readelf }
default
{ perror "unrecognized program option $opts(PROG) in $file.d"
@@ -834,7 +831,7 @@ proc run_dump_test { name {extra_options {}} } {
}
} else {
# Guess which program to run, by seeing which option was specified.
- foreach p {objdump objcopy nm readelf} {
+ foreach p {objdump nm readelf} {
if {$opts($p) != ""} {
if {$program != ""} {
perror "ambiguous dump program in $file.d"
@@ -1104,13 +1101,7 @@ proc run_dump_test { name {extra_options {}} } {
if { $progopts1 == "" } { set $progopts1 "-r" }
verbose "running $binary $progopts $progopts1" 3
-
- # Objcopy, unlike the other two, won't send its output to stdout,
- # so we have to run it specially.
set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
- if { $program == "objcopy" } {
- set cmd "$binary $progopts $progopts1 $objfile $dumpfile"
- }
# Ensure consistent sorting of symbols
if {[info exists env(LC_ALL)]} {