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

Yury Usishchev y.usishchev@samsung.com
Thu Feb 11 12:22:00 GMT 2016


Hi all!

Sorry, I forgot to add attachement:)

BR,
Yury Usishchev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_unwind_mix.patch
Type: text/x-diff
Size: 3640 bytes
Desc: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20160211/1572eaec/attachment.bin>
-------------- next part --------------

Yury Usishchev <y.usishchev@samsung.com> writes:

> Hi all!
>
> I want to add one more condition to fix_exidx_coverage. This will wix PR gold/19611.
> I have a question about condition itself, I need to compare start address of
> first unwind entry (first_word) to actual start of the section. In bfd I
> compared it to vma. But as I understand vma of input sections is always zero.
> So the question is: is it correct to compare first_word to zero (as done
> in attached patch)?
>
>
> This bug was initially found in rtld
> (https://sourceware.org/ml/libc-alpha/2015-12/msg00501.html) and already fixed
> in bfd (https://sourceware.org/ml/binutils/2015-12/msg00367.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.
>
> BR,
> Yury Usishchev
>
>
> gold/
> 2016-02-11 Yury Usishchev <y.usishchev@samsung.com>
>
> 	PR gold/19611
> 	* arm.cc (fix_exidx_coverage): Insert cantunwind when address in
> 	first unwind entry does not match start of section.
> 	* testsuite/Makefile.am (arm_exidx_test.stdout): Add dump of unwind info
> 	* testsuite/Makefile.in: Regenerate
> 	* testsuite/arm_exidx_test.c: Add sections to test unwind info merging
> 	* testsuite/arm_exidx_test.sh: Add check for correct unwind info merging


More information about the Binutils mailing list