aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>2010-08-09 19:54:13 +0000
committerCatherine Moore <clm@redhat.com>2010-08-09 19:54:13 +0000
commit776167e8fa07df96f999a0593f1dc536c80bc1cb (patch)
treece1b0617ee4e091e0e24cdcf700bc8dba44983e8 /ld
parent33e5013ed29270c3b6c5eaf46225e66b0fb6bc2c (diff)
downloadgdb-776167e8fa07df96f999a0593f1dc536c80bc1cb.zip
gdb-776167e8fa07df96f999a0593f1dc536c80bc1cb.tar.gz
gdb-776167e8fa07df96f999a0593f1dc536c80bc1cb.tar.bz2
2010-08-09 Catherine Moore <clm@codesourcery.com>
* elfxx-mips.c (mips_elf_perform_relocation): Improve interlinking error message. 2010-08-09 Catherine Moore <clm@codesourcery.com> * ld-mips-elf/mode-change-error-1.d: New. * ld-mips-elf/mode-change-error-1a.s: New. * ld-mips-elf/mode-change-error-1b.s: New. * ld-mips-elf/mips-elf.exp: Run new test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp2
-rw-r--r--ld/testsuite/ld-mips-elf/mode-change-error-1.d5
-rw-r--r--ld/testsuite/ld-mips-elf/mode-change-error-1a.s17
-rw-r--r--ld/testsuite/ld-mips-elf/mode-change-error-1b.s18
5 files changed, 49 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f5b05fa..b5250a5 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-09 Catherine Moore <clm@codesourcery.com>
+
+ * ld-mips-elf/mode-change-error-1.d: New.
+ * ld-mips-elf/mode-change-error-1a.s: New.
+ * ld-mips-elf/mode-change-error-1b.s: New.
+ * ld-mips-elf/mips-elf.exp: Run new test.
+
2010-08-06 Alan Modra <amodra@gmail.com>
* ld-powerpc/tocopt.s, * ld-powerpc/tocopt.d: New test.
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 7b1a57b..6c283e2 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -322,6 +322,8 @@ if {$has_newabi} {
run_dump_test "jalbal"
}
+run_dump_test "mode-change-error-1"
+
run_dump_test "mips16-hilo"
if {$has_newabi} {
run_dump_test "mips16-hilo-n32"
diff --git a/ld/testsuite/ld-mips-elf/mode-change-error-1.d b/ld/testsuite/ld-mips-elf/mode-change-error-1.d
new file mode 100644
index 0000000..55e9027
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mode-change-error-1.d
@@ -0,0 +1,5 @@
+#name: Mode Change Error 1
+#source: mode-change-error-1a.s
+#source: mode-change-error-1b.s
+#ld: -e 0x8000000
+#error: .*: Direct jumps between ISA modes are not allowed; consider recompiling with interlinking enabled.
diff --git a/ld/testsuite/ld-mips-elf/mode-change-error-1a.s b/ld/testsuite/ld-mips-elf/mode-change-error-1a.s
new file mode 100644
index 0000000..44bdb1f
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mode-change-error-1a.s
@@ -0,0 +1,17 @@
+ .option pic0
+ .text
+ .align 4
+ .globl main
+ .set nomips16
+ .ent main
+ .type main, @function
+main:
+ .mask 0x80000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+
+ j doit
+ nop
+
+ .end main
+ .size main, .-main
diff --git a/ld/testsuite/ld-mips-elf/mode-change-error-1b.s b/ld/testsuite/ld-mips-elf/mode-change-error-1b.s
new file mode 100644
index 0000000..84e15d6
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mode-change-error-1b.s
@@ -0,0 +1,18 @@
+ .text
+ .align 4
+ .globl doit
+ .set mips16
+ .ent doit
+ .type doit, @function
+doit:
+ .frame $sp,0,$31
+ .mask 0x00000000,0
+ .fmask 0x00000000,0
+ sll $2,$4,1
+ sll $4,$4,3
+ .set noreorder
+ .set nomacro
+ j $31
+ addu $2,$2,$4
+ .end doit
+ .size doit, .-doit