aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/gc-unwind.d5
-rw-r--r--ld/testsuite/ld-arm/gc-unwind.s38
4 files changed, 52 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 2f75a9e..17be551 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-22 Paul Brook <paul@codesourcery.com>
+
+ * ld-arm/arm-elf.exp (armelftests): Add gc-unwind.h.
+ * ld-arm/gc-unwind.s: New file.
+ * ld-arm/gc-unwind.d: New file.
+
2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3953
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 71d817a..9b7b369 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -156,6 +156,9 @@ set armelftests {
"-EL --vfp11-denorm-fix=scalar" "-EL" {vfp11-fix-none.s}
{{objdump -dr vfp11-fix-none.d}}
"vfp11-fix-none"}
+ {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
+ {{objdump -sj.data gc-unwind.d}}
+ "gc-unwind"}
}
diff --git a/ld/testsuite/ld-arm/gc-unwind.d b/ld/testsuite/ld-arm/gc-unwind.d
new file mode 100644
index 0000000..fbb7911
--- /dev/null
+++ b/ld/testsuite/ld-arm/gc-unwind.d
@@ -0,0 +1,5 @@
+
+.*: file format.*
+
+Contents of section .data:
+ [^ ]* 22222222 .*
diff --git a/ld/testsuite/ld-arm/gc-unwind.s b/ld/testsuite/ld-arm/gc-unwind.s
new file mode 100644
index 0000000..c5326c2
--- /dev/null
+++ b/ld/testsuite/ld-arm/gc-unwind.s
@@ -0,0 +1,38 @@
+@ Test -gc-sections and unwinding tables. .data.eh should be pulled in
+@ via the EH tables, .data.foo should not.
+.text
+.global _start
+.fnstart
+_start:
+bx lr
+.personality my_pr
+.handlerdata
+.word 0
+.fnend
+
+.section .data.foo
+my_foo:
+.word 0x11111111
+
+.section .text.foo
+.fnstart
+foo:
+bx lr
+.personality my_pr
+.handlerdata
+.word my_foo
+.fnend
+
+.section .data.eh
+my_eh:
+.word 0x22222222
+
+.section .text.eh
+.fnstart
+my_pr:
+bx lr
+.personality my_pr
+.handlerdata
+.word my_eh
+.fnend
+