diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-30 11:56:57 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-05-01 15:03:06 -0700 |
commit | e0bca373a85fa71b89d9ea42370433b3c0499b9d (patch) | |
tree | d15ba36a2ffd7e1eea76bd1b8540acb120986b92 /binutils-2.25/libiberty | |
parent | 57fbbfbda5a77b558c24a44e7eed8c4030c31bcd (diff) | |
download | toolchain_binutils-e0bca373a85fa71b89d9ea42370433b3c0499b9d.zip toolchain_binutils-e0bca373a85fa71b89d9ea42370433b3c0499b9d.tar.gz toolchain_binutils-e0bca373a85fa71b89d9ea42370433b3c0499b9d.tar.bz2 |
[2.24] fix MIPS static executable segfault
Previous commit f25603579c0a04b3d5099259cf54c5b3c8775b78
isn't complete because .ctors/.dtors in crtbegin*/crtend*
aren't excluded from .init_array/.fini_array. Static
executable (eg. $NDK/tests/device/static-executable) causes
"Bus Error" because call_array() in __libc_init() call ffffffff
from __INIT_ARRAY__ not properly terminaed by NULL.
Disassembly of section .init_array:
000b42ac <__INIT_ARRAY__>:
b42ac: ff ff ff ff
000b42b0 <__CTOR_LIST__>:
b42b0: ff ff ff ff dc 09 08 00 f8 09 08 00 00 00 00 00
000b42c0 <__CTOR_END__>:
b42c0: 00 00 00 00
Note that Android uses .init/.fini_array (move away from .ctors/.dtors),
but we can't simply remove _CTOR* from crtbegin_static/dynamic.o
because older device (eg. ICS) call_array() on CTOR_LIST
The correct fix is to exclude them
Thanks to icebergfu@gmail.com for identifying the issues.
Change-Id: I7a955753baa00fd486cc5a37362ab91c3a21d1e1
Diffstat (limited to 'binutils-2.25/libiberty')
0 files changed, 0 insertions, 0 deletions