This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] Fix MIPS16 global calls failures
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: binutils at sourceware dot org
- Date: Sun, 13 May 2012 10:55:32 +0100
- Subject: [committed] Fix MIPS16 global calls failures
For this one I think we should use a linker script to get consistent
addresses, like we do for several other tests.
Also added alignment directives to make the alignment consistent.
Tested on various MIPS targets and applied.
Richard
ld/testsuite/
* ld-mips-elf/mips-elf.exp (mips16_call_global_test): Use the
no-shared-1.ld linker script.
* ld-mips-elf/mips16-call-global-1.s: Add alignment directive.
* ld-mips-elf/mips16-call-global-2.s: Likewise.
* ld-mips-elf/mips16-call-global-3.s: Likewise.
* ld-mips-elf/mips16-call-global.d: Use 50000 as the base address.
Index: ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- ld/testsuite/ld-mips-elf/mips-elf.exp 2011-07-24 15:16:46.000000000 +0100
+++ ld/testsuite/ld-mips-elf/mips-elf.exp 2012-05-13 08:50:28.630700888 +0100
@@ -503,7 +503,7 @@ if {[istarget mips*-*-linux*]} {
set mips16_call_global_test [list \
[list "Global calls from mips16" \
- "$o32_ld_flags" \
+ "$o32_ld_flags -T no-shared-1.ld" \
"$o32_as_flags -mips32r2" \
{mips16-call-global-1.s mips16-call-global-2.s mips16-call-global-3.s} \
{{objdump -dr mips16-call-global.d}} \
Index: ld/testsuite/ld-mips-elf/mips16-call-global-1.s
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-call-global-1.s 2006-07-20 17:46:29.000000000 +0100
+++ ld/testsuite/ld-mips-elf/mips16-call-global-1.s 2012-05-13 08:53:42.116700412 +0100
@@ -2,6 +2,7 @@
.globl __start
.ent __start
+ .align 4
__start:
.frame $sp,24,$31
save 24,$31
Index: ld/testsuite/ld-mips-elf/mips16-call-global-2.s
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-call-global-2.s 2006-07-25 17:45:55.000000000 +0100
+++ ld/testsuite/ld-mips-elf/mips16-call-global-2.s 2012-05-13 08:53:51.413700390 +0100
@@ -3,6 +3,7 @@
.globl x
.ent x
.type x,@function
+ .align 4
x:
jr $31
.end x
Index: ld/testsuite/ld-mips-elf/mips16-call-global-3.s
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-call-global-3.s 2006-07-25 17:45:55.000000000 +0100
+++ ld/testsuite/ld-mips-elf/mips16-call-global-3.s 2012-05-13 08:57:35.717699847 +0100
@@ -3,6 +3,7 @@
.globl y
.ent y
.type y,@function
+ .align 4
y:
jr $31
.end y
Index: ld/testsuite/ld-mips-elf/mips16-call-global.d
===================================================================
--- ld/testsuite/ld-mips-elf/mips16-call-global.d 2010-12-31 10:58:49.000000000 +0000
+++ ld/testsuite/ld-mips-elf/mips16-call-global.d 2012-05-13 08:56:44.796699963 +0100
@@ -3,37 +3,37 @@
Disassembly of section .text:
-.*0090 <__start>:
-.*0090: 64c3 save 24,ra
-.*0092: 1a00 002e jal .*00b8 <x\+0x8>
-.*0096: 6500 nop
-.*0098: 1e00 0032 jalx .*00c8 <z>
-.*009c: 6500 nop
-.*009e: 6443 restore 24,ra
-.*00a0: e8a0 jrc ra
-.*00a2: 6500 nop
-.*00a4: 6500 nop
-.*00a6: 6500 nop
-.*00a8: 6500 nop
-.*00aa: 6500 nop
-.*00ac: 6500 nop
-.*00ae: 6500 nop
+0*50000 <__start>:
+ *50000: 64c3 save 24,ra
+ *50002: 1820 400a jal 50028 <x\+0x8>
+ *50006: 6500 nop
+ *50008: 1c20 400e jalx 50038 <z>
+ *5000c: 6500 nop
+ *5000e: 6443 restore 24,ra
+ *50010: e8a0 jrc ra
+ *50012: 6500 nop
+ *50014: 6500 nop
+ *50016: 6500 nop
+ *50018: 6500 nop
+ *5001a: 6500 nop
+ *5001c: 6500 nop
+ *5001e: 6500 nop
-.*00b0 <x>:
-.*00b0: e8a0 jrc ra
-.*00b2: 6500 nop
-.*00b4: 6500 nop
-.*00b6: 6500 nop
-.*00b8: 6500 nop
-.*00ba: 6500 nop
-.*00bc: 6500 nop
-.*00be: 6500 nop
+0*50020 <x>:
+ *50020: e8a0 jrc ra
+ *50022: 6500 nop
+ *50024: 6500 nop
+ *50026: 6500 nop
+ *50028: 6500 nop
+ *5002a: 6500 nop
+ *5002c: 6500 nop
+ *5002e: 6500 nop
-.*00c0 <y>:
-.*00c0: 03e00008 jr ra
-.*00c4: 00000000 nop
+0*50030 <y>:
+ *50030: 03e00008 jr ra
+ *50034: 00000000 nop
-.*00c8 <z>:
-.*00c8: 03e00008 jr ra
-.*00cc: 00000000 nop
+0*50038 <z>:
+ *50038: 03e00008 jr ra
+ *5003c: 00000000 nop
\.\.\.