6c54ddd20f663de9e383fcd7b4cff93471369d87 |
|
08-Dec-2015 |
Elliott Hughes <enh@google.com> |
Fix -fstack-protector-strong for x86. We need to ensure %gs:20 is set up early enough for -fstack-protector-strong on x86, and that __set_tls doesn't get stack protector checks because it's a prerequisite for them. x86 devices/emulators won't boot without this. Bug: http://b/26073874 Change-Id: Icf0d34294648cc0c8cb406a3617befe0d45c525a
|
268a673bd1add941e331b2f53758242d939ca5b1 |
|
15-Oct-2015 |
Dan Willemsen <dwillemsen@google.com> |
Switch to LOCAL_SRC_FILES_EXCLUDE This moves the generic arm/arm64/x86 settings into the main makefiles and makes the rest of them derivatives. This better aligns with how soong handles arch/cpu variants. Also updates the Android.bp to make it consistent with the make versions. Change-Id: I5a0275d992bc657459eb6fe1697ad2336731d122
|
1742a32aea4108a8a967e8da2131de30c8808658 |
|
05-Feb-2015 |
Colin Cross <ccross@android.com> |
Share LP32 makefile settings between arches Add <var>_32 to patch-up-arch-specific-flags, and move the LP32 cruft varaibles from the 32-bit arch specific makefiles into the top level Android.mk. Change-Id: Id3fcf6805d4af048c2524c94b1295416ebe7d057
|
8d4c55cc741c4107f8a0fba16e5c178c9feb5d81 |
|
06-Dec-2014 |
Elliott Hughes <enh@google.com> |
Clean up the x86-64 and x86 setjmp families. Bug: 16918359 Change-Id: Ic8ca0af9ea99636bc71f19d46071f1cea6eef982
|
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
|
8eb8c3929974060e0d8b5063886d6ed250198d41 |
|
26-Sep-2014 |
Pavel Chupin <pavel.v.chupin@intel.com> |
[x86,x86_64] Fix libgcc unwinding through signal This change provides __restore/__restore_rt on x86 and __restore_rt on x86_64 with unwinding information to be able to unwind through signal frame via libgcc provided unwinding interface. See comments inlined for more details. Also remove the test that had a dependency on __attribute__((cleanup(foo_cleanup))). It doesn't provide us with any better test coverage than we have from the newer tests, and it doesn't work well across a variety architectures (presumably because no one uses this attribute in the real world). Tested this on host via bionic-unit-tests-run-on-host on both x86 and x86-64. Bug: 17436734 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com> (cherry picked from commit 50321e2e66f19998970e59d666bc9af387345b3a) Change-Id: Iba90e36958b00c7cc7db5eeebf888dc89ce4d619
|
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
|
50321e2e66f19998970e59d666bc9af387345b3a |
|
26-Sep-2014 |
Pavel Chupin <pavel.v.chupin@intel.com> |
[x86,x86_64] Fix libgcc unwinding through signal This change provides __restore/__restore_rt on x86 and __restore_rt on x86_64 with unwinding information to be able to unwind through signal frame via libgcc provided unwinding interface. See comments inlined for more details. Also remove the test that had a dependency on __attribute__((cleanup(foo_cleanup))). It doesn't provide us with any better test coverage than we have from the newer tests, and it doesn't work well across a variety architectures (presumably because no one uses this attribute in the real world). Tested this on host via bionic-unit-tests-run-on-host on both x86 and x86-64. Bug: 17436734 Change-Id: I2f06814e82c8faa732cb4f5648868dc0fd2e5fe4 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
6869d26ad9f0e42f7b8ca0a8a331e6119759d211 |
|
07-Oct-2014 |
Christopher Ferris <cferris@google.com> |
Force export symbols on all x86 variants in libc. For silvermont, the __popcountsi2 symbol does not get exported by libc. But for atom, this symbol is exported. Since we already exported this symbol for previous releases, it's better to just follow through and force the export, but only for 32 bit. x86 64 bit will not export this symbol. Bug: 17681440 (cherry picked from commit d11eac3455a059a092ceee92eda9905e1d661e94) Change-Id: I93704c721d98d569922f606f214069bda24872ba
|
d11eac3455a059a092ceee92eda9905e1d661e94 |
|
07-Oct-2014 |
Christopher Ferris <cferris@google.com> |
Force export symbols on all x86 variants in libc. For silvermont, the __popcountsi2 symbol does not get exported by libc. But for atom, this symbol is exported. Since we already exported this symbol for previous releases, it's better to just follow through and force the export, but only for 32 bit. x86 64 bit will not export this symbol. Bug: 17681440 Change-Id: I6c62245f0960910f64baaaf6d9d090bf3ea5f435
|
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
|
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
|
c82c0b7e072491da4818e7de37411fbb2055fce1 |
|
17-Jun-2014 |
Dan Albert <danalbert@google.com> |
Remove SHA1 from LP64 in favor of libcrypto. Keep the symbols around on LP32 for binary compatibility. Bug: 11156955 Change-Id: I379a7e0fa3092e9a70daeafcbcb2aacfc314031a
|
8e613cf342b369f7985135dbe11ebdbf8c736157 |
|
11-Jun-2014 |
Dan Albert <danalbert@google.com> |
Remove declaration for putw(3)/getw(3). These were both removed from POSIX 2004, and we don't define an implementation for getw(3). Keep the definition of put(3) on LP32 for binary compatibility. Bug: 13935372 Change-Id: Iba384b45093ac6d2d7c2d81f7980cd7701dd6f56
|
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
|
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>
|
8d77bce185d04c531bd9bf34d38e5cbbe644d3a3 |
|
22-Apr-2014 |
Elliott Hughes <enh@google.com> |
LP64 shouldn't include the non-standard <time64.h> cruft. This patch includes just enough to keep external/chromium_org building until they switch 64-bit Android over to using the regular non-Android code. Change-Id: Iecaf274efa46ae18a42d5e3439c5aa4f909177c1
|
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
|
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
|
36d6188f8cd8b948fb797f11d9620d63d0c2215a |
|
19-Nov-2013 |
Elliott Hughes <enh@google.com> |
Clean up forking and cloning. The kernel now maintains the pthread_internal_t::tid field for us, and __clone was only used in one place so let's inline it so we don't have to leave such a dangerous function lying around. Also rename files to match their content and remove some useless #includes. Change-Id: I24299fb4a940e394de75f864ee36fdabbd9438f9
|
bf425680e484486803bf21e4c4cd1e3f36614a3c |
|
25-Oct-2013 |
Elliott Hughes <enh@google.com> |
Let the compiler worry about implementing ffs(3). It does at least as good a job as our old hand-written assembly anyway. Change-Id: If7c4a1ac508bace0b71ee7b67808caa6eabf11d2
|
2a0b873065edb304fa2d1c54f8de663ea638b8ab |
|
09-Oct-2013 |
Elliott Hughes <enh@google.com> |
Fix __errno for LP64 and clean up __get_tls. If __get_tls has the right type, a lot of confusing casting can disappear. It was probably a mistake that __get_tls was exposed as a function for mips and x86 (but not arm), so let's (a) ensure that the __get_tls function always matches the macro, (b) that we have the function for arm too, and (c) that we don't have the function for any 64-bit architecture. Change-Id: Ie9cb989b66e2006524ad7733eb6e1a65055463be
|
7e841ed688947855a3bd20d2b23a44599257038a |
|
04-Oct-2013 |
Elliott Hughes <enh@google.com> |
Remove useless x86 fallbacks. The NDK ABI requires that you support SSE2, and the build system won't let you build with ARCH_X86_HAVE_SSE2 set to false. So let's stop pretending this constant is actually a variable, and let's remove the corresponding dead code. Also, the USE_SSE2 and USE_SSE3 macros are unused, so let's not bother setting them. Change-Id: I40b501d998530d22518ce1c4d14575513a8125bb
|
3c4b50fd8cce143d9ba8f03a93f0fccba4e54d14 |
|
26-Jul-2013 |
Pavel Chupin <pavel.v.chupin@intel.com> |
Fix strchr for basic non-sse case on x86 Fix source location. Move declaration of __strchr_chk out of ifdef __BIONIC_FORTIFY which should be available for strchr.cpp compilation when __BIONIC_FORTIFY is not defined. Change-Id: I552a6e16656e59b276b322886cfbf57bbfb2e6a7 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
baa91f4f8974b6e9a81fa3aa49f051b3bf823653 |
|
26-Jun-2013 |
Alexander Ivchenko <alexander.ivchenko@intel.com> |
Add ssse3 implementation of __memcmp16. __memcmp16 was missing in x86. Also added C-version for backward compatibility. Added bionic test for __memcmp16 and for wmemcmp. Change-Id: I33718441e7ee343cdb021d91dbeaf9ce2d4d7eb4 Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
|
0a490665a3a287cd3aee1e7327f2381222c387c4 |
|
16-Jan-2012 |
Liubov Dmitrieva <liubov.dmitrieva@intel.com> |
bionic/x86: Optimization for string routines Optimized strcpy, strcat, strncpy, strncat, strlcpy, strlcat, memchr, memrchr, strchr, strrchr, index, strnlen, strlen, wcslen, wmemcmp, wcscmp, wcschr, wcsrchr, wcscpy, wcscat Change-Id: I82b29132edf9a2e144e0bb3ee4ff5217df8d2a6d Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
|
04954a43b362b8c817cc5859513efad0c344f412 |
|
26-Feb-2013 |
Christopher Ferris <cferris@google.com> |
Break bionic implementations into arch versions. Move arch specific code for arm, mips, x86 into separate makefiles. In addition, add different arm cpu versions of memcpy/memset. Bug: 8005082 Merge from internal master (acdde8c1cf8e8beed98c052757d96695b820b50c). Change-Id: I04f3d0715104fab618e1abf7cf8f7eec9bec79df
|
7c83a1ed81a15f3e75836c1ac7d500a952f02e10 |
|
26-Feb-2013 |
Christopher Ferris <cferris@google.com> |
Break bionic implementations into arch versions. DO NOT MERGE Move arch specific code for arm, mips, x86 into separate makefiles. In addition, add different arm cpu versions of memcpy/memset. Bug: 8005082 (cherry picked from commit acdde8c1cf8e8beed98c052757d96695b820b50c) Change-Id: I0108d432af9f6283ae99adfc92a3399e5ab3e31d
|
acdde8c1cf8e8beed98c052757d96695b820b50c |
|
26-Feb-2013 |
Christopher Ferris <cferris@google.com> |
Break bionic implementations into arch versions. Move arch specific code for arm, mips, x86 into separate makefiles. In addition, add different arm cpu versions of memcpy/memset. Bug: 8005082 Change-Id: I04f3d0715104fab618e1abf7cf8f7eec9bec79df
|