diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1-32.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1-32.dd | 44 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1-64.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1-64.dd | 49 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1.ex | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-glink-1.s | 21 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix52.exp | 6 |
8 files changed, 139 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 55e3a92..bc20d02 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> + * ld-powerpc/aix-glink-1.ex, ld-powerpc/aix-glink-1.s, + ld-powerpc/aix-glink-1-32.dd, ld-powerpc/aix-glink-1-64.dd, + ld-powerpc/aix-glink-1-32.d, ld-powerpc/aix-glink-1-64.d: New tests. + * ld-powerpc/aix52.exp: Run them. + +2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> + * ld-powerpc/aix-abs-branch-1.im, ld-powerpc/aix-abs-branch-1.ex, ld-powerpc/aix-abs-branch-1.s, ld-powerpc/aix-abs-branch-1.dd: New test. diff --git a/ld/testsuite/ld-powerpc/aix-glink-1-32.d b/ld/testsuite/ld-powerpc/aix-glink-1-32.d new file mode 100644 index 0000000..129845f --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1-32.d @@ -0,0 +1,5 @@ +#name: Glink test 1 (error) (32-bit) +#source: aix-glink-1.s +#as: -a32 +#ld: -b32 -bM:SRE -bnogc +#error: undefined reference to `\.ext' diff --git a/ld/testsuite/ld-powerpc/aix-glink-1-32.dd b/ld/testsuite/ld-powerpc/aix-glink-1-32.dd new file mode 100644 index 0000000..33cf812 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1-32.dd @@ -0,0 +1,44 @@ + +.* + + +Disassembly of section \.text: + +10000000 <\.f1>: +10000000: 4e 80 00 20 br + +10000004 <\.f2>: +10000004: 48 00 00 05 bl 10000008 <\.f3> + +10000008 <\.f3>: +10000008: 4e 80 00 20 br + +1000000c <\.ext>: +1000000c: 81 82 00 00 l r12,0\(r2\) +10000010: 90 41 00 14 st r2,20\(r1\) +10000014: 80 0c 00 00 l r0,0\(r12\) +10000018: 80 4c 00 04 l r2,4\(r12\) +1000001c: 7c 09 03 a6 mtctr r0 +10000020: 4e 80 04 20 bctr +10000024: 00 00 00 00 \.long 0x0 +10000028: 00 0c 80 00 \.long 0xc8000 +1000002c: 00 00 00 00 \.long 0x0 + +Disassembly of section \.data: + +20000000 <foo>: +20000000: 20 00 00 08 .* +20000004: 10 00 00 0c .* + +20000008 <f1>: +20000008: 10 00 00 00 .* +2000000c: 20 00 00 20 .* +20000010: 00 00 00 00 .* + +20000014 <f2>: +20000014: 10 00 00 04 .* +20000018: 20 00 00 20 .* +2000001c: 00 00 00 00 .* + +20000020 <TOC>: + \.\.\. diff --git a/ld/testsuite/ld-powerpc/aix-glink-1-64.d b/ld/testsuite/ld-powerpc/aix-glink-1-64.d new file mode 100644 index 0000000..b8ee35f --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1-64.d @@ -0,0 +1,5 @@ +#name: Glink test 1 (error) (64-bit) +#source: aix-glink-1.s +#as: -a64 +#ld: -b64 -bM:SRE -bnogc +#error: undefined reference to `\.ext' diff --git a/ld/testsuite/ld-powerpc/aix-glink-1-64.dd b/ld/testsuite/ld-powerpc/aix-glink-1-64.dd new file mode 100644 index 0000000..b5a557c --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1-64.dd @@ -0,0 +1,49 @@ + +.* + + +Disassembly of section \.text: + +0000000010000000 <\.f1>: + 10000000: 4e 80 00 20 blr + +0000000010000004 <\.f2>: + 10000004: 48 00 00 05 bl 10000008 <\.f3> + +0000000010000008 <\.f3>: + 10000008: 4e 80 00 20 blr + +000000001000000c <\.ext>: + 1000000c: e9 82 00 00 ld r12,0\(r2\) + 10000010: f8 41 00 28 std r2,40\(r1\) + 10000014: e8 0c 00 00 ld r0,0\(r12\) + 10000018: e8 4c 00 08 ld r2,8\(r12\) + 1000001c: 7c 09 03 a6 mtctr r0 + 10000020: 4e 80 04 20 bctr + 10000024: 00 00 00 00 \.long 0x0 + 10000028: 00 0c a0 00 \.long 0xca000 + 1000002c: 00 00 00 00 \.long 0x0 + 10000030: 00 00 00 18 \.long 0x18 + +Disassembly of section \.data: + +0000000020000000 <foo>: + 20000000: 20 00 00 08 .* + 20000004: 10 00 00 0c .* + +0000000020000008 <f1>: + 20000008: 00 00 00 00 .* + 2000000c: 10 00 00 00 .* + 20000010: 00 00 00 00 .* + 20000014: 20 00 00 38 .* + \.\.\. + +0000000020000020 <f2>: + 20000020: 00 00 00 00 .* + 20000024: 10 00 00 04 .* + 20000028: 00 00 00 00 .* + 2000002c: 20 00 00 38 .* + \.\.\. + +0000000020000038 <TOC>: + \.\.\. diff --git a/ld/testsuite/ld-powerpc/aix-glink-1.ex b/ld/testsuite/ld-powerpc/aix-glink-1.ex new file mode 100644 index 0000000..643cdf3 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1.ex @@ -0,0 +1,2 @@ +f2 +foo diff --git a/ld/testsuite/ld-powerpc/aix-glink-1.s b/ld/testsuite/ld-powerpc/aix-glink-1.s new file mode 100644 index 0000000..f7901b2 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-glink-1.s @@ -0,0 +1,21 @@ + .toc + .globl .f1 + .csect .f1[PR] +.f1: + blr + + .globl .f2 + .csect .f2[PR] +.f2: + bl .f3 + + .globl .f3 + .csect .f3[PR] +.f3: + blr + + .globl foo + .csect foo[RW] +foo: + .long f1 + .long .ext diff --git a/ld/testsuite/ld-powerpc/aix52.exp b/ld/testsuite/ld-powerpc/aix52.exp index 632d0b9..41a2045 100644 --- a/ld/testsuite/ld-powerpc/aix52.exp +++ b/ld/testsuite/ld-powerpc/aix52.exp @@ -91,6 +91,12 @@ set aix52tests { "" {aix-core-sec-3.s} {{objdump -h aix-core-sec-3.hd}} "aix-core-sec-3.so"} + + {"Glink test 1" + "-shared -bE:aix-glink-1.ex --unresolved-symbols=ignore-all" + "" {aix-glink-1.s} + {{objdump {-D -j.text -j.data} aix-glink-1-SIZE.dd}} + "aix-glink-1.so"} } foreach test $aix52tests { |