[PATCH] ARM: Add cantunwind when unwind info does not match start of section

Yury Usishchev y.usishchev@samsung.com
Wed Dec 23 19:49:00 GMT 2015


Hi all!

This patch adds to elf32_arm_fix_exidx_coverage one more condition when
cantunwind should be added.
This bug was initially found in rtld
(https://sourceware.org/ml/libc-alpha/2015-12/msg00501.html).
It happens when two sections are merged into one. First section should have
non-cantunwind last unwind entry and in second section first unwind entry
should not match start of section.

In this situation initial sections are correct (if unwinder hits start of
section without unwind info it stops). But merged section has a gap in unwind
info, which can cause problems.

Tested for arm-linux-gnueabi target, verified on ld.so build and on new test.

BR,
Yury Usishchev

Changelogs:
bfd/ChangeLog:

2015-12-23 Yury Usishchev <y.usishchev@samsung.com>

     * bfd/elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when
     address in first unwind entry does not match start of section.

ld/testsuite/ChangeLog:

2015-12-23 Yury Usishchev <y.usishchev@samsung.com>

     * 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-cantunwind-when-unwind-info-does-not-match-start.patch
Type: text/x-diff
Size: 3447 bytes
Desc: 0001-Add-cantunwind-when-unwind-info-does-not-match-start.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20151223/69f721a3/attachment.bin>


More information about the Binutils mailing list