aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/m68k/all.exp1
-rw-r--r--gas/testsuite/gas/m68k/p3041.d39
-rw-r--r--gas/testsuite/gas/m68k/p3041.s27
-rw-r--r--gas/testsuite/gas/m68k/p3041data.d28
-rw-r--r--gas/testsuite/gas/m68k/p3041data.s27
6 files changed, 119 insertions, 12 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a7cadf0..4a093bf 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-13 Vincent Riviere <vincent.riviere@freesbee.fr>
+
+ PR gas/3041
+ * gas/m68k/all.exp: Added "p3041data".
+ * gas/m68k/p3041.d, gas/m68k/p3041.s: Added tests of weak references
+ from text section to all possible sections.
+ * gas/m68k/p3041data.d, gas/m68k/p3041data.s: New test. Check weak
+ references from data section.
+
2009-10-08 H.J. Lu <hongjiu.lu@intel.com>
PR gas/10704
diff --git a/gas/testsuite/gas/m68k/all.exp b/gas/testsuite/gas/m68k/all.exp
index 9cb9c2c..4a93561 100644
--- a/gas/testsuite/gas/m68k/all.exp
+++ b/gas/testsuite/gas/m68k/all.exp
@@ -71,6 +71,7 @@ if { [istarget m68*-*-*] || [istarget fido*-*-*] } then {
if { [istarget *-*-netbsd] } then {
run_dump_test p3041
+ run_dump_test p3041data
}
set testname "68000 operands"
diff --git a/gas/testsuite/gas/m68k/p3041.d b/gas/testsuite/gas/m68k/p3041.d
index b4a41c4..f05648e 100644
--- a/gas/testsuite/gas/m68k/p3041.d
+++ b/gas/testsuite/gas/m68k/p3041.d
@@ -1,15 +1,36 @@
#name: PR 3041
-#objdump: -dr
+#objdump: -tdr
.*: file format .*
-Disassembly of section .text:
+SYMBOL TABLE:
+00000036 w \.text 0000 00 0f mytext
+0000003e w \.data 0000 00 10 mydata
+0000004a w \.bss 0000 00 11 mybss
-0+ <.*>:
- 0: 4ef9 0000 0002 [ ]+jmp 2 <mylabel-0x6>
- 2: .* mylabel
- 6: 4e71 [ ]+nop
+Disassembly of section \.text:
-0+8 <mylabel>:
- 8: 4e71 [ ]+nop
- a: 4e71 [ ]+nop
+00000000 <.*>:
+ 0: 41f9 0000 0000 lea 0 <.*>,%a0
+ 2: 32 mytext
+ 6: 41f9 0000 0002 lea 2 <.*>,%a0
+ 8: 32 mytext
+ c: 41f9 ffff fffc lea fffffffc <.*>,%a0
+ e: 32 mytext
+ 12: 41f9 0000 0000 lea 0 <.*>,%a0
+ 14: 32 mydata
+ 18: 41f9 0000 0003 lea 3 <.*>,%a0
+ 1a: 32 mydata
+ 1e: 41f9 ffff ffff lea ffffffff <.*>,%a0
+ 20: 32 mydata
+ 24: 41f9 0000 0000 lea 0 <.*>,%a0
+ 26: 32 mybss
+ 2a: 41f9 0000 0001 lea 1 <.*>,%a0
+ 2c: 32 mybss
+ 30: 41f9 ffff fffe lea fffffffe <.*>,%a0
+ 32: 32 mybss
+
+00000036 <mytext>:
+ 36: 4e71 nop
+ 38: 4e71 nop
+ 3a: 4e71 nop
diff --git a/gas/testsuite/gas/m68k/p3041.s b/gas/testsuite/gas/m68k/p3041.s
index 96a8910..4114216 100644
--- a/gas/testsuite/gas/m68k/p3041.s
+++ b/gas/testsuite/gas/m68k/p3041.s
@@ -1,6 +1,27 @@
- jmp mylabel+2
+ lea mytext,%a0
+ lea mytext+2,%a0
+ lea mytext-4,%a0
+ lea mydata,%a0
+ lea mydata+3,%a0
+ lea mydata-1,%a0
+ lea mybss,%a0
+ lea mybss+1,%a0
+ lea mybss-2,%a0
+ .weak mytext
+mytext:
nop
- .weak mylabel
-mylabel:
nop
nop
+
+ .data
+ .word 0x8081
+ .weak mydata
+mydata:
+ .word 0x8283
+ .word 0x8485
+
+ .bss
+ .skip 6
+ .weak mybss
+mybss:
+ .skip 2
diff --git a/gas/testsuite/gas/m68k/p3041data.d b/gas/testsuite/gas/m68k/p3041data.d
new file mode 100644
index 0000000..91b2895
--- /dev/null
+++ b/gas/testsuite/gas/m68k/p3041data.d
@@ -0,0 +1,28 @@
+#name: PR 3041 data
+#objdump: -trs
+
+.*: file format .*
+
+SYMBOL TABLE:
+00000006 w \.text 0000 00 0f mytext
+00000014 w \.data 0000 00 10 mydata
+00000040 w \.bss 0000 00 11 mybss
+
+RELOCATION RECORDS FOR \[\.data\]:
+OFFSET TYPE VALUE
+00000004 32 mytext
+00000008 32 mytext
+0000000c 32 mytext
+00000010 32 mydata
+00000014 32 mydata
+00000018 32 mydata
+0000001c 32 mybss
+00000020 32 mybss
+00000024 32 mybss
+
+Contents of section .text:
+ 0000 4e714e71 4e714e71 .*
+Contents of section .data:
+ 0008 12345678 00000000 00000001 fffffffd .*
+ 0018 00000000 00000003 fffffffe 00000000 .*
+ 0028 00000002 ffffffff .*
diff --git a/gas/testsuite/gas/m68k/p3041data.s b/gas/testsuite/gas/m68k/p3041data.s
new file mode 100644
index 0000000..73cbc39
--- /dev/null
+++ b/gas/testsuite/gas/m68k/p3041data.s
@@ -0,0 +1,27 @@
+ .text
+ nop
+ nop
+ nop
+ .weak mytext
+mytext:
+ nop
+
+ .data
+ .long 0x12345678
+ .long mytext
+ .long mytext+1
+ .weak mydata
+mydata:
+ .long mytext-3
+ .long mydata
+ .long mydata+3
+ .long mydata-2
+ .long mybss
+ .long mybss+2
+ .long mybss-1
+
+ .bss
+ .skip 16
+ .weak mybss
+mybss:
+ .word 1