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:
Andrew Hsieh
2012-06-25 17:56:19 -07:00
parent 3f8b673b24
commit 5e30a6ae14
4 changed files with 93 additions and 6 deletions

View File

@@ -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__