platform_bionic/libc/include
Peter Collingbourne e949195f64 Adopt GNU calling convention for ifunc resolvers.
In order for an ifunc resolver to detect the presence of certain CPU features,
access to getauxval(AT_HWCAP) or getauxval(AT_HWCAP2) may be required. In order
for getauxval() to work, it needs to access the pointer to the auxiliary vector
stored by the linker in the libc shared globals data structure. Accessing the
shared globals requires libc to call the __libc_shared_globals() function
exported by the linker. However, in order to call this function, libc must
be fully relocated, which is not guaranteed to be the case at the point when
ifunc resolvers are called.

glibc solves this problem by passing the values of getauxval(AT_HWCAP)
(and getauxval(AT_HWCAP2) on aarch64) as arguments to the ifunc resolver.
Since this seems to be not only the most straightforward way to solve the
problem but also improves our compatibility with glibc, we adopt their
calling convention.

This change is ABI compatible with old resolvers because the arguments are
passed in registers, so the old resolvers will simply ignore the new arguments.

Bug: 135772972
Change-Id: Ie65bd6e7067f0c878df3d348c815fda61dc12de2
2019-10-28 20:20:29 -07:00
..
android Remove __ANDROID_NDK__ from bionic, and document our #defines. 2019-10-15 13:30:12 -07:00
arpa <arpa/nameser.h>: fix INTRODUCED_IN API level. 2019-06-06 09:57:54 -07:00
bits fortify: remove last uses of __bos_trivially_not* 2019-10-07 16:18:44 -07:00
net Another round of documentation. 2018-10-04 16:35:13 -07:00
netinet Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
netpacket
sys Adopt GNU calling convention for ifunc resolvers. 2019-10-28 20:20:29 -07:00
alloca.h Start documenting libc. 2018-08-23 11:03:17 -07:00
ar.h Start documenting libc. 2018-08-23 11:03:17 -07:00
assert.h Start documenting libc. 2018-08-23 11:03:17 -07:00
byteswap.h Start documenting libc. 2018-08-23 11:03:17 -07:00
complex.h Reland "Retire GCC FORTIFY." 2018-07-24 19:36:51 +00:00
cpio.h Start documenting libc. 2018-08-23 11:03:17 -07:00
ctype.h Reimplement the <ctype.h> is* functions. 2019-10-08 12:04:09 -07:00
dirent.h
dlfcn.h
elf.h Reject .so files using ELF TLS. 2018-03-23 18:46:07 -07:00
endian.h Start documenting libc. 2018-08-23 11:03:17 -07:00
err.h Start documenting libc. 2018-08-23 11:03:17 -07:00
errno.h Start documenting libc. 2018-08-23 11:03:17 -07:00
error.h Start documenting libc. 2018-08-23 11:03:17 -07:00
fcntl.h Remove __overloadable/__RENAME_CLANG 2018-02-06 13:35:56 -08:00
features.h Start documenting libc. 2018-08-23 11:03:17 -07:00
fenv.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
fnmatch.h Start documenting libc. 2018-08-23 11:03:17 -07:00
fts.h Fix various ftw/nftw "shall fail"s from POSIX. 2018-05-08 15:20:07 -07:00
ftw.h Better backwards compatibility for stat64. 2018-02-12 15:48:01 -08:00
getopt.h Another round of documentation. 2018-10-04 16:35:13 -07:00
glob.h The future is now (2018 edition). 2018-01-30 08:54:12 -08:00
grp.h
iconv.h Start documenting libc. 2018-08-23 11:03:17 -07:00
ifaddrs.h Start documenting libc. 2018-08-23 11:03:17 -07:00
inttypes.h
langinfo.h
lastlog.h Start documenting libc. 2018-08-23 11:03:17 -07:00
libgen.h Start documenting libc. 2018-08-23 11:03:17 -07:00
limits.h
link.h Add additional dl_phdr_info fields 2019-08-22 12:43:17 -07:00
locale.h
malloc.h malloc.h: explicitly suggest malloc_info() instead of mallinfo(). 2019-04-30 12:44:03 -07:00
math.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
memory.h Start documenting libc. 2018-08-23 11:03:17 -07:00
mntent.h
netdb.h The future is now (2018 edition). 2018-01-30 08:54:12 -08:00
nl_types.h Start documenting libc. 2018-08-23 11:03:17 -07:00
paths.h Update references to the new com.android.art APEX. 2019-08-29 18:07:50 +01:00
poll.h Accept NULL for fds parameter in poll. 2018-08-28 14:20:15 -07:00
pthread.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
pty.h Start documenting libc. 2018-08-23 11:03:17 -07:00
pwd.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
regex.h
resolv.h The future is now (2019 edition). 2019-03-14 09:29:52 -07:00
sched.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
search.h The future is now (2018 edition). 2018-01-30 08:54:12 -08:00
semaphore.h Implement new clock wait functions 2019-07-15 09:06:19 -07:00
setjmp.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
signal.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
spawn.h Add sigset64_t and accompanying functions. 2018-01-30 18:47:16 -08:00
stdatomic.h Change stdatomic.h check from defined(_USING_LIBCXX) to __has_include(<atomic>) 2019-07-18 13:57:39 -07:00
stdint.h
stdio.h Add renameat2. 2019-08-02 09:09:59 -07:00
stdio_ext.h Start documenting libc. 2018-08-23 11:03:17 -07:00
stdlib.h fortify: fix up a few diagnostics; add __wur to realpath 2019-06-13 23:26:02 -07:00
string.h Reland "Retire GCC FORTIFY." 2018-07-24 19:36:51 +00:00
strings.h versioner: Fix bzero/bcopy fortify 2019-08-30 10:17:36 -07:00
syscall.h Start documenting libc. 2018-08-23 11:03:17 -07:00
sysexits.h Start documenting libc. 2018-08-23 11:03:17 -07:00
syslog.h Start documenting libc. 2018-08-23 11:03:17 -07:00
tar.h Start documenting libc. 2018-08-23 11:03:17 -07:00
termio.h Start documenting libc. 2018-08-23 11:03:17 -07:00
termios.h Start documenting libc. 2018-08-23 11:03:17 -07:00
threads.h versioner: Fix C11 threads.h 2019-08-29 16:40:34 -07:00
time.h Remove __INTRODUCED_IN for obsolete API levels. 2019-10-03 16:09:04 -07:00
time64.h
uchar.h Start documenting libc. 2018-08-23 11:03:17 -07:00
ucontext.h Start documenting libc. 2018-08-23 11:03:17 -07:00
unistd.h <unistd.h> __INTRODUCED_IN cleaup. 2019-10-03 20:35:38 -07:00
utime.h Start documenting libc. 2018-08-23 11:03:17 -07:00
utmp.h
wait.h Start documenting libc. 2018-08-23 11:03:17 -07:00
wchar.h Add remaining _l function stubs. 2018-02-13 23:14:12 -08:00
wctype.h
xlocale.h Start documenting libc. 2018-08-23 11:03:17 -07:00