ndk: Add crtbrand.c ; crtbegin_static.S includes "atexit.S" for x86/mips
"atexit" isn't defined in libc.a for x86/mips (unlike their arm's counterpart). Include atexit.S otherwise app using atexit() may fail to link statically. Also, add crtbegin.c to brand crtbegin_static/dynamic.c with .note.ABI-tag section of given API level. See $NDK/gen-platforms.sh Change-Id: I2fdbb92119e3ca2da2c1ced6d77e63136ec35c34
This commit is contained in:
@@ -60,10 +60,9 @@ _start:
|
||||
mov $0, %edx
|
||||
pushl %edx
|
||||
pushl %eax
|
||||
call __libc_init
|
||||
call __libc_init
|
||||
|
||||
0:
|
||||
jmp main
|
||||
0: jmp main
|
||||
|
||||
1: .long __PREINIT_ARRAY__
|
||||
.long __INIT_ARRAY__
|
||||
|
||||
@@ -134,6 +134,5 @@ frame_dummy:
|
||||
.weak __deregister_frame_info_bases
|
||||
|
||||
#include "__dso_handle.S"
|
||||
#include "atexit.S"
|
||||
#include "__stack_chk_fail_local.S"
|
||||
/* NOTE: atexit() is not be provided by crtbegin_static.S, but by libc.a */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user