]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Wed, 27 Jan 2010 22:01:39 +0000 (22:01 +0000)
committernobody <>
Wed, 27 Jan 2010 22:01:39 +0000 (22:01 +0000)
2_20-branch'.

Cherrypick from master 2010-01-27 22:01:38 UTC Dave Korn <dave.korn@artimi.com> 'gas/ChangeLog:':
    gas/testsuite/gas/pe/section-align-1.d
    gas/testsuite/gas/pe/section-align-1.s
    gas/testsuite/gas/pe/section-align-3.d
    gas/testsuite/gas/pe/section-align-3.s
    gas/testsuite/gas/ppc/xcoff-ref-1.l
    gas/testsuite/gas/ppc/xcoff-ref-1.s
    ld/testsuite/ld-powerpc/aix-ref-1-32.od
    ld/testsuite/ld-powerpc/aix-ref-1-64.od
    ld/testsuite/ld-powerpc/aix-ref-1.s

gas/testsuite/gas/pe/section-align-1.d [new file with mode: 0644]
gas/testsuite/gas/pe/section-align-1.s [new file with mode: 0644]
gas/testsuite/gas/pe/section-align-3.d [new file with mode: 0644]
gas/testsuite/gas/pe/section-align-3.s [new file with mode: 0644]
gas/testsuite/gas/ppc/xcoff-ref-1.l [new file with mode: 0644]
gas/testsuite/gas/ppc/xcoff-ref-1.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/aix-ref-1-32.od [new file with mode: 0644]
ld/testsuite/ld-powerpc/aix-ref-1-64.od [new file with mode: 0644]
ld/testsuite/ld-powerpc/aix-ref-1.s [new file with mode: 0644]

diff --git a/gas/testsuite/gas/pe/section-align-1.d b/gas/testsuite/gas/pe/section-align-1.d
new file mode 100644 (file)
index 0000000..01fb471
--- /dev/null
@@ -0,0 +1,29 @@
+#objdump: -h
+#name: section alignment
+
+# Test that alignment works in .section directives.
+
+.*: .*
+
+Sections:
+Idx Name          *Size      *VMA       *LMA       *File off  *Algn
+  0 \.text         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC, LOAD, READONLY, CODE
+  1 \.data         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC, LOAD, DATA
+  2 \.bss          0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC
+  3 \.none         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*0
+                  ALLOC, LOAD, READONLY, DATA
+  4 \.zero         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*0
+                  ALLOC, LOAD, READONLY, DATA
+  5 \.one          0*0000001  0*0000000  0*0000000  0*00001a4  2\*\*0
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  6 \.two          0*0000002  0*0000000  0*0000000  0*00001a5  2\*\*0
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  7 \.three        0*0000003  0*0000000  0*0000000  0*00001a7  2\*\*0
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  8 \.four         0*0000004  0*0000000  0*0000000  0*00001aa  2\*\*0
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  9 \.five         0*0000005  0*0000000  0*0000000  0*00001ae  2\*\*0
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
diff --git a/gas/testsuite/gas/pe/section-align-1.s b/gas/testsuite/gas/pe/section-align-1.s
new file mode 100644 (file)
index 0000000..de1f9b5
--- /dev/null
@@ -0,0 +1,15 @@
+
+       .section        .none,"dr0"
+       .section        .zero,"dr0"
+       .ascii  ""
+       .section        .one,"dr0"
+       .ascii  "1"
+       .section        .two,"dr0"
+       .ascii  "12"
+       .section        .three,"dr0"
+       .ascii  "123"
+       .section        .four,"dr0"
+       .ascii  "1234"
+       .section        .five,"dr0"
+       .ascii  "12345"
+       .end
diff --git a/gas/testsuite/gas/pe/section-align-3.d b/gas/testsuite/gas/pe/section-align-3.d
new file mode 100644 (file)
index 0000000..1f37103
--- /dev/null
@@ -0,0 +1,39 @@
+#objdump: -h
+#name: section alignment
+
+# Test that alignment works in .section directives.
+
+.*: .*
+
+Sections:
+Idx Name          *Size      *VMA       *LMA       *File off  *Algn
+  0 \.text         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC, LOAD, READONLY, CODE
+  1 \.data         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC, LOAD, DATA
+  2 \.bss          0*0000000  0*0000000  0*0000000  0*0000000  2\*\*[24]
+                  ALLOC
+  3 \.none         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*3
+                  ALLOC, LOAD, READONLY, DATA
+  4 \.zero         0*0000000  0*0000000  0*0000000  0*0000000  2\*\*3
+                  ALLOC, LOAD, READONLY, DATA
+  5 \.one          0*0000008  0*0000000  0*0000000  0*000026c  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  6 \.two          0*0000008  0*0000000  0*0000000  0*0000274  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  7 \.three        0*0000008  0*0000000  0*0000000  0*000027c  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  8 \.four         0*0000008  0*0000000  0*0000000  0*0000284  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+  9 \.five         0*0000008  0*0000000  0*0000000  0*000028c  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 10 \.six          0*0000008  0*0000000  0*0000000  0*0000294  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 11 \.seven        0*0000008  0*0000000  0*0000000  0*000029c  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 12 \.eight        0*0000008  0*0000000  0*0000000  0*00002a4  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 13 \.nine         0*0000010  0*0000000  0*0000000  0*00002ac  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
+ 14 \.ten          0*0000010  0*0000000  0*0000000  0*00002bc  2\*\*3
+                  CONTENTS, ALLOC, LOAD, READONLY, DATA
diff --git a/gas/testsuite/gas/pe/section-align-3.s b/gas/testsuite/gas/pe/section-align-3.s
new file mode 100644 (file)
index 0000000..fc7b9ea
--- /dev/null
@@ -0,0 +1,25 @@
+
+       .section        .none,"dr3"
+       .section        .zero,"dr3"
+       .ascii  ""
+       .section        .one,"dr3"
+       .ascii  "1"
+       .section        .two,"dr3"
+       .ascii  "12"
+       .section        .three,"dr3"
+       .ascii  "123"
+       .section        .four,"dr3"
+       .ascii  "1234"
+       .section        .five,"dr3"
+       .ascii  "12345"
+       .section        .six,"dr3"
+       .ascii  "123456"
+       .section        .seven,"dr3"
+       .ascii  "1234567"
+       .section        .eight,"dr3"
+       .ascii  "12345678"
+       .section        .nine,"dr3"
+       .ascii  "123456789"
+       .section        .ten,"dr3"
+       .ascii  "1234567890"
+       .end
diff --git a/gas/testsuite/gas/ppc/xcoff-ref-1.l b/gas/testsuite/gas/ppc/xcoff-ref-1.l
new file mode 100644 (file)
index 0000000..2120a20
--- /dev/null
@@ -0,0 +1,5 @@
+.*: Assembler messages:
+.*:1: Error: .ref outside .csect
+.*:3: Error: junk at end of line, first unrecognized character is `1'
+.*:4: Error: missing symbol name
+.*:5: Error: missing symbol name
diff --git a/gas/testsuite/gas/ppc/xcoff-ref-1.s b/gas/testsuite/gas/ppc/xcoff-ref-1.s
new file mode 100644 (file)
index 0000000..74e264f
--- /dev/null
@@ -0,0 +1,6 @@
+       .ref    foo
+       .csect  bar[rw]
+       .ref    1234
+       .ref    a,
+       .ref    ,
+       .ref
diff --git a/ld/testsuite/ld-powerpc/aix-ref-1-32.od b/ld/testsuite/ld-powerpc/aix-ref-1-32.od
new file mode 100644 (file)
index 0000000..1ba90ec
--- /dev/null
@@ -0,0 +1,30 @@
+
+.*
+
+
+Disassembly of section \.text:
+
+.* <foo1>:
+.*:    60 00 00 00     oril    r0,r0,0
+                       .*: R_REF       foo2\+.*
+.*:    80 22 00 00     l       r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+.*:    4e 80 00 20     br
+
+.* <foo2>:
+.*:    60 00 00 00     oril    r0,r0,0
+                       .*: R_REF       foo6\+.*
+                       .*: R_REF       foo4\+.*
+.*:    80 22 00 00     l       r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+
+.* <foo4>:
+.*:    60 00 00 00     oril    r0,r0,0
+.*:    80 22 00 00     l       r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+
+.* <foo6>:
+.*:    60 00 00 00     oril    r0,r0,0
+.*:    80 22 00 00     l       r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+       \.\.\.
diff --git a/ld/testsuite/ld-powerpc/aix-ref-1-64.od b/ld/testsuite/ld-powerpc/aix-ref-1-64.od
new file mode 100644 (file)
index 0000000..9cc6e9d
--- /dev/null
@@ -0,0 +1,30 @@
+
+.*
+
+
+Disassembly of section \.text:
+
+.* <foo1>:
+    .*:        60 00 00 00     nop
+                       .*: R_REF       foo2\+.*
+    .*:        e8 22 00 00     ld      r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+    .*:        4e 80 00 20     blr
+
+.* <foo2>:
+    .*:        60 00 00 00     nop
+                       .*: R_REF       foo6\+.*
+                       .*: R_REF       foo4\+.*
+    .*:        e8 22 00 00     ld      r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+
+.* <foo4>:
+    .*:        60 00 00 00     nop
+    .*:        e8 22 00 00     ld      r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+
+.* <foo6>:
+    .*:        60 00 00 00     nop
+    .*:        e8 22 00 00     ld      r1,0\(r2\)
+                       .*: R_TOC       stuff\+.*
+       \.\.\.
diff --git a/ld/testsuite/ld-powerpc/aix-ref-1.s b/ld/testsuite/ld-powerpc/aix-ref-1.s
new file mode 100644 (file)
index 0000000..33445a6
--- /dev/null
@@ -0,0 +1,57 @@
+       .macro  loadtoc,sym
+       .if     size == 32
+       lwz     1,\sym(2)
+       .else
+       ld      1,\sym(2)
+       .endif
+       .endm
+
+       .toc
+LC01:  .tc     stuff[TC],stuff[RW]
+
+       .globl  foo1
+       .csect  foo1[pr]
+foo1:
+       .align  8
+       nop
+       loadtoc LC01
+
+       .globl  foo2
+       .csect  foo2[pr]
+foo2:
+       nop
+       loadtoc LC01
+       .ref    foo4 , foo6
+
+       .globl  foo3
+       .csect  foo3[pr]
+foo3:
+       nop
+       loadtoc LC01
+
+       .globl  foo4
+       .csect  foo4[pr]
+foo4:
+       nop
+       loadtoc LC01
+
+       .globl  foo5
+       .csect  foo5[pr]
+foo5:
+       nop
+       loadtoc LC01
+       .ref    foo3
+
+       .globl  foo6
+       .csect  foo6[pr]
+foo6:
+       nop
+       loadtoc LC01
+
+       .csect  foo1[pr]
+       blr
+       .ref    foo2
+
+       .csect  stuff[rw]
+stuff:
+       .long   1