[PATCH] ARM: Add .cantunwind to _start and _dl_start_user
y.usishchev@samsung.com
y.usishchev@samsung.com
Mon Dec 21 16:48:00 GMT 2015
Hi all!
This patch fixes the problem with wrong unwind info in rtld for arm.
In last stage of linking ld.so we get (from previous relocatable links) two
sections: '.text' and '.text.unlikely'. They are merged to resulting '.text'
section and '.text.unlikely' goes first.
If we are built with '-funwind-tables' both these sections has some unwind
info and in '.text' first unwind item is not aligned with start of section (we
have '_start' and '_dl_start_user' there and they don't have unwind info). So
when the two sections are merged we get a gap in unwind info.
When libgcc unwinder reaches '_dl_start_user', it searches for unwind
information and finds entry from previous section '.text.unlikely' (function
'oom' in my case). Unwinding continues with wrong info and it's result is
unpredictable (can even cause segfault in unwinder).
BR,
Yury Usishchev
ChangeLog
2015-12-21 Yury Usishchev <y.usishchev@samsung.com>
* sysdeps/arm/dl-machine.h (_start): Add .cantunwind
(_dl_start_user): Add .cantunwind
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-.cantunwind-to-_start-and-_dl_start_user.patch
Type: text/x-diff
Size: 1212 bytes
Desc: 0001-Add-.cantunwind-to-_start-and-_dl_start_user.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151221/0fed5fc2/attachment.bin>
More information about the Libc-alpha
mailing list