summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-07-12 15:58:13 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-07-12 15:58:13 +0000
commit4d6fffec440ca1389fa6d3246d253e384a1df981 (patch)
treee794ad901acf930ddb9725c44f551c593799cda9 /ld
parentb9d43280fefaa1192774dabca8abca95fb95ee4c (diff)
downloadbinutils-redhat-4d6fffec440ca1389fa6d3246d253e384a1df981.tar.gz
include/elf/
* mips.h (EF_MIPS_NAN2008): New macro. bfd/ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle EF_MIPS_NAN2008. (_bfd_mips_elf_print_private_bfd_data): Likewise. binutils/ * readelf.c (get_machine_flags): Handle EF_MIPS_NAN2008. gas/ * config/tc-mips.c (mips_flag_nan2008): New variable. (options): Add OPTION_NAN enum value. (md_longopts): Handle it. (md_parse_option): Likewise. (s_nan): New function. (mips_elf_final_processing): Handle EF_MIPS_NAN2008. (md_show_usage): Add -mnan. * doc/as.texinfo (Overview): Add -mnan. * doc/c-mips.texi (MIPS Opts): Document -mnan. (MIPS NaN Encodings): New node. Document .nan directive. (MIPS-Dependent): List the new node. gas/testsuite/ * gas/mips/nan-2008-1.d: New test. * gas/mips/nan-2008-2.d: New test. * gas/mips/nan-2008-3.d: New test. * gas/mips/nan-2008-4.d: New test. * gas/mips/nan-legacy-1.d: New test. * gas/mips/nan-legacy-2.d: New test. * gas/mips/nan-legacy-3.d: New test. * gas/mips/nan-legacy-4.d: New test. * gas/mips/nan-legacy-5.d: New test. * gas/mips/nan-error-1.l: New list test. * gas/mips/nan-error-2.l: New list test. * gas/mips/nan-2008-override.s: New test source. * gas/mips/nan-2008.s: New test source. * gas/mips/nan-legacy-override.s: New test source. * gas/mips/nan-legacy.s: New test source. * gas/mips/nan-error-1.s: New test source. * gas/mips/nan-error-2.s: New test source. * gas/mips/mips.exp: Run the new tests. ld/testsuite/ * ld-mips-elf/nan-2008.d: New test. * ld-mips-elf/nan-legacy.d: New test. * ld-mips-elf/nan-mixed-1.d: New test. * ld-mips-elf/nan-mixed-2.d: New test. * ld-mips-elf/nan-2008.s: New test source. * ld-mips-elf/nan-legacy.s: New test source.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp5
-rw-r--r--ld/testsuite/ld-mips-elf/nan-2008.d7
-rw-r--r--ld/testsuite/ld-mips-elf/nan-2008.s6
-rw-r--r--ld/testsuite/ld-mips-elf/nan-legacy.d8
-rw-r--r--ld/testsuite/ld-mips-elf/nan-legacy.s6
-rw-r--r--ld/testsuite/ld-mips-elf/nan-mixed-1.d5
-rw-r--r--ld/testsuite/ld-mips-elf/nan-mixed-2.d5
8 files changed, 51 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index a4635705f7..febe691042 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2013-07-12 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * ld-mips-elf/nan-2008.d: New test.
+ * ld-mips-elf/nan-legacy.d: New test.
+ * ld-mips-elf/nan-mixed-1.d: New test.
+ * ld-mips-elf/nan-mixed-2.d: New test.
+ * ld-mips-elf/nan-2008.s: New test source.
+ * ld-mips-elf/nan-legacy.s: New test source.
+
2013-07-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
* ld-aarch64/emit-relocs-309.s: Replace got_prel19 with got.
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index e0ddac9edf..24ecf956ca 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -666,6 +666,11 @@ run_dump_test "attr-gnu-4-44"
run_dump_test "attr-gnu-4-45"
run_dump_test "attr-gnu-4-51"
+run_dump_test "nan-legacy"
+run_dump_test "nan-2008"
+run_dump_test "nan-mixed-1"
+run_dump_test "nan-mixed-2"
+
if { $linux_gnu } {
run_ld_link_tests {
{"GOT and versioning 1"
diff --git a/ld/testsuite/ld-mips-elf/nan-2008.d b/ld/testsuite/ld-mips-elf/nan-2008.d
new file mode 100644
index 0000000000..aa20049f68
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-2008.d
@@ -0,0 +1,7 @@
+#source: nan-2008.s
+#source: nan-2008.s
+#ld: -r
+#objdump: -p
+
+.*:.*file format.*mips.*
+private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].*
diff --git a/ld/testsuite/ld-mips-elf/nan-2008.s b/ld/testsuite/ld-mips-elf/nan-2008.s
new file mode 100644
index 0000000000..a87cbab919
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-2008.s
@@ -0,0 +1,6 @@
+ .nan 2008
+
+# We need some section contents for the ELF header flag compatibility check
+# to trigger.
+ .data
+ .byte 0
diff --git a/ld/testsuite/ld-mips-elf/nan-legacy.d b/ld/testsuite/ld-mips-elf/nan-legacy.d
new file mode 100644
index 0000000000..081abcfd94
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-legacy.d
@@ -0,0 +1,8 @@
+#source: nan-legacy.s
+#source: nan-legacy.s
+#ld: -r
+#objdump: -p
+
+.*:.*file format.*mips.*
+#failif
+private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].*
diff --git a/ld/testsuite/ld-mips-elf/nan-legacy.s b/ld/testsuite/ld-mips-elf/nan-legacy.s
new file mode 100644
index 0000000000..b0c0c6760e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-legacy.s
@@ -0,0 +1,6 @@
+ .nan legacy
+
+# We need some section contents for the ELF header flag compatibility check
+# to trigger.
+ .data
+ .byte 0
diff --git a/ld/testsuite/ld-mips-elf/nan-mixed-1.d b/ld/testsuite/ld-mips-elf/nan-mixed-1.d
new file mode 100644
index 0000000000..9bc524c555
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-mixed-1.d
@@ -0,0 +1,5 @@
+#source: nan-legacy.s
+#source: nan-2008.s
+#ld: -r
+#error: \A[^\n]*: [^\n]* linking -mnan=2008 module with previous -mnan=legacy modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z
diff --git a/ld/testsuite/ld-mips-elf/nan-mixed-2.d b/ld/testsuite/ld-mips-elf/nan-mixed-2.d
new file mode 100644
index 0000000000..388d770966
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/nan-mixed-2.d
@@ -0,0 +1,5 @@
+#source: nan-2008.s
+#source: nan-legacy.s
+#ld: -r
+#error: \A[^\n]*: [^\n]* linking -mnan=legacy module with previous -mnan=2008 modules\n
+#error: [^\n]*: failed to merge target specific data of file [^\n]*\.o\Z