aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-01-17 16:36:15 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2011-01-17 16:36:15 +0000
commit1e81e12b2c81710f5b098e18d5146d6704100913 (patch)
tree64e377b08c7566936b5738a81b5ad8d8d21dfa12 /ld
parentf55af66d6ed6e6ad47757c5fff7ab5df1284ce33 (diff)
downloadgdb-1e81e12b2c81710f5b098e18d5146d6704100913.zip
gdb-1e81e12b2c81710f5b098e18d5146d6704100913.tar.gz
gdb-1e81e12b2c81710f5b098e18d5146d6704100913.tar.bz2
bfd/
* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered dynamic relocs for the removed section. ld/testsuite/ * 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.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp6
-rw-r--r--ld/testsuite/ld-arm/gc-thumb-lib.s6
-rw-r--r--ld/testsuite/ld-arm/gc-thumb.d2
-rw-r--r--ld/testsuite/ld-arm/gc-thumb.s11
5 files changed, 31 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3b10b2d..fd92f26 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-x86-64/ia32-2.d: Replace --n32 with --x32.
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 9ba7b56..9efdaf0 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -261,6 +261,12 @@ set armelftests {
{"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
{{objdump -sj.data gc-unwind.d}}
"gc-unwind"}
+ {"Thumb and -gc-sections" "-shared -T arm-dyn.ld" "" {gc-thumb-lib.s}
+ {}
+ "gc-thumb-lib.so"}
+ {"Thumb and -gc-sections" "-pie -T arm.ld -gc-sections tmpdir/gc-thumb-lib.so" "" {gc-thumb.s}
+ {{readelf --relocs gc-thumb.d}}
+ "gc-thumb"}
{"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s}
{{objdump -d arm-pic-veneer.d}}
"arm-pic-veneer"}
diff --git a/ld/testsuite/ld-arm/gc-thumb-lib.s b/ld/testsuite/ld-arm/gc-thumb-lib.s
new file mode 100644
index 0000000..2065d35
--- /dev/null
+++ b/ld/testsuite/ld-arm/gc-thumb-lib.s
@@ -0,0 +1,6 @@
+ .data
+ .globl foo
+ .type foo,%object
+ .size foo,4
+foo:
+ .word 0
diff --git a/ld/testsuite/ld-arm/gc-thumb.d b/ld/testsuite/ld-arm/gc-thumb.d
new file mode 100644
index 0000000..9a75562
--- /dev/null
+++ b/ld/testsuite/ld-arm/gc-thumb.d
@@ -0,0 +1,2 @@
+
+There are no relocations in this file\.
diff --git a/ld/testsuite/ld-arm/gc-thumb.s b/ld/testsuite/ld-arm/gc-thumb.s
new file mode 100644
index 0000000..4051f8d
--- /dev/null
+++ b/ld/testsuite/ld-arm/gc-thumb.s
@@ -0,0 +1,11 @@
+ .arch armv7-a
+ .syntax unified
+ .text
+ .globl _start
+_start:
+ mov pc,lr
+
+ .section .text.foo,"ax",%progbits
+ .thumb
+ movw r0,#:lower16:foo-.
+ movt r0,#:upper16:foo-.