aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog12
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp24
-rw-r--r--binutils/testsuite/binutils-all/strip-13.d9
-rw-r--r--binutils/testsuite/binutils-all/strip-13mips64.s14
-rw-r--r--binutils/testsuite/binutils-all/strip-13rel.s10
-rw-r--r--binutils/testsuite/binutils-all/strip-13rela.s (renamed from binutils/testsuite/binutils-all/strip-13.s)0
6 files changed, 64 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 23598a0..8ca9db4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,17 @@
2018-04-05 Maciej W. Rozycki <macro@mips.com>
+ * testsuite/binutils-all/strip-13.s: Rename to...
+ * testsuite/binutils-all/strip-13rela.s: ... this.
+ * testsuite/binutils-all/strip-13rel.s: New test source.
+ * testsuite/binutils-all/strip-13mips64.s: New test source.
+ * testsuite/binutils-all/strip-13.d: Remove `arm-*', `d10v-*',
+ `dlx-*' and `xgate-*' from `not-target' list. Add `m6811-*' and
+ `m68hc11-*' to `not-target' list.
+ * testsuite/binutils-all/objcopy.exp: Switch between sources for
+ `strip-13'.
+
+2018-04-05 Maciej W. Rozycki <macro@mips.com>
+
* testsuite/binutils-all/strip-13.s: Use 143 (0x8f) rather than
241 (0xf1) for the relocation number and RELA addend.
* testsuite/binutils-all/strip-13.d: Remove `hppa*-*' from the
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index f7b811c..0639fe5 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1084,7 +1084,29 @@ if [is_elf_format] {
run_dump_test "strip-8"
run_dump_test "strip-9"
run_dump_test "strip-12"
- run_dump_test "strip-13"
+
+ if { [istarget "mips64*-*-openbsd*"] } {
+ set reloc_format mips64
+ } elseif { [istarget "arm-*"] \
+ || [istarget "d10v-*"] \
+ || [istarget "dlx-*"] \
+ || [istarget "i*86-*"] \
+ || [istarget "i960-*"] \
+ || [istarget "m681*-*"] \
+ || [istarget "m68hc1*-*"] \
+ || ([istarget "mips*-*"] \
+ && ![istarget "mips64*-ps2-elf*"] \
+ && ![istarget "*-*-irix6*"] \
+ && ![istarget "mips64*-*-freebsd*"] \
+ && ![istarget "mips64*-*-kfreebsd*-gnu"] \
+ && ![istarget "mips64*-*-linux*"]) \
+ || [istarget "score*-*"] \
+ || [istarget "xgate-*"] } {
+ set reloc_format rel
+ } else {
+ set reloc_format rela
+ }
+ run_dump_test "strip-13" [list [list source strip-13${reloc_format}.s]]
# This requires STB_GNU_UNIQUE support with OSABI set to GNU.
if { [supports_gnu_unique] } {
diff --git a/binutils/testsuite/binutils-all/strip-13.d b/binutils/testsuite/binutils-all/strip-13.d
index 48549c7..5069b2c 100644
--- a/binutils/testsuite/binutils-all/strip-13.d
+++ b/binutils/testsuite/binutils-all/strip-13.d
@@ -1,8 +1,9 @@
#PROG: strip
#strip: -g
#error: .* bad value
-#not-target: arm-* d10v-* dlx-* h8300-* ip2k-* rx-* xgate-*
-# The D10V, DLX and XGATE targets only support REL relocations but this test uses RELA relocations.
-# The ARM target does support both types, but defaults to REL.
-# The H8300-*, IP2K and RX targets do not complain about unrecognised relocs, unless they are actually used
+#not-target: h8300-* ip2k-* m6811-* m68hc11-* rx-*
+# The H8300-*, IP2K and 68HC11 targets use 16-bit addressing, so `.dc.a'
+# does not work for manual relocation data construction.
+# The RX targets do not complain about unrecognised relocs, unless they
+# are actually used
# (which is what should really happen with the other targets...)
diff --git a/binutils/testsuite/binutils-all/strip-13mips64.s b/binutils/testsuite/binutils-all/strip-13mips64.s
new file mode 100644
index 0000000..36323e0
--- /dev/null
+++ b/binutils/testsuite/binutils-all/strip-13mips64.s
@@ -0,0 +1,14 @@
+ .text
+foo:
+ .dc.l 0x12345678
+
+ .section .rela.text
+ .dc.a 0
+ .dc.l 0
+ .dc.b 0, 0, 0, 0x8f
+ .dc.a 0x0000008f
+
+ .dc.a 0
+ .dc.w 0
+ .dc.b 0, 0, 0, 0
+ .dc.a 0
diff --git a/binutils/testsuite/binutils-all/strip-13rel.s b/binutils/testsuite/binutils-all/strip-13rel.s
new file mode 100644
index 0000000..de7eae1
--- /dev/null
+++ b/binutils/testsuite/binutils-all/strip-13rel.s
@@ -0,0 +1,10 @@
+ .text
+foo:
+ .dc.l 0x12345678
+
+ .section .rel.text
+ .dc.a 0
+ .dc.a 0x0000008f
+
+ .dc.a 0
+ .dc.a 0
diff --git a/binutils/testsuite/binutils-all/strip-13.s b/binutils/testsuite/binutils-all/strip-13rela.s
index 886c0ee..886c0ee 100644
--- a/binutils/testsuite/binutils-all/strip-13.s
+++ b/binutils/testsuite/binutils-all/strip-13rela.s