aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-05-15 04:23:50 +0000
committerAlan Modra <amodra@gmail.com>2007-05-15 04:23:50 +0000
commitb8b6abe0f8baa8504e3a401bef70bbf2676ca696 (patch)
tree2207e76f833266d169fde5799dcaeaa066e8e63b /binutils
parent9beff6903b47f27bc3bb67a2e3d9a6cdf67bf2f9 (diff)
downloadgdb-b8b6abe0f8baa8504e3a401bef70bbf2676ca696.zip
gdb-b8b6abe0f8baa8504e3a401bef70bbf2676ca696.tar.gz
gdb-b8b6abe0f8baa8504e3a401bef70bbf2676ca696.tar.bz2
* binutils-all/objcopy.exp: Only run needed-by-reloc test for ELF.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp33
2 files changed, 21 insertions, 16 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 6fce5bd..c911420 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-05-15 Alan Modra <amodra@bigpond.net.au>
+
+ * binutils-all/objcopy.exp: Only run needed-by-reloc test for ELF.
+
2007-05-11 Alan Modra <amodra@bigpond.net.au>
* binutils-all/needed-by-reloc.s: Use .long rather than .4byte.
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 10cc86f..72338df 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -775,28 +775,29 @@ run_dump_test "copy-2"
run_dump_test "copy-3"
if [is_elf_format] {
- run_dump_test "localize-hidden-1"
run_dump_test "strip-1"
run_dump_test "strip-2"
run_dump_test "strip-3"
-}
-run_dump_test "localize-hidden-2"
-if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
- # Check to make sure we don't strip a symbol named in relocations.
- set test "objcopy doesn't strip needed symbols"
+ if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
+ # Check to make sure we don't strip a symbol named in relocations.
+ set test "objcopy keeps symbols needed by relocs"
- set srcfile $srcdir/$subdir/needed-by-reloc.s
+ set srcfile $srcdir/$subdir/needed-by-reloc.s
- if {![binutils_assemble $srcfile tmpdir/bintest.o]} then {
- unresolved $test
- } else {
- set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"]
+ if {![binutils_assemble $srcfile tmpdir/bintest.o]} then {
+ unresolved $test
+ } else {
+ set got [binutils_run $OBJCOPY "$OBJCOPYFLAGS --strip-symbol=foo tmpdir/bintest.o ${copyfile}.o"]
- if [regexp "not stripping symbol `foo' because it is named in a relocation" $got] {
- pass $test
- } else {
- fail $test
- }
+ if [regexp "not stripping symbol `foo' because it is named in a relocation" $got] {
+ pass $test
+ } else {
+ fail $test
+ }
+ }
}
+
+ run_dump_test "localize-hidden-1"
}
+run_dump_test "localize-hidden-2"