diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/ambiguousv1.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/ambiguousv2.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/funref.s | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/funv1.s | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/funv2.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/startv1.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/startv2.s | 5 |
9 files changed, 68 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index d200277..279958e 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-03-26 Alan Modra <amodra@gmail.com> + + * ld-powerpc/startv1.s, * ld-powerpc/startv2.s, * ld-powerpc/funref.s, + * ld-powerpc/funv1.s, * ld-powerpc/funv2.s, + * ld-powerpc/ambiguousv1.d, * ld-powerpc/ambiguousv2.d: New test files. + * ld-powerpc/powerpc.exp: Run new tests. + 2014-03-25 Will Newton <will.newton@linaro.org> * ld-aarch64/aarch64-elf.exp: Add relasz dump test. diff --git a/ld/testsuite/ld-powerpc/ambiguousv1.d b/ld/testsuite/ld-powerpc/ambiguousv1.d new file mode 100644 index 0000000..73beab9 --- /dev/null +++ b/ld/testsuite/ld-powerpc/ambiguousv1.d @@ -0,0 +1,12 @@ +#source: startv1.s +#source: funref.s +#as: -a64 +#ld: -melf64ppc +#ld_after_inputfiles: tmpdir/funv1.so +#readelf: -r --wide +# check that we do the right thing with funref.s that doesn't have +# anything to mark it as ELFv1 or ELFv2 + +Relocation section .* contains 1 entries: +.* +.* R_PPC64_ADDR64 +0+ my_func \+ 0 diff --git a/ld/testsuite/ld-powerpc/ambiguousv2.d b/ld/testsuite/ld-powerpc/ambiguousv2.d new file mode 100644 index 0000000..5cf047b --- /dev/null +++ b/ld/testsuite/ld-powerpc/ambiguousv2.d @@ -0,0 +1,12 @@ +#source: startv2.s +#source: funref.s +#as: -a64 +#ld: -melf64ppc +#ld_after_inputfiles: tmpdir/funv2.so +#readelf: -r --wide +# check that we do the right thing with funref.s that doesn't have +# anything to mark it as ELFv1 or ELFv2 + +Relocation section .*contains 1 entries: +.* +.* R_PPC64_JMP_SLOT .* my_func \+ 0 diff --git a/ld/testsuite/ld-powerpc/funref.s b/ld/testsuite/ld-powerpc/funref.s new file mode 100644 index 0000000..3f7de47 --- /dev/null +++ b/ld/testsuite/ld-powerpc/funref.s @@ -0,0 +1,4 @@ + .data + .globl func_tab +func_tab: + .dc.a my_func diff --git a/ld/testsuite/ld-powerpc/funv1.s b/ld/testsuite/ld-powerpc/funv1.s new file mode 100644 index 0000000..e79009d --- /dev/null +++ b/ld/testsuite/ld-powerpc/funv1.s @@ -0,0 +1,10 @@ + .globl my_func + .type my_func,@function + .section .opd,"aw",@progbits +my_func: + .quad .Lmy_func, .TOC.@tocbase + + .text +.Lmy_func: + blr + .size my_func,.-.Lmy_func diff --git a/ld/testsuite/ld-powerpc/funv2.s b/ld/testsuite/ld-powerpc/funv2.s new file mode 100644 index 0000000..eaff0b3 --- /dev/null +++ b/ld/testsuite/ld-powerpc/funv2.s @@ -0,0 +1,6 @@ + .abiversion 2 + .globl my_func + .type my_func,@function +my_func: + blr + .size my_func,.-my_func diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index 8a60eb7..1eaedaa 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -212,6 +212,8 @@ set ppc64elftests { {tocopt4a.s tocopt4b.s} {{objdump -s tocopt4.d}} "tocopt4"} {"TOC opt5" "-melf64ppc" "" "-a64" {tocopt5.s} {{objdump -s tocopt5.d}} "tocopt5"} + {"ambig shared v1" "-shared -melf64ppc" "" "-a64" {funv1.s} {} "funv1.so"} + {"ambig shared v2" "-shared -melf64ppc" "" "-a64" {funv2.s} {} "funv2.so"} } set ppceabitests { @@ -272,6 +274,8 @@ if [ supports_ppc64 ] then { run_dump_test "elfv2exe" run_dump_test "elfv2-2so" run_dump_test "elfv2-2exe" + run_dump_test "ambiguousv1" + run_dump_test "ambiguousv2" } if { [istarget "powerpc*-eabi*"] } { diff --git a/ld/testsuite/ld-powerpc/startv1.s b/ld/testsuite/ld-powerpc/startv1.s new file mode 100644 index 0000000..c54e1b0 --- /dev/null +++ b/ld/testsuite/ld-powerpc/startv1.s @@ -0,0 +1,8 @@ + .globl _start + .section .opd,"aw",@progbits +_start: + .quad .L_start, .TOC.@tocbase + + .text +.L_start: + b _start diff --git a/ld/testsuite/ld-powerpc/startv2.s b/ld/testsuite/ld-powerpc/startv2.s new file mode 100644 index 0000000..7187aa5 --- /dev/null +++ b/ld/testsuite/ld-powerpc/startv2.s @@ -0,0 +1,5 @@ + .abiversion 2 + .text + .globl _start +_start: + b _start |