Changed "jump __libc_init" to "call __libc_init" otherwise stack unwinding
past __libc_init may get wrong return address and crash the program or do
wield things. With "call", return address is pushed on stack and unwinding
stops correctly at _start. Note that __libc_init never returns, so this
fix wonʼt affect normal program execution. But just in case it "does"
return, jump to address 0 and halt.
Change-Id: Id194fb32adcbf89ae59939cee33c50b5bbdd36fe
"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 patch removes all prebuilt C runtime object files from
the ndk/platforms/ directory. We replace them with equivalent
assembly sources lifted from the following directories:
bionic/libc/private/ (for __dso_handle.S and __dso_handle_so.S)
bionic/libc/arch-$ARCH/ (for all others)
Note: This requires that your NDK's gen-platforms.sh script be
capable of rebuilding the object files from sources.
See https://android-review.googlesource.com/36822
The goal here is to make it much easier to update these files,
and track their changes relative to the content of bionic/lib.
For example to fix the following issues in the future:
Change-Id: If4c84e2584b0e58ca3585b034bb8a13a8add8ab9
http://code.google.com/p/android/issues/detail?id=26911http://code.google.com/p/android/issues/detail?id=23203
Fixed compilation error when header in #include <android/*h> is
included alone.
Fix for rect.h already exists in $ANDROID/frameworks/native/include/android
Change-Id: I7c49e044507581c5ad591f26f99cda6870b411c5
Apply changes in bionic/libc/arch-x86/include/machine to
development/ndk/platforms/android-9/arch-x86/include/machine:
commit 5fbf2e09921723cfdea75e83c1fac2080f0ad564
Change-Id: Ie0fe711ae4c866d9c1300430d5e9613ccb82da22
For some reason, the header was missing from previous NDK releases.
Note: the function symbols are properly listed in arch-$ARCH/symbols/libc.so.functions.txt
This patch improves the formatting of <pthread.h> as exposed by the NDK:
- change '#if __cplusplus' into '#ifdef __cplusplus'
- change C++-style comment into C-style comment
Change-Id: Ib093058e8d7a7554d8329a40e102cde11d065932
- Cleanup declaration of lseek64() to use off64_t instead of loff_t
- Cleanup declaration of prctl() to use variable number of arguments
The cleanups are performed to better match upstream.
Change-Id: I3c9420e328c3772bbb57dc9108dc879aa698a981
This patch fixes some formatting issues in <sys/cdefs.h>:
- change '#if __STDC_VERSION__ > xxx' into '#if defined(__STDC_VERSION__) && __STDC_VERSION > xxx'
- add __LIBC_HIDDEN__ definition (not technically required, but makes comparing the headers with upstream easier)
This fixes two minor issues with recent updates to the IPv6 related headers:
- add missing <linux/ipv6.h> kernel header
- avoid conflict in netinet/in6.h, the macro is already defined by <linux/in6.h>
The atomic operations exported by the platform's C library do not
provide full memory barriers. This can result in incorrect results
when NDK machine code linked against them runs on multi-core devices.
While the bug has been fixed in the platform, this NDK header change
ensures that any source code that includes <sys/atomics.h> will end
up using a correct implementation of these functions, based on the
corresponding GCC builtins.
These builtins always provide a full barrier and have reasonable
performance. Application developers who depend on <sys/atomics.h>
should recompile their unmodified sources against this version
of the NDK as soon as possible.
This patch contains a minor update to the netinet headers from the C library.
Most of the changes come from later platform release, but can be safely back-ported
to previous API levels since they don't change the ABI:
- <netinet/icmp6.h>, <netinet/ip6.h>: new headers
- <netinet/in.h>: now always include <linux/ipv6.h> by default
- <netinet/in6.h>: add macros: IN6_IS_ADDR_ULA, IN6ADDR_LOOPBACK_INIT
- <netinet/ip.h>: add macro: IPTOS_MINCOST
- <net/if_ether.h>: always include <sys/types.h> by default.
This is a minor update to two ARM-specific kernel headers.
- <asm/ptrace.h>: Add two new constants
- <asm/user.h>: Add 'struct vfp_user' and 'struct vfp_user_exc'
Corrected for example <asm/io.h> to include io_32.h instead of io_64.h
(which is missing, BTW).
Copied from the results of commit (same title) in bionic.git:
126601dd3f5303b50033dcb88945d928aa764aa4
* commit '799fada598b048b02bf63c0eea9b6d676f9be142':
ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)