From: Alexandre Oliva Date: Wed, 28 Sep 2005 19:32:19 +0000 (+0000) Subject: * symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=08f46626eb865bccbce3c60c00429c00b608710e;p=binutils-gdb.git * symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test. * powerpc.exp: Run it. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 2b4e1441807..bbcca8e29ad 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-09-28 Alexandre Oliva + + * symtocbase-1.s, symtocbase-2.s, symtocbase.d: New test. + * powerpc.exp: Run it. + 2005-09-28 Jan Beulich * ld-x86-64/tlspic.dd: Adjust. diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index dcff739fd0b..e43a2953199 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 00000000000..ba6f073710c --- /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 00000000000..1176cb8a9c5 --- /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 00000000000..1936c2f7a81 --- /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: + +.* : + \.\.\. +.*: 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