aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorYury Usishchev <y.usishchev@samsung.com>2016-01-12 16:33:20 +0000
committerNick Clifton <nickc@redhat.com>2016-01-12 16:35:49 +0000
commitac06903dcff237777c8d507a03aafd79c84129ae (patch)
tree1a73cdf1c03c294fc122820ad060066466cb4de5 /ld
parentce5e165eae8925f64da52172f3e67ad8010a1aa0 (diff)
downloadgdb-ac06903dcff237777c8d507a03aafd79c84129ae.zip
gdb-ac06903dcff237777c8d507a03aafd79c84129ae.tar.gz
gdb-ac06903dcff237777c8d507a03aafd79c84129ae.tar.bz2
Add cantunwind when unwind info does not match start of section.
bfd * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when address in first unwind entry does not match start of section. tests * ld-arm/arm-elf.exp: New test. * ld-arm/unwind-mix.d: New file. * ld-arm/unwind-mix1.s: New file. * ld-arm/unwind-mix2.s: New file.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/unwind-mix.d20
-rw-r--r--ld/testsuite/ld-arm/unwind-mix1.s16
-rw-r--r--ld/testsuite/ld-arm/unwind-mix2.s15
5 files changed, 61 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 09e51b5..e2b1e3a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
+
+ * testsuite/ld-arm/arm-elf.exp: New test.
+ * testsuite/ld-arm/unwind-mix.d: New file.
+ * testsuite/ld-arm/unwind-mix1.s: New file.
+ * testsuite/ld-arm/unwind-mix2.s: New file.
+
2016-01-08 Jiong Wang <jiong.wang@arm.com>
PR ld/19368
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 1c5d3c1..70ca829 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -964,5 +964,8 @@ set arm_unwind_tests {
{"unwind-rel" "-r -Tarm.ld" "" "" {unwind-rel1.s unwind-rel2.s unwind-rel3.s}
{{readelf -ur unwind-rel.d}}
"unwind-rel"}
+ {"unwind-mix" "-Tarm.ld" "" "" {unwind-mix1.s unwind-mix2.s}
+ {{readelf -u unwind-mix.d}}
+ "unwind-mix"}
}
run_ld_link_tests $arm_unwind_tests
diff --git a/ld/testsuite/ld-arm/unwind-mix.d b/ld/testsuite/ld-arm/unwind-mix.d
new file mode 100644
index 0000000..8c157e1
--- /dev/null
+++ b/ld/testsuite/ld-arm/unwind-mix.d
@@ -0,0 +1,20 @@
+
+Unwind table index '\.ARM\.exidx' at offset .* contains 4 entries:
+
+0x8004 <_start>: @0x8010
+ Compact model index: 1
+ 0xc9 0x40 pop {D4}
+ 0xc9 0x00 pop {D0}
+ 0xa8 pop {r4, r14}
+ 0xb0 finish
+
+0x8008 <__aeabi_unwind_cpp_pr1>: 0x1 \[cantunwind\]
+
+0x800c <end>: 0x80a8b0b0
+ Compact model index: 0
+ 0xa8 pop {r4, r14}
+ 0xb0 finish
+ 0xb0 finish
+
+0x8010 <end\+0x4>: 0x1 \[cantunwind\]
+
diff --git a/ld/testsuite/ld-arm/unwind-mix1.s b/ld/testsuite/ld-arm/unwind-mix1.s
new file mode 100644
index 0000000..36e5e0a
--- /dev/null
+++ b/ld/testsuite/ld-arm/unwind-mix1.s
@@ -0,0 +1,16 @@
+ .syntax unified
+ .text
+ .global __aeabi_unwind_cpp_pr0
+ .type __aeabi_unwind_cpp_pr0, %function
+__aeabi_unwind_cpp_pr0:
+ bx lr
+
+ .global _start
+ .type _start, %function
+_start:
+ .fnstart
+ .save {r4, lr}
+ .vsave {d0}
+ .vsave {d4}
+ bx lr
+ .fnend
diff --git a/ld/testsuite/ld-arm/unwind-mix2.s b/ld/testsuite/ld-arm/unwind-mix2.s
new file mode 100644
index 0000000..5301edb
--- /dev/null
+++ b/ld/testsuite/ld-arm/unwind-mix2.s
@@ -0,0 +1,15 @@
+ .syntax unified
+ .text
+ .global __aeabi_unwind_cpp_pr1
+ .type __aeabi_unwind_cpp_pr1, %function
+__aeabi_unwind_cpp_pr1:
+ bx lr
+
+ .global end
+ .type end, %function
+end:
+ .fnstart
+ .save {r4, lr}
+ bx lr
+ .fnend
+