aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2005-07-08 03:53:12 +0000
committerHans-Peter Nilsson <hp@axis.com>2005-07-08 03:53:12 +0000
commit3352f82b97d3c5d9fe4899f10f53432412433a51 (patch)
treee228d139cbe20d13139603557f7264f2f630160a
parent29ef70053f959e79ee068480e53ff9c490b891b3 (diff)
downloadgdb-3352f82b97d3c5d9fe4899f10f53432412433a51.zip
gdb-3352f82b97d3c5d9fe4899f10f53432412433a51.tar.gz
gdb-3352f82b97d3c5d9fe4899f10f53432412433a51.tar.bz2
PR gas/1049
* gas/cris/rd-pic-2.d, gas/cris/rd-pic-2.s: New test. * gas/cris/rd-abs32-1.d: Tweak for not emitting reloc-related garbage for global symbols.
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/cris/rd-abs32-1.d12
-rw-r--r--gas/testsuite/gas/cris/rd-pic-2.d19
-rw-r--r--gas/testsuite/gas/cris/rd-pic-2.s11
4 files changed, 43 insertions, 6 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 71ad483..5e3a1f0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-08 Hans-Peter Nilsson <hp@axis.com>
+
+ PR gas/1049
+ * gas/cris/rd-pic-2.d, gas/cris/rd-pic-2.s: New test.
+ * gas/cris/rd-abs32-1.d: Tweak for not emitting reloc-related
+ garbage for global symbols.
+
2005-07-07 Nick Clifton <nickc@redhat.com>
* gas/arm/vfp1xD.d: Adjust expected fadds disassemblies now that
diff --git a/gas/testsuite/gas/cris/rd-abs32-1.d b/gas/testsuite/gas/cris/rd-abs32-1.d
index 4e02f39..aee95ff 100644
--- a/gas/testsuite/gas/cris/rd-abs32-1.d
+++ b/gas/testsuite/gas/cris/rd-abs32-1.d
@@ -16,9 +16,9 @@ Disassembly of section \.text:
2: 0f05 nop
4: 3f0d 0200 0000 jump 2 <locsym2>
6: R_CRIS_32 \.text\+0x2
- a: 3f0d 0200 0000 jump 2 <locsym2>
+ a: 3f0d 0000 0000 jump 0 <locsym2-0x2>
c: R_CRIS_32 locsym2
- 10: 3f0d 7400 0000 jump 74 <locsym3>
+ 10: 3f0d 0000 0000 jump 0 <locsym2-0x2>
12: R_CRIS_32 locsym3
16: 3f0d 7400 0000 jump 74 <locsym3>
18: R_CRIS_32 \.text\+0x74
@@ -26,9 +26,9 @@ Disassembly of section \.text:
1e: R_CRIS_32 extsym
22: 3fbd 0200 0000 jsr 2 <locsym2>
24: R_CRIS_32 \.text\+0x2
- 28: 3fbd 0200 0000 jsr 2 <locsym2>
+ 28: 3fbd 0000 0000 jsr 0 <locsym2-0x2>
2a: R_CRIS_32 locsym2
- 2e: 3fbd 7400 0000 jsr 74 <locsym3>
+ 2e: 3fbd 0000 0000 jsr 0 <locsym2-0x2>
30: R_CRIS_32 locsym3
34: 3fbd 7400 0000 jsr 74 <locsym3>
36: R_CRIS_32 \.text\+0x74
@@ -38,11 +38,11 @@ Disassembly of section \.text:
42: R_CRIS_32 \.text\+0x2
46: 0000 bcc \.\+2
48: 0000 bcc \.\+2
- 4a: 3f3d 0200 0000 jsrc 2 <locsym2>
+ 4a: 3f3d 0000 0000 jsrc 0 <locsym2-0x2>
4c: R_CRIS_32 locsym2
50: 0000 bcc \.\+2
52: 0000 bcc \.\+2
- 54: 3f3d 7400 0000 jsrc 74 <locsym3>
+ 54: 3f3d 0000 0000 jsrc 0 <locsym2-0x2>
56: R_CRIS_32 locsym3
5a: 0000 bcc \.\+2
5c: 0000 bcc \.\+2
diff --git a/gas/testsuite/gas/cris/rd-pic-2.d b/gas/testsuite/gas/cris/rd-pic-2.d
new file mode 100644
index 0000000..a34e350
--- /dev/null
+++ b/gas/testsuite/gas/cris/rd-pic-2.d
@@ -0,0 +1,19 @@
+#objdump: -dr
+#as: --em=criself --pic
+
+# Check that 16-bit PIC relocs aren't overflowing.
+# PR gas/1049.
+
+.*: file format .*-cris
+
+Disassembly of section \.text:
+0+ <a>:
+ 0: 7f9c 0000 movs\.w 0,r9
+ 2: R_CRIS_16_GOT y
+ 4: 7f9c 0000 movs\.w 0,r9
+ 6: R_CRIS_16_GOTPLT z
+ \.\.\.
+0+10008 <y>:
+ 10008: 0f05 nop
+0+1000a <z>:
+ \.\.\.
diff --git a/gas/testsuite/gas/cris/rd-pic-2.s b/gas/testsuite/gas/cris/rd-pic-2.s
new file mode 100644
index 0000000..949fa18
--- /dev/null
+++ b/gas/testsuite/gas/cris/rd-pic-2.s
@@ -0,0 +1,11 @@
+; GAS mustn't error on the larger-than-16-bit offsets here.
+
+ .global y
+ .global z
+a:
+ movs.w y:GOT16,$r9
+ movs.w z:GOTPLT16,$r9
+ .space 65536,0
+y:
+ nop
+z: