* symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test.
authorAlexandre Oliva <aoliva@redhat.com>
Wed, 28 Sep 2005 19:32:19 +0000 (19:32 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 28 Sep 2005 19:32:19 +0000 (19:32 +0000)
* powerpc.exp: Run it.

ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/powerpc.exp
ld/testsuite/ld-powerpc/symtocbase-1.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/symtocbase-2.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/symtocbase.d [new file with mode: 0644]

index 2b4e144180783056690b9a6f11b97e7b689bb4a8..bbcca8e29ad651f57e75edaa6cd5bcbd1939b60b 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-28  Alexandre Oliva  <aoliva@redhat.com>
+
+       * symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test.
+       * powerpc.exp: Run it.
+
 2005-09-28  Jan Beulich  <jbeulich@novell.com>
 
        * ld-x86-64/tlspic.dd: Adjust.
index dcff739fd0bb13f926c6bbcd346ae5875146c816..e43a295319970505a0be393be5789a20b14dd5df 100644 (file)
@@ -102,6 +102,8 @@ set ppc64elftests {
      {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d}
       {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}}
       "tlstoc.so"}
+    {"sym@tocbase" "-shared -melf64ppc" "-a64" {symtocbase-1.s symtocbase-2.s}
+       {{objdump -dj.data symtocbase.d}} "symtocbase.so"}
 }
 
 
diff --git a/ld/testsuite/ld-powerpc/symtocbase-1.s b/ld/testsuite/ld-powerpc/symtocbase-1.s
new file mode 100644 (file)
index 0000000..ba6f073
--- /dev/null
@@ -0,0 +1,18 @@
+.section .toc,"aw",@progbits
+       .align 15
+       .globl x
+x:     .quad   .x,.x@tocbase,0
+.LCi:  .quad   i
+       .space  48 * 1024
+.data
+       .globl i
+i:     .long   0
+.L1bases:
+       .quad   .TOC.@tocbase
+       .quad   .x@tocbase
+       .quad   .y@tocbase
+.text
+       .globl .x
+.x:
+       ld 9,.LCi@toc(2)
+        blr
diff --git a/ld/testsuite/ld-powerpc/symtocbase-2.s b/ld/testsuite/ld-powerpc/symtocbase-2.s
new file mode 100644 (file)
index 0000000..1176cb8
--- /dev/null
@@ -0,0 +1,16 @@
+.section .toc,"aw",@progbits
+       .align 15
+       .globl y
+y:     .quad   .y,.y@tocbase,0
+.LCi:  .quad   i
+       .space  48 * 1024
+.data
+.L2bases:
+       .quad   .TOC.@tocbase
+       .quad   .x@tocbase
+       .quad   .y@tocbase
+.text
+       .globl .y
+.y:
+       ld 9,.LCi@toc(2)
+       blr
diff --git a/ld/testsuite/ld-powerpc/symtocbase.d b/ld/testsuite/ld-powerpc/symtocbase.d
new file mode 100644 (file)
index 0000000..1936c2f
--- /dev/null
@@ -0,0 +1,24 @@
+#source: symtocbase-1.s
+#source: symtocbase-2.s
+#as: -a64
+#ld: -shared -melf64ppc
+#objdump: -dj.data
+#target: powerpc64*-*-*
+
+.*:     file format elf64-powerpc
+
+Disassembly of section \.data:
+
+.* <i>:
+       \.\.\.
+.*:    00 02 00 00     \.long 0x20000
+.*:    00 00 00 00     \.long 0x0
+.*:    00 02 00 00     \.long 0x20000
+.*:    00 00 00 00     \.long 0x0
+.*:    00 03 00 00     \.long 0x30000
+.*:    00 00 00 00     \.long 0x0
+.*:    00 03 00 00     \.long 0x30000
+.*:    00 00 00 00     \.long 0x0
+.*:    00 02 00 00     \.long 0x20000
+.*:    00 00 00 00     \.long 0x0
+.*:    00 03 00 00     \.long 0x30000