diff options
author | Yury Usishchev <y.usishchev@samsung.com> | 2016-01-12 16:33:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-01-12 16:35:49 +0000 |
commit | ac06903dcff237777c8d507a03aafd79c84129ae (patch) | |
tree | 1a73cdf1c03c294fc122820ad060066466cb4de5 /bfd | |
parent | ce5e165eae8925f64da52172f3e67ad8010a1aa0 (diff) | |
download | gdb-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 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d1c5a3b..b6a7c5f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2016-01-12 Yury Usishchev <y.usishchev@samsung.com> + + * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind + when address in first unwind entry does not match start of + section. + 2016-01-08 Richard Sandiford <richard.sandiford@arm.com> Jiong Wang <jiong.wang@arm.com> diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index c594e65..1c52526 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -11740,6 +11740,18 @@ elf32_arm_fix_exidx_coverage (asection **text_section_order, /* An error? */ continue; + if (last_unwind_type > 0) + { + unsigned int first_word = bfd_get_32 (ibfd, contents); + /* Add cantunwind if first unwind item does not match section + start. */ + if (first_word != sec->vma) + { + insert_cantunwind_after (last_text_sec, last_exidx_sec); + last_unwind_type = 0; + } + } + for (j = 0; j < hdr->sh_size; j += 8) { unsigned int second_word = bfd_get_32 (ibfd, contents + j + 4); |