aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:16:01 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:16:01 +0000
commit12b2cce9148e4cfdc9f135cfa1a21485be51dc5b (patch)
tree9d4e86818c270ad7f8d3572552a1ff66b3c24816 /ld
parent0e3212adedf457b6f7b877b18667190cc79f0848 (diff)
downloadfsf-binutils-gdb-12b2cce9148e4cfdc9f135cfa1a21485be51dc5b.zip
fsf-binutils-gdb-12b2cce9148e4cfdc9f135cfa1a21485be51dc5b.tar.gz
fsf-binutils-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')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-powerpc/aix-abs-branch-1.dd14
-rw-r--r--ld/testsuite/ld-powerpc/aix-abs-branch-1.ex1
-rw-r--r--ld/testsuite/ld-powerpc/aix-abs-branch-1.im1
-rw-r--r--ld/testsuite/ld-powerpc/aix-abs-branch-1.s14
-rw-r--r--ld/testsuite/ld-powerpc/aix52.exp6
6 files changed, 43 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b02892b..55e3a92 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-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.
+
+2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
+
* ld-powerpc/aix-abs-reloc-1.ex, ld-powerpc/aix-abs-reloc-1.im,
ld-powerpc/aix-abs-reloc-1.od, ld-powerpc/aix-abs-reloc-1.s: New test.
* ld-powerpc/aix52.exp: Run it.
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}