This is the mail archive of the
mailing list for the binutils project.
[RFC][GOLD] ARM: Add cantunwind when unwind info does not match start of section
- From: Yury Usishchev <y dot usishchev at samsung dot com>
- To: binutils at sourceware dot org
- Date: Thu, 11 Feb 2016 15:18:52 +0300
- Subject: [RFC][GOLD] ARM: Add cantunwind when unwind info does not match start of section
- Authentication-results: sourceware.org; auth=none
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.
2016-02-11 Yury Usishchev <firstname.lastname@example.org>
* 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