History log of /bionic/libc/arch-arm64/arm64.mk
Revision Date Author Comments
6b27e6e8e095fe288a450dbc9f42ea4ccec39ff0 08-May-2015 Dan Albert <danalbert@google.com> Revert "Fix volantis boot."

Bug: http://b/20065774
This reverts commit 76e1cbca75e9fdaf7a7943f2c58e65433b283f4a.

(cherry picked from commit 7c2c01d681d7f2faa256a263996a35ac3edc94b3)
76e1cbca75e9fdaf7a7943f2c58e65433b283f4a 03-Apr-2015 Elliott Hughes <enh@google.com> Fix volantis boot.

NVIDIA binary blobs are assuming that __cache_clear, _Unwind_Backtrace,
and _Unwind_GetIP are all in some library that they link, but now we've
cleaned up this leakage, they're no longer getting it. Deliberately leak
the symbols from libc.so until we get new blobs.

Bug: http://b/20065774
Change-Id: I92ef07b2bce8d1ad719bf40dab41d745cd6904d4
41ef902379ba24bd8a3ca6d7733b8376efb55ebd 14-Feb-2015 Elliott Hughes <enh@google.com> Fix memchr overflow.

The overflow's actually in the generic C implementation of memchr.

While I'm here, let's switch our generic memrchr to the OpenBSD version too.

Bug: https://code.google.com/p/android/issues/detail?id=147048
Change-Id: I296ae06a1ee196d2c77c95a22f11ee4d658962da
a6b6ed5fe9dd247684de5f35a0367be65876339e 05-Feb-2015 Colin Cross <ccross@android.com> Fix typo in cpu variant makefile depenendency for arm64

cpu_variank_mk -> cpu_variant_mk

Change-Id: I4b46ae20de72ed2dc8820d62ac35ddc6b915a195
9fb536de97c8bb927fb358988442ec2740a8ca7b 05-Dec-2014 Elliott Hughes <enh@google.com> Clean up the arm64 setjmp.

Note that this doesn't address the fact that we don't save/restore the
real-time signals. But it does let us pass the tests we currently fail.

Bug: 16918359
Change-Id: I063a6926164289a71026a412da7f5dd2ca9a74b3
0cc59dd303205de7110e298e9b90b1c3b98f4711 25-Sep-2014 Christopher Ferris <cferris@google.com> Add __memcpy_chk assembly for 64 bit.

Bug: 17623887

(cherry picked from commit 8cf61dab5f11ed5654a5760ab47cec0239caafe0)

Change-Id: I91e66ca0c26f04b50308059f9c89d388d55f6e3a
86d16a053eeff3bd432695471d8942e99b2db598 17-Sep-2014 Elliott Hughes <enh@google.com> Clean up the architecture-specific makefiles.

Group things appropriately and name each group.

Bug: 18160821

(cherry picked from commit 7c02d9428ca18ac600f7ba7d51bb24ca71e733f6)

Change-Id: I863242515af44058154d03e2d8c34678e682d66a
43dc3a9aae7ad1f16a251e3c1e22dced82b811e3 24-Sep-2014 Christopher Ferris <cferris@google.com> Remove the unnecessary generic-neon code.

Bug: 18156619
(cherry picked from commit 2169e17482da91865e412e55b52b88d7c8db47f6)

Change-Id: I4a7f5bb9ad4c27b274f3a3c86c1617ca0578b98f
e5e61a0a920a8e6560735b2e565c3bd7a1e35ba5 17-Sep-2014 Elliott Hughes <enh@google.com> Use the kernel's sa_restorer for aarch64.

gdb was happy with what we had, but libgcc and libunwind weren't.
libgcc is happy with the kernel's restorer (because of the extra nop),
though libunwind looks like it's going to need code changes regardless.

We could make our restorer more like the kernel's one, but why bother
when we can just let the kernel supply the canonical one?

Bug: 17436734

(cherry picked from commit 1cff9a89645a8f362a9ce19c7f9544e98c1fd9e7)

Change-Id: Ie13d73fd97395e1979a67c2294e036a97c50000d
7dc2b7b30ddc158a5e7aa6945526eb65d354b96c 11-Sep-2014 Elliott Hughes <enh@google.com> Fix signal trampolines.

* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
kernels will apparently stop supporting the case where SA_RESTORER isn't
set.

* gdb and libunwind care about the exact instruction sequences, so we need to
modify the code slightly in a few cases to match what they're looking for.

* gdb also cares about the exact function names (for some architectures),
so we need to use __restore and __restore_rt rather than __sigreturn and
__rt_sigreturn.

* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.

This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...

(cherry picked from commit 36f451a6d93b6807944d99fa23396e039c47e845)

Bug: 17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
8cf61dab5f11ed5654a5760ab47cec0239caafe0 25-Sep-2014 Christopher Ferris <cferris@google.com> Add __memcpy_chk assembly for 64 bit.

Bug: 17623887
Change-Id: I443723bc941b40f84884b330d222baabee01f868
2169e17482da91865e412e55b52b88d7c8db47f6 24-Sep-2014 Christopher Ferris <cferris@google.com> Remove the unnecessary generic-neon code.

Change-Id: Ib75c33caafd76750ec1aca3a74dec5e4b881e965
7c02d9428ca18ac600f7ba7d51bb24ca71e733f6 17-Sep-2014 Elliott Hughes <enh@google.com> Clean up the architecture-specific makefiles.

Group things appropriately and name each group.

Change-Id: I0da45eb0ccde19c31d5e984d0e6eb3dad26630dc
1cff9a89645a8f362a9ce19c7f9544e98c1fd9e7 17-Sep-2014 Elliott Hughes <enh@google.com> Use the kernel's sa_restorer for aarch64.

gdb was happy with what we had, but libgcc and libunwind weren't.
libgcc is happy with the kernel's restorer (because of the extra nop),
though libunwind looks like it's going to need code changes regardless.

We could make our restorer more like the kernel's one, but why bother
when we can just let the kernel supply the canonical one?

Bug: 17436734
Change-Id: I330fa5e68f23b1cf8133aa552896657b0b873ed3
36f451a6d93b6807944d99fa23396e039c47e845 11-Sep-2014 Elliott Hughes <enh@google.com> Fix signal trampolines.

* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
kernels will apparently stop supporting the case where SA_RESTORER isn't
set.

* gdb and libunwind care about the exact instruction sequences, so we need to
modify the code slightly in a few cases to match what they're looking for.

* gdb also cares about the exact function names (for some architectures),
so we need to use __restore and __restore_rt rather than __sigreturn and
__rt_sigreturn.

* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.

This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...

Bug: 17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
642182341018b282148280a7bdb771493e15bd7d 26-Aug-2014 Elliott Hughes <enh@google.com> Fix pthread_getattr_np for the main thread.

On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>

(cherry picked from commit 57b7a6110e7e8b446fc23cce4765ff625ee0a105)

Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
57b7a6110e7e8b446fc23cce4765ff625ee0a105 26-Aug-2014 Elliott Hughes <enh@google.com> Fix pthread_getattr_np for the main thread.

On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158
5386a741e77bfff4e72ca6861fdd3fe2208452ce 05-Aug-2014 Dan Albert <danalbert@google.com> Revert "Replaces vfork() implementation with fork()"

We're getting cold feet on this one... let's put it back.

This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
(cherry picked from commit 6a918870bab1a55a5f57dd7954abd9a8a27c1bc2)
6a918870bab1a55a5f57dd7954abd9a8a27c1bc2 05-Aug-2014 Dan Albert <danalbert@google.com> Revert "Replaces vfork() implementation with fork()"

We're getting cold feet on this one... let's put it back.

This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9.

Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
8c20c13100d159ff505af9e6e19cab30f368a074 11-Jul-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Add optimized memchr implementation from newlib

Add NEON optimized memchr adapted from newlib

Change-Id: I91b2fafa243e4ab35fa56bb6171d48433c947cfd
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
753eb7f07e7736ba3bd73b2653cbfb8863da2278 28-Jun-2014 Christopher Ferris <cferris@google.com> Add optimized stpcpy.

Change-Id: Ifed38f92a54fef4488fd0ed26a1569059a054574
77561bfe0b83b32d5c5bfc0c97bacae9f4204b34 27-Jun-2014 Christopher Ferris <cferris@google.com> Add optimized 64 bit strcpy.

Change-Id: I4ac12735a53c3ae9336b148ce694fe6c63613139
12c0274d9cdab4469bcdac865ad40b6e76525df7 27-Jun-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Add optimized neon strchr implementation based on newlib

Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: I276ff0f879e733a1115456247e1342b9c5a09015
0ef7a8fd31a7ee9571c54c17e1f42cba4cfb44ec 17-Mar-2014 Shu Zhang <chazhang@nvidia.com> add 64-bit bionic implementation for denver arch

Add 64-bit bionic implementation for denver. memcpy/memset are
denver-specific optimized. Use generic version of other routines.

Change-Id: I44a830e07b82b2986001d73d1540b4080aaa839b
24614b4729a4c8665193f5793b93019b37f779b1 13-Jun-2014 Elliott Hughes <enh@google.com> Remove __memcmp16 from bionic.

Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
210331d9762037afb9b5ed8413079c6f65872df9 06-Jun-2014 Dan Albert <danalbert@google.com> Replaces vfork() implementation with fork()

vfork() was removed from POSIX 2008, so this replaces its implementation
with a call to fork().

Bug: 13935372
Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
40fca0f08b1eb87e283d6f634d9759ed3161f517 04-Jun-2014 Dan Albert <danalbert@google.com> Removes index() from bionic.

This function has been removed from POSIX.

Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place
because defining a preprocessor macro for index() breaks a whole lot of code.

Bug: 13935372
Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
62d92e1610080cad16342f87a7fb46d8388ee4bb 19-May-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Add Aarch64 optimized bzero based on memset

Change-Id: I62cf25bfe23b9d811e00af7307bbd19d89937792
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
b30aff405a220495941f1673b0a5e66c4fa8b84c 28-May-2014 Elliott Hughes <enh@google.com> Revert "Revert "Lose the hand-written futex assembler.""

The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.

There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).

This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)

I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.

This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4 28-May-2014 Narayan Kamath <narayan@google.com> Revert "Lose the hand-written futex assembler."

This reverts commit ced906c849704f379d7191822f6d74993d4fa296.

Causes issues on art / dalvik due to a broken return value
check and other undiagnosed issues.

bug: 15195455

Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
6f2bde344123d8503cd60f3ecd3420f39aa24eb9 23-May-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Add optimized AArch64 versions of bcopy and wmemmove based on memmove

Add optimized versions of bcopy and wmemmove for AArch64 based on the
memmove implementation

Change-Id: I82fbe8a7221ce224c567ffcfed7a94a53640fca8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
fd0ce866ce46ed62aa17dc2959a085cb3bf5755d 24-May-2014 Christopher Ferris <cferris@google.com> Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"

This reverts commit 8167dd7cb98e87ffe9b40e4993c330b244ca2234.

For some reason I thought the bcopy change was bzero. The bcopy code doesn't pass our tests, so reverting until I can figure out what's wrong.

Change-Id: Id89fe959ea5105cd58dff6bba8d91a30cc4bcb07
8167dd7cb98e87ffe9b40e4993c330b244ca2234 23-May-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Add optimized AArch64 versions of bcopy and wmemmove based on memmove

Add optimized versions of bcopy and wmemmove for AArch64 based on the
memmove implementation

Change-Id: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
ced906c849704f379d7191822f6d74993d4fa296 23-May-2014 Elliott Hughes <enh@google.com> Lose the hand-written futex assembler.

Also stop exporting 'futex'.

Bug: 12250341
Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
5a92284167ffba6d45210ef6889fa7d255c15d4f 24-Apr-2014 Varvara Rainchik <varvara.rainchik@intel.com> Add 32-bit Silvermont-optimized string/memory functions.

Add following functions:
bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen,
strcpy, strncpy, stpcpy, stpncpy.
Create new directories inside arch-x86 to specify architecture: atom,
silvermont and generic (non atom or silvermont architectures are treated like generic).
Due to introducing optimized versions of stpcpy and stpncpy,
c-implementations of these functions are moved from
common for architectures makefile to arm and mips specific makefiles.

Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2146d142b23b830ad94f8479ce5abeaa15820e7d 02-May-2014 Christopher Ferris <cferris@google.com> Use larger neon instructions for moving data.

Included is a new target generic-neon that will use neon instructions
on 64 bit platforms where appropriate.

Change-Id: Iaf71b768780aa9240a24539cd87666ca9298e4c6
5363a45f2b6d4eeb054710d0886bbadea8a15273 08-Apr-2014 Elliott Hughes <enh@google.com> Clean up localeconv(3).

The OpenBSD doesn't support C99, and the extent to which we support
locales is trivial, so just do it ourselves.

Change-Id: If0a06e627ecc593f7b8ea3e9389365782e49b00e
50282f72bb9be6b49212a3978faec70786e9f97f 25-Mar-2014 Pavel Chupin <pavel.v.chupin@intel.com> Add lconv declaration and localeconv(3)

lconv is taken from ndk/sources/android/support/include/locale.h and
matches
bsd/glibc upstream.
Keep old declaration for 32-bits for compatibility.
localeconv.c and deps are taken from openbsd upstream.
Changed strtod.c accordingly.

Change-Id: I9fcc4d15f5674d192950d80edf26f36006cd31b4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
7e4fa560999d07064d219a16ebb50d3691dd1b63 05-Mar-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Add ARMv8 optimized string handling functions based on cortex-strings

This adds ARMv8 optimized string handling functions to Bionic.
The implementations live in a generic/ directory because there will
likely be more CPU specific versions (e.g. Cortex-A53 vs. Cortex-A57)
later.

These implementations are 50%+ faster on current v8 models.

Change-Id: If3adc54a284d9519459b0d4d4390f0cd6ded8786
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
b6208836cb9d3254a5e2046a71ac4ec30a0efdf5 26-Feb-2014 Elliott Hughes <enh@google.com> Fix LP64 builds after OpenBSD string changes.

Change-Id: I07202f6484e716d153d0387fcfc023e119438251
53e43292aac91bf62995788cd5ca2ceb7caea283 25-Feb-2014 Elliott Hughes <enh@google.com> More OpenBSD cleanup (primarily string).

This patch removes the string/ and wchar/ directories.

Change-Id: Ia489904bc67047e4bc79acb1f3eec21aa3fe5f0d
6e39ba73bfd9504762e8798fd6b293f11d5fdf7e 20-Feb-2014 Elliott Hughes <enh@google.com> Stop advertising an arm32-specific hack like it's a build system feature.

Change-Id: I3a830b4a3516b6eb8e4f8e6e6b122a22a2e341df
f25d677147ae55a1f3b6ef7fa3ee27921792813f 24-Jan-2014 Ying Wang <wangying@google.com> Reconfig libc's Android.mk to build for multilib

1. Moved arch-specific setup to their own files:
- <arch>/<arch>.mk, arch-specific configs. Variables in those config
end with the arch name.
- removed the extra complexity introduced by function libc-add-cpu-variant-src,
which seems to be not very useful these days.
2. Separated out the crt object files generation rules and set up the
rules for both TARGET_ARCH and TARGET_2ND_ARCH.
3. Build all the libraries for both TARGET_ARCH and TARGET_2ND_ARCH,
with the arch-specific LOCAL_ variables.

Bug: 11654773
Change-Id: I9c2d85db0affa49199d182236d2210060a321421
a6ecba4d233d7b769a05ee81ae908c9105352624 11-Feb-2014 Elliott Hughes <enh@google.com> Clean up cacheflush.

No cacheflush for LP64; use the GCC builtin instead. Clean up the
32-bit MIPS implementation now we no longer need to worry about
old versions of GCC.

Bug: 12924756
Change-Id: Ie23955b3ec194e226c4b2bce35b11d5e061f4753
0266ae5f884d72da58f33a072e865ba131234a5e 11-Feb-2014 Elliott Hughes <enh@google.com> Switch <elf.h> over to linux uapi under the covers.

Remove the linker's reliance on BSD cruft and use the glibc-style
ElfW macro. (Other code too, but the linker contains the majority
of the code that needs to work for Elf32 and Elf64.)

All platforms need dl_iterate_phdr_static, so it doesn't make sense
to have that part of the per-architecture configuration.

Bug: 12476126
Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487
d1973ca51325393f304e82a4d79874f33e54ac16 22-Jan-2014 Colin Cross <ccross@android.com> bionic: rename aarch64 target to arm64

Rename aarch64 build targets to arm64. The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3