aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-01-17 16:36:43 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2011-01-17 16:36:43 +0000
commitda17376b704177fc4d8fa038169782e28b1f3b24 (patch)
tree67a2f1be8072c12de87992729ac98caf536875c5 /ld
parent1e81e12b2c81710f5b098e18d5146d6704100913 (diff)
downloadfsf-binutils-gdb-da17376b704177fc4d8fa038169782e28b1f3b24.zip
fsf-binutils-gdb-da17376b704177fc4d8fa038169782e28b1f3b24.tar.gz
fsf-binutils-gdb-da17376b704177fc4d8fa038169782e28b1f3b24.tar.bz2
bfd/
* elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than h->needs_plt when deciding whether to record a possible dynamic reloc. ld/testsuite/ * ld-arm/arm-rel32.s, ld-arm/arm-rel32.d: New testcase. * ld-arm/arm-elf.exp: Run it.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/arm-rel32.d12
-rw-r--r--ld/testsuite/ld-arm/arm-rel32.s8
4 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index fd92f26..678b547 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
+ * ld-arm/arm-rel32.s, ld-arm/arm-rel32.d: New testcase.
+ * ld-arm/arm-elf.exp: Run it.
+
+2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
+
* ld-arm/gc-thumb-lib.s, ld-arm/gc-thumb.s,
ld-arm/gc-thumb.d: New test.
* ld-arm/arm-elf.exp: Run it.
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 9efdaf0..798b2cb 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -126,6 +126,9 @@ set armelftests {
{"arm-rel31" "-static -T arm.ld" "" {arm-rel31.s}
{{objdump -s arm-rel31.d}}
"arm-rel31"}
+ {"arm-rel32" "-shared -T arm-dyn.ld" "" {arm-rel32.s}
+ {{objdump -Rsj.data arm-rel32.d}}
+ "arm-rel32"}
{"arm-call" "-static -T arm.ld" "-meabi=4" {arm-call1.s arm-call2.s}
{{objdump -d arm-call.d}}
"arm-call"}
diff --git a/ld/testsuite/ld-arm/arm-rel32.d b/ld/testsuite/ld-arm/arm-rel32.d
new file mode 100644
index 0000000..919aaa4
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-rel32.d
@@ -0,0 +1,12 @@
+
+.*: file format .*
+
+DYNAMIC RELOCATION RECORDS
+OFFSET +TYPE +VALUE
+[^ ]+ R_ARM_REL32 +foo
+[^ ]+ R_ARM_REL32 +foo
+[^ ]+ R_ARM_JUMP_SLOT +foo
+
+
+Contents of section \.data:
+ [^ ]+ 00000000 00010000 .*
diff --git a/ld/testsuite/ld-arm/arm-rel32.s b/ld/testsuite/ld-arm/arm-rel32.s
new file mode 100644
index 0000000..885b87c
--- /dev/null
+++ b/ld/testsuite/ld-arm/arm-rel32.s
@@ -0,0 +1,8 @@
+ .globl foo
+foo:
+ mov pc,lr
+ bal foo(PLT)
+
+ .data
+ .word foo-.
+ .word foo-.+0x100