aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc/elfv2.s
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-10-29 16:40:34 +1030
committerAlan Modra <amodra@gmail.com>2013-10-30 13:44:10 +1030
commitd4a95d4999e7fe0d868254bec76722b35f064184 (patch)
tree6c47bece3bf9637cfc61a5ff79a0d0063bf3ec66 /ld/testsuite/ld-powerpc/elfv2.s
parente8910a83af41c3dbfd00191b2720d4094f8d9532 (diff)
downloadgdb-d4a95d4999e7fe0d868254bec76722b35f064184.zip
gdb-d4a95d4999e7fe0d868254bec76722b35f064184.tar.gz
gdb-d4a95d4999e7fe0d868254bec76722b35f064184.tar.bz2
Add PowerPC64 ELFv2 tests.
* ld-powerpc/elfv2.s, * ld-powerpc/elfv2so.d, * ld-powerpc/elfv2exe.d: New tests. * ld-powerpc/powerpc.exp: Run them.
Diffstat (limited to 'ld/testsuite/ld-powerpc/elfv2.s')
-rw-r--r--ld/testsuite/ld-powerpc/elfv2.s32
1 files changed, 32 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/elfv2.s b/ld/testsuite/ld-powerpc/elfv2.s
new file mode 100644
index 0000000..c2a4c3b
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/elfv2.s
@@ -0,0 +1,32 @@
+ .section .toc,"aw",@progbits
+.L0:
+ .quad x
+
+ .data
+x:
+ .quad f1
+
+ .globl f1
+ .type f1,@function
+ .text
+f1:
+ addis 2,12,.TOC.-f1@ha
+ addi 2,2,.TOC.-f1@l
+ .localentry f1,.-f1
+ mflr 0
+ stdu 1,-32(1)
+ std 0,48(1)
+ bl f1
+ ld 3,.L0@toc(2)
+ bl f2
+ nop
+ ld 3,x@got(2)
+ bl f3
+ nop
+ bl f4
+ nop
+ ld 0,48(1)
+ addi 1,1,32
+ mtlr 0
+ blr
+ .size f1,.-f1