aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog11
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2-n32.d7
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2-n64.d7
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2.d7
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2r-n32.d11
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2r-n64.d15
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-note-2r.d11
-rw-r--r--binutils/testsuite/binutils-all/mips/mips.exp15
8 files changed, 84 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b8e94d2..59e3bb3 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,16 @@
2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
+ * testsuite/binutils-all/mips/mips-note-2.d: New test.
+ * testsuite/binutils-all/mips/mips-note-2r.d: New test.
+ * testsuite/binutils-all/mips/mips-note-2-n32.d: New test.
+ * testsuite/binutils-all/mips/mips-note-2-n64.d: New test.
+ * testsuite/binutils-all/mips/mips-note-2r-n32.d: New test.
+ * testsuite/binutils-all/mips/mips-note-2r-n64.d: New test.
+ * testsuite/binutils-all/mips/mips.exp: Define `has_newabi'.
+ Run the new tests.
+
+2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
+
* testsuite/lib/utils-lib.exp (run_dump_test): Handle the `dump'
option.
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d b/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d
new file mode 100644
index 0000000..fe2066c
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2-n32.d
@@ -0,0 +1,7 @@
+#PROG: objcopy
+#readelf: --notes --wide
+#objcopy: --merge-notes
+#name: MIPS merge notes section (n32)
+#as: -n32 -mips3
+#source: ../note-2-32.s
+#dump: ../note-2-32.d
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2-n64.d b/binutils/testsuite/binutils-all/mips/mips-note-2-n64.d
new file mode 100644
index 0000000..e34b083
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2-n64.d
@@ -0,0 +1,7 @@
+#PROG: objcopy
+#readelf: --notes --wide
+#objcopy: --merge-notes
+#name: MIPS merge notes section (n64)
+#as: -64 -mips3
+#source: ../note-2-64.s
+#dump: ../note-2-64.d
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2.d b/binutils/testsuite/binutils-all/mips/mips-note-2.d
new file mode 100644
index 0000000..4bb328b
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2.d
@@ -0,0 +1,7 @@
+#PROG: objcopy
+#readelf: --notes --wide
+#objcopy: --merge-notes
+#name: MIPS merge notes section (o32)
+#as: -32
+#source: ../note-2-32.s
+#dump: ../note-2-32.d
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2r-n32.d b/binutils/testsuite/binutils-all/mips/mips-note-2r-n32.d
new file mode 100644
index 0000000..caf9972
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2r-n32.d
@@ -0,0 +1,11 @@
+#PROG: objcopy
+#readelf: --relocs
+#objcopy: --merge-notes
+#name: MIPS merge notes section relocations (n32)
+#as: -n32 -mips3
+#source: ../note-2-32.s
+
+Relocation section '\.rela\.gnu\.build\.attributes' at offset .* contains 2 entries:
+ Offset Info Type Sym\.Value Sym\. Name \+ Addend
+00000010 ......02 R_MIPS_32 00000100 note1\.s \+ 0
+0000006c ......02 R_MIPS_32 00000104 note2\.s \+ 0
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2r-n64.d b/binutils/testsuite/binutils-all/mips/mips-note-2r-n64.d
new file mode 100644
index 0000000..0fbcc39
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2r-n64.d
@@ -0,0 +1,15 @@
+#PROG: objcopy
+#readelf: --relocs
+#objcopy: --merge-notes
+#name: MIPS merge notes section relocations (n64)
+#as: -64 -mips3
+#source: ../note-2-64.s
+
+Relocation section '\.rela\.gnu\.build\.attributes' at offset .* contains 2 entries:
+ Offset Info Type Sym\. Value Sym\. Name \+ Addend
+000000000010 ....00000012 R_MIPS_64 0000000000000100 note1\.s \+ 0
+ Type2: R_MIPS_NONE
+ Type3: R_MIPS_NONE
+000000000070 ....00000012 R_MIPS_64 0000000000000104 note2\.s \+ 0
+ Type2: R_MIPS_NONE
+ Type3: R_MIPS_NONE
diff --git a/binutils/testsuite/binutils-all/mips/mips-note-2r.d b/binutils/testsuite/binutils-all/mips/mips-note-2r.d
new file mode 100644
index 0000000..c025727
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips-note-2r.d
@@ -0,0 +1,11 @@
+#PROG: objcopy
+#readelf: --relocs
+#objcopy: --merge-notes
+#name: MIPS merge notes section relocations (o32)
+#as: -32
+#source: ../note-2-32.s
+
+Relocation section '\.rel\.gnu\.build\.attributes' at offset .* contains 2 entries:
+ Offset Info Type Sym\.Value Sym\. Name
+00000010 ......02 R_MIPS_32 00000100 note1\.s
+0000006c ......02 R_MIPS_32 00000104 note2\.s
diff --git a/binutils/testsuite/binutils-all/mips/mips.exp b/binutils/testsuite/binutils-all/mips/mips.exp
index 7949445..28c2197 100644
--- a/binutils/testsuite/binutils-all/mips/mips.exp
+++ b/binutils/testsuite/binutils-all/mips/mips.exp
@@ -27,6 +27,12 @@ if [is_remote host] {
set copyfile tmpdir/copy
}
+set has_newabi [expr [istarget *-*-irix6*] \
+ || [istarget mips*-*-linux*] \
+ || [istarget mips*-sde-elf*] \
+ || [istarget mips*-mti-elf*] \
+ || [istarget mips*-img-elf*]]
+
run_dump_test "mips-ase-1"
run_dump_test "mips-ase-2"
run_dump_test "mips-ase-3"
@@ -41,3 +47,12 @@ run_dump_test "mips16-extend-insn"
run_dump_test "mips16e2-extend-insn"
run_dump_test "mips16-alias"
run_dump_test "mips16-noalias"
+
+run_dump_test "mips-note-2"
+run_dump_test "mips-note-2r"
+if $has_newabi {
+ run_dump_test "mips-note-2-n32"
+ run_dump_test "mips-note-2-n64"
+ run_dump_test "mips-note-2r-n32"
+ run_dump_test "mips-note-2r-n64"
+}