diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2005-09-28 19:32:19 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2005-09-28 19:32:19 +0000 |
commit | 08f46626eb865bccbce3c60c00429c00b608710e (patch) | |
tree | 01efc3688808512581da9993412b0cefb3ad4ee7 /ld | |
parent | 6ad80df0505e4fbfb7bfa96477c2df044d60dd30 (diff) | |
download | fsf-binutils-gdb-08f46626eb865bccbce3c60c00429c00b608710e.zip fsf-binutils-gdb-08f46626eb865bccbce3c60c00429c00b608710e.tar.gz fsf-binutils-gdb-08f46626eb865bccbce3c60c00429c00b608710e.tar.bz2 |
* symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test.
* powerpc.exp: Run it.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/symtocbase-1.s | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/symtocbase-2.s | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/symtocbase.d | 24 |
5 files changed, 65 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2b4e144..bbcca8e 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -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. diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index dcff739..e43a295 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -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 index 0000000..ba6f073 --- /dev/null +++ b/ld/testsuite/ld-powerpc/symtocbase-1.s @@ -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 index 0000000..1176cb8 --- /dev/null +++ b/ld/testsuite/ld-powerpc/symtocbase-2.s @@ -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 index 0000000..1936c2f --- /dev/null +++ b/ld/testsuite/ld-powerpc/symtocbase.d @@ -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 |