aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-07-20 16:46:30 +0000
committerThiemo Seufer <ths@networkno.de>2006-07-20 16:46:30 +0000
commit35d3d567ccaa9db98392c3787e4d5409c13701e8 (patch)
treee90c78ea28529139751b908299140fb3ef9dd25b /ld
parent5fa2b1af8c1307e4f5dd1ad74059d815dbd2de4c (diff)
downloadgdb-35d3d567ccaa9db98392c3787e4d5409c13701e8.zip
gdb-35d3d567ccaa9db98392c3787e4d5409c13701e8.tar.gz
gdb-35d3d567ccaa9db98392c3787e4d5409c13701e8.tar.bz2
[ bfd/ChangeLog ]
* elf32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. [ gas/ChangeLog ] * config/tc-mips.c (mips_fix_adjustable): Handle BFD_RELOC_MIPS16_JMP. (tc_gen_reloc): Handle mips16 jumps to section symbol offsets. [ ld/testsuite/ChangeLog ] * ld-mips-elf/mips16-call-global-1.s, ld-mips-elf/mips16-call-global-2.s, ld-mips-elf/mips16-call-global-3.s, ld-mips-elf/mips16-call-global.d: Test linking of external mips16 jumps. * ld-mips-elf/mips-elf.exp: Run new test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp9
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-call-global-1.s12
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-call-global-2.s8
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-call-global-3.s6
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-call-global.d37
6 files changed, 80 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index ad6b44c..395ae65 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2006-07-20 Thiemo Seufer <ths@mips.com>
+
+ * ld-mips-elf/mips16-call-global-1.s,
+ ld-mips-elf/mips16-call-global-2.s,
+ ld-mips-elf/mips16-call-global-3.s, ld-mips-elf/mips16-call-global.d:
+ Test linking of external mips16 jumps.
+ * ld-mips-elf/mips-elf.exp: Run new test.
+
2006-07-19 Thiemo Seufer <ths@mips.com>
* ld-selective/selective.exp: Fix selective testcases for MIPS.
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index b5ddaef..aba416f 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -243,3 +243,12 @@ if {[istarget mips*-*-linux*]} {
run_ld_link_tests $mips_tls_tests
}
+set mips16_call_global_test {
+ {"Global calls from mips16"
+ ""
+ "-mips32r2" {mips16-call-global-1.s mips16-call-global-2.s mips16-call-global-3.s}
+ {{objdump -dr mips16-call-global.d}}
+ "mips16-call-global"}
+}
+
+run_ld_link_tests $mips16_call_global_test
diff --git a/ld/testsuite/ld-mips-elf/mips16-call-global-1.s b/ld/testsuite/ld-mips-elf/mips16-call-global-1.s
new file mode 100644
index 0000000..1e60bcc
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-call-global-1.s
@@ -0,0 +1,12 @@
+ .set mips16
+
+ .globl __start
+ .ent __start
+__start:
+ .frame $sp,24,$31
+ save 24,$31
+ jal x+8
+ jal y+8
+ restore 24,$31
+ j $31
+ .end __start
diff --git a/ld/testsuite/ld-mips-elf/mips16-call-global-2.s b/ld/testsuite/ld-mips-elf/mips16-call-global-2.s
new file mode 100644
index 0000000..bae3195
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-call-global-2.s
@@ -0,0 +1,8 @@
+ .set mips16
+
+ .globl x
+ .ent x
+ .type x,@function
+x:
+ jr $31
+ .end x
diff --git a/ld/testsuite/ld-mips-elf/mips16-call-global-3.s b/ld/testsuite/ld-mips-elf/mips16-call-global-3.s
new file mode 100644
index 0000000..e776b3d
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-call-global-3.s
@@ -0,0 +1,6 @@
+ .globl y
+ .ent y
+ .type y,@function
+y:
+ jr $31
+ .end y
diff --git a/ld/testsuite/ld-mips-elf/mips16-call-global.d b/ld/testsuite/ld-mips-elf/mips16-call-global.d
new file mode 100644
index 0000000..bd5095e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-call-global.d
@@ -0,0 +1,37 @@
+#as: -mips32r2
+#source: mips16-call-global-1.S mips16-call-global-2.S mips16-call-global-3.S
+
+.*: file format elf.*mips
+
+Disassembly of section .text:
+
+00400090 <__start>:
+ 400090: 64c3 save 24,ra
+ 400092: 1a00 002e jal 4000b8 <x\+0x8>
+ 400096: 6500 nop
+ 400098: 1e00 0032 jalx 4000c8 <y\+0x8>
+ 40009c: 6500 nop
+ 40009e: 6443 restore 24,ra
+ 4000a0: e8a0 jrc ra
+ 4000a2: 6500 nop
+ 4000a4: 6500 nop
+ 4000a6: 6500 nop
+ 4000a8: 6500 nop
+ 4000aa: 6500 nop
+ 4000ac: 6500 nop
+ 4000ae: 6500 nop
+
+004000b0 <x>:
+ 4000b0: e8a0 jrc ra
+ 4000b2: 6500 nop
+ 4000b4: 6500 nop
+ 4000b6: 6500 nop
+ 4000b8: 6500 nop
+ 4000ba: 6500 nop
+ 4000bc: 6500 nop
+ 4000be: 6500 nop
+
+004000c0 <y>:
+ 4000c0: 03e00008 jr ra
+ 4000c4: 00000000 nop
+ \.\.\.