diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2009-03-14 09:16:01 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2009-03-14 09:16:01 +0000 |
commit | 12b2cce9148e4cfdc9f135cfa1a21485be51dc5b (patch) | |
tree | 9d4e86818c270ad7f8d3572552a1ff66b3c24816 /ld/testsuite/ld-powerpc | |
parent | 0e3212adedf457b6f7b877b18667190cc79f0848 (diff) | |
download | gdb-12b2cce9148e4cfdc9f135cfa1a21485be51dc5b.zip gdb-12b2cce9148e4cfdc9f135cfa1a21485be51dc5b.tar.gz gdb-12b2cce9148e4cfdc9f135cfa1a21485be51dc5b.tar.bz2 |
bfd/
* coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
if the target is absolute. Fix comment typo.
(xcoff_ppc_relocate_section): Remove FIXME.
* coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
if the target is absolute.
ld/testsuite/
* 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.
* ld-powerpc/aix52.exp: Run it.
Diffstat (limited to 'ld/testsuite/ld-powerpc')
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-abs-branch-1.dd | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-abs-branch-1.ex | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-abs-branch-1.im | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-abs-branch-1.s | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix52.exp | 6 |
5 files changed, 36 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/aix-abs-branch-1.dd b/ld/testsuite/ld-powerpc/aix-abs-branch-1.dd new file mode 100644 index 0000000..6bfd136 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-branch-1.dd @@ -0,0 +1,14 @@ + +.* + + +Disassembly of section \.text: + +0*10000000 <foo>: + *10000000:.* bla * 144d000 <.*> + *10000004:.* l(wz|) * r1,80\(r1\) + *10000008:.* bla * 1451000 <.*> + *1000000c:.* (oril * r0,r0,0|nop) + *10000010:.* bla * 1452800 <.*> + *10000014:.* (oril * r0,r0,0|nop) + *10000018:.* bla * 1450000 <.*> diff --git a/ld/testsuite/ld-powerpc/aix-abs-branch-1.ex b/ld/testsuite/ld-powerpc/aix-abs-branch-1.ex new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-branch-1.ex @@ -0,0 +1 @@ +foo diff --git a/ld/testsuite/ld-powerpc/aix-abs-branch-1.im b/ld/testsuite/ld-powerpc/aix-abs-branch-1.im new file mode 100644 index 0000000..0efbfc9 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-branch-1.im @@ -0,0 +1 @@ +bar 0x1450000 diff --git a/ld/testsuite/ld-powerpc/aix-abs-branch-1.s b/ld/testsuite/ld-powerpc/aix-abs-branch-1.s new file mode 100644 index 0000000..82c322f --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-abs-branch-1.s @@ -0,0 +1,14 @@ + .globl foo + .csect foo[PR] +foo: + bl bar - 0x3000 + lwz 1,80(1) + bl bar + 0x1000 + .ifeq size - 32 + lwz 2,20(1) + .else + ld 2,40(1) + .endif + bl bar + 0x2800 + nop + bl bar diff --git a/ld/testsuite/ld-powerpc/aix52.exp b/ld/testsuite/ld-powerpc/aix52.exp index 1263796..632d0b9 100644 --- a/ld/testsuite/ld-powerpc/aix52.exp +++ b/ld/testsuite/ld-powerpc/aix52.exp @@ -65,6 +65,12 @@ proc run_aix_test { size name ldopts asopts sources tools output } { } set aix52tests { + {"Absolute branch test 1" + "-shared -bI:aix-abs-branch-1.im -bE:aix-abs-branch-1.ex" + "" {aix-abs-branch-1.s} + {{objdump {-dR} aix-abs-branch-1.dd}} + "aix-abs-branch-1.so"} + {"Relocations against absolute symbols 1" "-shared -bI:aix-abs-reloc-1.im -bE:aix-abs-reloc-1.ex" {} {aix-abs-reloc-1.s} |