summaryrefslogtreecommitdiffstats
path: root/ld/testsuite/ld-arm
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-15 00:08:12 +0000
committerPaul Brook <paul@codesourcery.com>2009-05-15 00:08:12 +0000
commit22a8f80ef54b90cbdd345ec24dd7ad89033062a5 (patch)
tree29d8e7b64e00f6f690de5ea83a8d1efad4490d48 /ld/testsuite/ld-arm
parent70b24e7fb2f57270e9d9fc54388693482932e467 (diff)
downloadppe42-binutils-22a8f80ef54b90cbdd345ec24dd7ad89033062a5.tar.gz
ppe42-binutils-22a8f80ef54b90cbdd345ec24dd7ad89033062a5.zip
2009-05-15 Andrew Stubbs <ams@codesourcery.com>
Paul Brook <paul@codesourcery.com> bfd/ * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to fix discarded sections. ld/testsuite/ * ld-arm/arm-elf.exp: Add unwind-5. * ld-arm/discard-unwind.ld: New file. * ld-arm/unwind-5.d: New test. * ld-arm/unwind-5.s: New test.
Diffstat (limited to 'ld/testsuite/ld-arm')
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp1
-rw-r--r--ld/testsuite/ld-arm/discard-unwind.ld19
-rw-r--r--ld/testsuite/ld-arm/unwind-5.d7
-rw-r--r--ld/testsuite/ld-arm/unwind-5.s12
4 files changed, 39 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 054a187026..4e8a9339aa 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -396,3 +396,4 @@ run_dump_test "unwind-1"
run_dump_test "unwind-2"
run_dump_test "unwind-3"
run_dump_test "unwind-4"
+run_dump_test "unwind-5"
diff --git a/ld/testsuite/ld-arm/discard-unwind.ld b/ld/testsuite/ld-arm/discard-unwind.ld
new file mode 100644
index 0000000000..d8f6524aa9
--- /dev/null
+++ b/ld/testsuite/ld-arm/discard-unwind.ld
@@ -0,0 +1,19 @@
+/* Script for ld testsuite */
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ PROVIDE (__executable_start = 0x8000); . = 0x8000;
+ .text :
+ {
+ *(.before)
+ *(.text)
+ *(.after)
+ *(.ARM.extab*)
+ *(.glue_7)
+ *(.v4_bx)
+ } =0
+ /DISCARD/ : { *(.ARM.exidx*) }
+ .ARM.attribues 0 : { *(.ARM.atttributes) }
+}
diff --git a/ld/testsuite/ld-arm/unwind-5.d b/ld/testsuite/ld-arm/unwind-5.d
new file mode 100644
index 0000000000..492887415c
--- /dev/null
+++ b/ld/testsuite/ld-arm/unwind-5.d
@@ -0,0 +1,7 @@
+#ld: -T discard-unwind.ld
+#objdump: -s
+
+.*: file format.*
+
+# Check we don't crash when discarding unwind info.
+#...
diff --git a/ld/testsuite/ld-arm/unwind-5.s b/ld/testsuite/ld-arm/unwind-5.s
new file mode 100644
index 0000000000..d15677d52b
--- /dev/null
+++ b/ld/testsuite/ld-arm/unwind-5.s
@@ -0,0 +1,12 @@
+ .syntax unified
+ .text
+ .global __aeabi_unwind_cpp_pr0
+ .type __aeabi_unwind_cpp_pr0, %function
+__aeabi_unwind_cpp_pr0:
+ .global _start
+ .type _start, %function
+_start:
+ .fnstart
+ .save {r4, lr}
+ bx lr
+ .fnend
OpenPOWER on IntegriCloud