55ca56c27ca166a247b1e621a0a0e3f4d1907b4d |
07-Feb-2018 |
Dan Albert <danalbert@google.com> |
Fix __gnu_Unwind_Find_exidx again. The math on the size calculation was wrong as the type of __exidx_start/__exidx_end was unsigned rather than a char. Make a struct that represents each item instead and remove the division. Test: built artifacts and used them in the NDK Bug: None Change-Id: Ic2c0c123a369b9319e8645d806d659290eb2f69c
xidx_static.c
|
e58d49e76c56b835a1713803292fef5d25095ad5 |
05-Feb-2018 |
Elliott Hughes <enh@google.com> |
Improve the comment in the ARM setjmp.S. Based on code review comments for 460130b7d07f0efba7f4f43f657f0f60daeb71e2. Bug: N/A Test: N/A Change-Id: Ia86bc92dfe3f18261e06af33488a548ea9911b10
etjmp.S
|
460130b7d07f0efba7f4f43f657f0f60daeb71e2 |
31-Jan-2018 |
Elliott Hughes <enh@google.com> |
Fix sigsetjmp/siglongjmp to save/restore RT signals on arm/x86 too. Our arm and x86 ABIs shipped with a 32-bit `sigset_t`, so we need to use sigprocmask64 to save/restore the RT signals too. (This is important because several are in use by the system, and the behavior of our 32-bit `sigset_t` is to clear the RT signals.) Bug: http://b/72493232 Test: ran tests Change-Id: Idff91f8b2849276e5a3073d07eccd84e02a34410
etjmp.S
|
7ebafb365a99968ea87fd7d62c1b0eab1b3f1033 |
29-Jan-2018 |
Elliott Hughes <enh@google.com> |
Use sigprocmask rather than sigblock/sigsetmask. No effect right now, because sigprocmask on LP32 also only touches the non-RT signals, but this makes it easier to switch to __rt_sigprocmask. Bug: http://b/72460436 Test: ran tests Change-Id: I693f0ea36701e9ab5d10e6aefb26387ba45a6064
etjmp.S
|
aeb5bc658feaa579b72560a7026374cbeb38ea56 |
25-Jan-2018 |
Dan Albert <danalbert@google.com> |
Fix __gnu_Unwind_Find_exidx for static executables. __exidx_start and __exidx_end are not actual values to be read, just symbols placed before and after .ARM.exidx. The default linker script for ARM static executables includes these lines: __exidx_start = .; .ARM.exidx : { *(.ARM.exidx*) } __exidx_end = .; http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0474c/BABEHEDA.html Test: used __gnu_Unwind_Find_exidx in a static executable and showed non-bogus values Test: verified that this fixes #593 in the NDK Bug: https://github.com/android-ndk/ndk/issues/593 Change-Id: Ib35a4b6c82920666ae8a45aa0a2d43e458699b51
xidx_static.c
|
12533271fbc1eec185943691fa8a4410d512de89 |
04-Dec-2017 |
Elliott Hughes <enh@google.com> |
Give ELF notes 4-byte alignment. Use .balign because what the argument means doesn't vary between architectures. Bug: http://b/70166421 Test: builds Change-Id: I1d54f2f6942dd2893f3fda30bac08d07ea9cd346
user_helper_on.S
|
fa432524a66e5797874ef50e4ede95ded4cee199 |
25-Oct-2017 |
dimitry <dimitry@google.com> |
Mark __BIONIC_WEAK_FOR_NATIVE_BRIDGE symbols To make it easier for Native Bridge implementations to override these symbols. Bug: http://b/67993967 Test: make Change-Id: I4c53e53af494bca365dd2b3305ab0ccc2b23ba44
etjmp.S
fork.S
|
7a3681e5b6c39bc2b3b62031ca5941dbf7bc4e63 |
25-Apr-2017 |
Christopher Ferris <cferris@google.com> |
Move libc_log code into libasync_safe. This library is used by a number of different libraries in the system. Make it easy for platform libraries to use this library and create an actual exported include file. Change the names of the functions to reflect the new name of the library. Run clang_format on the async_safe_log.cpp file since the formatting is all over the place. Bug: 31919199 Test: Compiled for angler/bullhead, and booted. Test: Ran bionic unit tests. Test: Ran the malloc debug tests. Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
texit_legacy.c
|
dd91b32baf376d4ef84f4713bb758e1a0c892701 |
09-Feb-2017 |
mspector <mspector@google.com> |
Removing the kuser_helper elf note from building This change removes the kuser_helper note from building automatically with any binary but leaves the note. Also fixes a typo in the note. Original patch adding the note: Ib8366e2a0810092b71381d57dee4bdaa56369a24 Bug: 34815073 Test: Manual - Note is no longer added to binaries Change-Id: Ieb81f9d9127d1f8a522434a31c696d743238e2a5
user_helper_on.S
|
2e3d6a1d67f78ea37ceb5a082eefbb812c0a320e |
25-Jan-2017 |
mspector <mspector@google.com> |
Adding kuser_helper on note to all arm32 binaries. A kernel change is going in for 64bit arm to disable kuser_helper vector pages for 32bit processes. This change adds a special elf note to all arm32 binaries built with bionic. This note tells the kernel to load the kuser_helper vector page for the process. Bug: 33689037 Test: Manual - Phone boots, 32bit binaries have the notes, 64bit binaries do not. Change-Id: Ib8366e2a0810092b71381d57dee4bdaa56369a24
user_helper_on.S
|
4bf55226623801fab4751bc0736a07e044d00b49 |
30-Nov-2016 |
Elliott Hughes <enh@google.com> |
Abort harder. Some PoS internal system can't cope with more than 4 stack frames, so the fact that our abort(3) implementation takes 4 frames by itself makes it useless. Re-reading POSIX, it only says "behaves as if", so the previous implementation chain wasn't mandatory and we can just go straight to calling tgkill... Before: #00 pc 0000000000069be4 /system/lib64/libc.so (tgkill+8) #01 pc 0000000000066d50 /system/lib64/libc.so (pthread_kill+64) #02 pc 0000000000028110 /system/lib64/libc.so (raise+24) #03 pc 000000000001d4ec /system/lib64/libc.so (abort+52) After: #00 pc 0000000000069bc8 /system/lib64/libc.so (tgkill+8) #01 pc 000000000001d4c8 /system/lib64/libc.so (abort+80) #02 pc 0000000000001494 /system/xbin/crasher64 (_ZL9do_actionPKc+872) #03 pc 00000000000010e0 /system/xbin/crasher64 (main+88) This is less useful on 32-bit ARM because there there's an extra trampoline from an assembler abort(3) implementation, so you'll still only get one meaningful stack frame. But every other architecture will now get two! But wait! It turns out that the assembler hack isn't needed any more. Here we are unwinding just fine all the way through the 32-bit ARM crasher: Before (with direct call to tgkill but still using the assembler): #00 pc 00049e7c /system/lib/libc.so (tgkill+12) #01 pc 00019c6f /system/lib/libc.so (__libc_android_abort+50) #02 pc 000181f8 /system/lib/libc.so (abort+4) #03 pc 00001025 /system/xbin/crasher (_ZL9do_actionPKc+656) #04 pc 00017721 /system/lib/libc.so (__libc_init+48) #05 pc 00000b38 /system/xbin/crasher (_start+96) After: #00 pc 00049e6c /system/lib/libc.so (tgkill+12) #01 pc 00019c5f /system/lib/libc.so (abort+50) #02 pc 00001025 /system/xbin/crasher (_ZL9do_actionPKc+656) #03 pc 00017721 /system/lib/libc.so (__libc_init+48) #04 pc 00000b38 /system/xbin/crasher (_start+96) (As you can see, the fact that we see __libc_init rather than main was true with the assembler stub too, so that's not a regression even if it does seem odd...) Bug: N/A Test: ran crasher64 Change-Id: I9dd5b214c495604c8b502c7ec0de3631080d8c29
bort_arm.S
|
beb879662470fb01f8062c173d9e6fc1b76988ee |
27-Oct-2016 |
Elliott Hughes <enh@google.com> |
Use ENTRY_PRIVATE in __bionic_clone assembler. Bug: N/A Test: bionic tests Change-Id: Ic651d628be009487a36d0b2e5bcf900b981b1ef9
_bionic_clone.S
|
dfb74c5f597542c7587a4144eb31b143d82a2281 |
24-Oct-2016 |
Elliott Hughes <enh@google.com> |
Minor copyright header unification. Regenerating the NOTICE file the other day left me scratching my head at various "how do they differ?" cases, resolved by this patch. Test: N/A Change-Id: I4230bfa1d7ec842a4b9fb8c73dd3b39443d74054
etjmp.S
|
2fc14a97e0159f6126450991cc9c97376b66eb9b |
08-Sep-2016 |
Elliott Hughes <enh@google.com> |
Don't use an anonymous label in arm's __bionic_clone. All the other architectures name this label. Copy them. (Following discussion of d30bc9e74b8ff3afceac973d334023564e64dbd2.) Bug: https://llvm.org/bugs/show_bug.cgi?id=30308 Change-Id: I4f20163f569041180d87c79ce6ed856b70704271
_bionic_clone.S
|
d30bc9e74b8ff3afceac973d334023564e64dbd2 |
06-Sep-2016 |
MinSeong Kim <minseong.kim@linaro.org> |
Fix "Unknown token error" when upstream clang is used. Simple fix for the above error caused by the location of a label "1:" Change-Id: I9b1c816871e95f9bcf8135a5e0cc88de65771315 Signed-off-by: MinSeong Kim <minseong.kim@linaro.org>
_bionic_clone.S
|
a4c69137c693c45fce4010ba61d69d7147f5dd9a |
03-Mar-2016 |
Josh Gao <jmgao@google.com> |
Add a checksum to jmp_buf on ARM. Make it easier to diagnose applications mucking with the contents of jmp_buf by checksumming its contents. Bug: http://b/27417786 Change-Id: I9989e2ea3979a36ae0bc4c9e1bacafddbacc731b
etjmp.S
|
19acb698e8f741b85423bf43e96776e9c598905d |
25-Feb-2016 |
Dimitry Ivanov <dimitry@google.com> |
[MIPS] Add __popcountsi2 to libgcc_compat.c Also removed outdated genlibgcc_compat.py script and references to it. Bug: http://b/27340856 Change-Id: I7eef362364078867c60a27e72abba515f08b6651
ibgcc_compat.c
|
6d142bcf34ffd49efaf4285bb2af63a1636706f9 |
08-Jan-2016 |
Dimitry Ivanov <dimitry@google.com> |
Move __aeabi* symbols to LIBC_N version We had these symbols incorrectly versioned as LIBC_PRIVATE in M release. This change moves __aeabi* symbols from LIBC to LIBC_N and adds __gnu_Unwind_Find_exidx to the list Bug: https://github.com/android-ndk/ndk/issues/1 Change-Id: I0b353012adeacb00ae29ea10c63b9d1cf1cadbe7
_aeabi.c
xidx_dynamic.c
|
6f72fdede8c820cabc5e823763dae34bcbeeb40b |
06-Jan-2016 |
Dimitry Ivanov <dimitry@google.com> |
Fix gcc+arm builds gcc requires unique names of symbols for .symver Bug: http://b/26391427 Change-Id: I6392e34a45a37245fd4e53fb54243be73f443313
_aeabi.c
|
d90d067312ac9aaf82e272b4477f0ba71a9b0bdd |
06-Jan-2016 |
Dimitry Ivanov <dimitry@google.com> |
Export public __aeabi* symbols as LIBC_PRIVATE But keep LIBC as default version for them Bug: http://b/26391427 Bug: http://b/26410625 Change-Id: I819e354bbba482d1f983d9be15c23fcce10e5dd9
_aeabi.c
|
b24d743f62106accb3720e482c32571a0cb2defb |
19-Oct-2015 |
Josh Gao <jmgao@google.com> |
Remove deprecated use of ldm/stm in ARM setjmp. ARM deprecates using the SP register in the register lists for ldm and stm, which LLVM emits a warning for. Bug: http://b/25017080 Change-Id: Ib427e3dfd5740e251f1ad91ebb66534e0d7b72a9
etjmp.S
|
8f8308c974169d7b9909db361e14cd257d47b2a7 |
01-Oct-2015 |
Christopher Ferris <cferris@google.com> |
Add a no dwarf version of assembler macros. For the __release and __release_rt functions, the previous macros would add a dwarf cfi entry for the function with no values. This works with libunwind since it always tries the arm unwind information first. This change removes those entries by creating a no dwarf version of the assembler macro. Change-Id: Ib93e42fff5a79b8d770eab0071fdee7d2afa988d
_restore.S
|
7fda8d2aa4d24ab400f6f0cb9f792488b634afae |
11-Sep-2015 |
Josh Gao <jmgao@google.com> |
Implement setjmp cookies on ARM. Reuse the top bits of _JB_SIGFLAG field previously used to store a boolean to store a cookie that's validated by [sig]longjmp to make it harder to use as a ROP gadget. Additionally, encrypt saved registers with the cookie so that an attacker can't modify a register's value to a specific value without knowing the cookie. Bug: http://b/23942752 Change-Id: Id0eb8d06916e89d5d776bfcaa9458f8826717ba3
etjmp.S
|
06b3f70cfecc372d2fdb5dd7665ccef2f8d09527 |
22-Aug-2015 |
Josh Gao <jmgao@google.com> |
Add exported __popcount_tab for libgcc compat under compiler-rt. Change-Id: I8df09e8f199761edbba290d7f1ea530781054b03
opcount_tab.c
|
5891abdc66aa9578395bc8b8e5740f629a2694b7 |
08-Aug-2015 |
Elliott Hughes <enh@google.com> |
Invalidate cached pid in vfork. Bug: http://b/23008979 Change-Id: I1dd900ac988cdbe10aad3abc53240c5d352891d5
fork.S
|
95fd031c4d22b90c542621170bb6d4d05bb94457 |
21-Jul-2015 |
Dan Albert <danalbert@google.com> |
Revert "Stop libc from cross-referencing unwind symbols" This reverts commit cd13b14e98d4921af126667fae0cf6613a5615c5. Bug: http://b/19958712 Change-Id: I7cc7f69728c42c37e129aee30d761c4cd7e30e94
ibgcc_protect_unwind.c
|
c69ace87ec110a91005bdf19dbafeb355f399c06 |
12-May-2015 |
Elliott Hughes <enh@google.com> |
Simplify three copyright headers. There's no reason to have multiple years in our own copyright headers, and given the stupidity of our NOTICE file generation, it just creates more junk. Change-Id: I065a3811c2e2584e3b649a18ad9460286bc72b92
_bionic_clone.S
|
cd13b14e98d4921af126667fae0cf6613a5615c5 |
04-Apr-2015 |
Dmitriy Ivanov <dimitry@google.com> |
Stop libc from cross-referencing unwind symbols This makes unwind symbols 'protected', which should prevent them from relocating against libc++.so/libcutls.so. This is temporary file and it is going to be removed once libc.so stops exporting them. Bug: http://b/19958712 Change-Id: I96a765afe47e68d2e2ceb288870e63a25ca52081
ibgcc_protect_unwind.c
|
24958514b92c9b9e111223e4e4c56ef1a52b6403 |
25-Mar-2015 |
Christopher Ferris <cferris@google.com> |
Use ALIAS_SYMBOL for assembler aliasing. Change-Id: I8d04d2da0a1ac440cc9044fc819c9a8eda5ff17d
etjmp.S
|
1ef6ec40e150b7a75963eb2866cfde2381e72e81 |
15-Dec-2014 |
Elliott Hughes <enh@google.com> |
Move the generic arm memcmp.S into the generic directory. Change-Id: I48e4d14a0dcddbb246edbac6d0329619574ab44d
emcmp.S
|
f92cc305711c7a64582f0f71f691f18262435e94 |
15-Dec-2014 |
Elliott Hughes <enh@google.com> |
Remove arm assembler not referenced from any makefile. I also suspect that libc/arch-arm/bionic/memcmp.S is supposed to like in the generic directory these days, but this change just removes dead code. Change-Id: I9072488df6e9b7261d79b6014914a0e937cb387b
emcpy.S
emcpy.a9.S
trcmp.S
|
51f5d83237ce104655f1bc05576ed8ebf64e97cc |
10-Dec-2014 |
Elliott Hughes <enh@google.com> |
Fix arm64 clone stack handling. Make sure we adjust the stack pointer so a signal can't overwrite data. Bug: 15195265 Change-Id: I5ab9469a82cb214c32f40a713268a1ab74a4c6fa
_bionic_clone.S
|
c3d1728583907e23d1a4493e02835622514d1dd0 |
10-Dec-2014 |
Jiangli Yuan <a6808c@motorola.com> |
Use the stmdb instead of str to save the fn/arg Directly save data into stack without properly adjustment of stack point is dangous. For example, if a signal comes, kernel will put sigframe into userspace's stack, which will overwrite the saved data if sp is not adjusted properly. Bug: 15195265 Change-Id: Iea0cadfd3b94d50cf40252ad52fe5950811b9192 Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
_bionic_clone.S
|
75096226c80646f8bfcdee7c018abbb9f9f617f0 |
09-Dec-2014 |
Elliott Hughes <enh@google.com> |
Switch arm and arm64 over to the x86 style of jmpbuf. Specifically, use the argument to sigsetjmp as a flag in the buffer to indicate whether or not the signal mask is valid. Bug: 16918359 Change-Id: I5bb1f1220f14c105c6bc57e0c28c1dc366d1438f
etjmp.S
|
7b78e8187ef29b40a0df47e045dff33778d1fa4f |
06-Dec-2014 |
Elliott Hughes <enh@google.com> |
Fix signal mask save/restore for arm64. Bug: 16918359 Change-Id: Ieb15f7f1658f5accee05665b72ba17831a80ea9d
etjmp.S
|
b393299b852415f2e7dd4e5bbd12d4f2aff64e2d |
06-Dec-2014 |
Elliott Hughes <enh@google.com> |
Clean up arm setjmp family. Bug: 16918359 Change-Id: I9b986bdbdbaefe9d9896a820ee8cfe860adfe5c5
setjmp.S
etjmp.S
igsetjmp.S
|
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
setjmp.S
etjmp.S
|
cb4c615bb9583d78efc6d00115ed5b8f1113ce2d |
04-Dec-2014 |
Elliott Hughes <enh@google.com> |
Remove __ARM_HAVE_VFP. Bug: 18556103 Change-Id: I6d4cc6a1b359ad2df1ce6687fd26f392059f6efd
setjmp.S
etjmp.S
|
690211fcf8a2665158c174c00e184cbcfa16ed28 |
27-Sep-2014 |
Dan Albert <danalbert@google.com> |
Make __aeabi_*() symbols weak. This is needed to avoid multiple symbol definitions when linking with libstdc++ or with compiler-rt. Change-Id: I2f713bcff113222f0d2538e49691e715d8a8475d
_aeabi.c
|
148dff3ec6114a03acc722ae43990f1b342abad9 |
16-Sep-2014 |
Elliott Hughes <enh@google.com> |
Fix 32-bit arm unwinding through signal frames. gdb was already okay; libgcc and libunwind need a little extra help. Bug: 17436734 Change-Id: I1f5108f9877373be078554a1ea4938aa4436204e
_restore.S
_restore_rt.S
|
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
_restore.S
_restore_rt.S
|
011e111d299284b65af07add523a9dccac356244 |
09-Sep-2014 |
Elliott Hughes <enh@google.com> |
Ensure __set_errno is still visible on LP32. The use of the .hidden directive to avoid going via the PLT for __set_errno had the side-effect of actually making __set_errno hidden (which is odd because assembler directives don't usually affect symbols defined in a different file --- you can't even create a weak reference to a symbol that's defined in a different file). This change switches the system call stubs over to a new always-hidden __set_errno_internal and has a visible __set_errno on LP32 just for binary compatibility with old NDK apps. (cherry-pick of 7efad83d430f4d824f2aaa75edea5106f6ff8aae.) Bug: 17423135 Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
_bionic_clone.S
yscall.S
|
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
_get_sp.S
|
0e7f8a9e52bac84c69aa2260d2a6356584ff3674 |
20-Aug-2014 |
Elliott Hughes <enh@google.com> |
Simplify _ALIGN_TEXT. Bug: 16872067 Change-Id: I2b622f252c21ce1b344c040f828ab3f4bf9b6c0a
igsetjmp.S
|
651a0683ca7ba911beb776975ec893de326d62d2 |
07-Aug-2014 |
Elliott Hughes <enh@google.com> |
Remove misleading arm/arm64 PIC_SYM. Bug: 16823325 Change-Id: Ic8ff3a628bb4cd71361e3a1c2cfde4b3d39c50b1
setjmp.S
bort_arm.S
etjmp.S
igsetjmp.S
|
c999f76977d2389a3e2dcbdd98f20d93c3193727 |
11-Jul-2014 |
Elliott Hughes <enh@google.com> |
Enable building libc with clang. Bug: 16218205 Change-Id: I024de2044fe016412c7bead22c264e96be4cb39c
_aeabi.c
abi.c
|
24614b4729a4c8665193f5793b93019b37f779b1 |
13-Jun-2014 |
Elliott Hughes <enh@google.com> |
Remove __memcmp16 from bionic. Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
emcmp16.S
|
ebc8cd117a562f387c52ed4e1aeba0fb21f33194 |
07-Jun-2014 |
Elliott Hughes <enh@google.com> |
Rename __bionic_clone_entry to __start_thread. This seems a bit less obscure. Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
_bionic_clone.S
|
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
utex_arm.S
|
52f74322b1d72d57146107f32ee2c76c421bf4b1 |
28-May-2014 |
Narayan Kamath <narayan@google.com> |
Merge "Revert "Lose the hand-written futex assembler.""
|
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
utex_arm.S
|
8df0fe0c74b7af819f36e37ec9b924fdd22c8ba4 |
24-May-2014 |
Ben Cheng <bccheng@google.com> |
Clear link register in __bionic_clone. Since __bionic_clone uses tail-call to invoke __bionic_clone_entry, at runtime the unwinder will reach the stack of the clone() function, which belongs to the parent thread, if the link register is not cleared. BUG: 14270816 Change-Id: Ia3711c87f8b619debe73748c28b9fb8691ea698e
_bionic_clone.S
|
ced906c849704f379d7191822f6d74993d4fa296 |
23-May-2014 |
Elliott Hughes <enh@google.com> |
Lose the hand-written futex assembler. Also stop exporting 'futex'. Bug: 12250341 Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
utex_arm.S
|
d5ed63a6a8290de88802172ce178656fbafe70c6 |
22-May-2014 |
Elliott Hughes <enh@google.com> |
Hide most of the private futex functions. Also hide part of the system properties compatibility code, since we needed to touch that to keep it building. I'll remove __futex_syscall4 and futex in a later patch. Bug: 11156955 Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
utex_arm.S
|
c3705f641507eafc170cd7a3fe98759e781e4594 |
21-May-2014 |
Elliott Hughes <enh@google.com> |
Hide __get_sp. Bug: 11156955 Change-Id: I55d8d320521e80c2085af28933a18b00cf5c714e
_get_sp.S
|
31d0398de65becc83168fa931cbd3345bbc346bd |
17-May-2014 |
Elliott Hughes <enh@google.com> |
Hide _exit_with_stack_teardown. Bug: 11156955 Change-Id: Ida3020343c9975177dc324918cd1f10c455eb173
exit_with_stack_teardown.S
|
954cf0d4e2669f91194b45f484152e47efa4f6c7 |
09-May-2014 |
Elliott Hughes <enh@google.com> |
Hide the __bionic_clone and __bionic_clone_entry implementation details. clone(2) is the public symbol. Also switch a test from __bionic_clone to clone; testing public API means the test now works on glibc too. Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde
_bionic_clone.S
|
6a45fe98727f9ee39386d39fa18eea69c706bc9e |
19-Apr-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Fix for libgcc compat generation script. Taking into account possibility that external symbol could have been an OBJECT instead of function. b/14090368 Change-Id: Iac173d2dd1309ed53024306578137c26b1dbbf15
ibgcc_compat.c
|
851e68a2402fa414544e66650e09dfdaac813e51 |
20-Feb-2014 |
Elliott Hughes <enh@google.com> |
Unify our assembler macros. Our <machine/asm.h> files were modified from upstream, to the extent that no architecture was actually using the upstream ENTRY or END macros, assuming that architecture even had such a macro upstream. This patch moves everyone to the same macros, with just a few tweaks remaining in the <machine/asm.h> files, which no one should now use directly. I've removed most of the unused cruft from the <machine/asm.h> files, though there's still rather a lot in the mips/mips64 ones. Bug: 12229603 Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
_get_sp.S
setjmp.S
bort_arm.S
emcmp.S
emcmp16.S
emcpy.S
emcpy.a9.S
etjmp.S
igsetjmp.S
trcmp.S
|
09289d92f920f307fc50dd64e9970c36c30b58e4 |
20-Feb-2014 |
Elliott Hughes <enh@google.com> |
Remove useless _C_LABEL from our assembler source. Change-Id: I41a9181537c70ecc69ef8035132c9a83811a40d0
setjmp.S
bort_arm.S
etjmp.S
igsetjmp.S
|
adab51aefdd00b65d631f64e6e313713d7dd9564 |
20-Feb-2014 |
Dmitriy Ivanov <dimitry@google.com> |
Added script generating additions to libgcc_compat.c from linker errors bug: 12234455 Change-Id: Icac35237f06e75745da5a91d9c4c941d7df4f84d
ibgcc_compat.c
|
62ffe14a7e6b30c2740ed695f64aee73c57f9962 |
25-Jan-2014 |
Ben Cheng <bccheng@google.com> |
Add all implicitly loaded symbols from libgcc.a into libgcc_compat.c. Change-Id: I0e66a73e849a01817d016a688d7291c2fb604e48
ibgcc_compat.c
|
f38fb19d9d2b1aa5b4f22f772c81efacb990c94b |
24-Jan-2014 |
Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> |
Re-export libgcc's __aeabi_uidivmod and __popcount_tab This is required to make the Nexus 10 graphics driver work on a system compiled with gcc 4.9. Change-Id: If3f3d488652a736d9ea3e583548d74fae3ffa902 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
ibgcc_compat.c
|
54a7494f17f80d6c548a58434bcb5579a26cc125 |
04-Jan-2014 |
Elliott Hughes <enh@google.com> |
Regenerate the NOTICE files. Also standardize the orthography in a few places to reduce near-duplicates in the NOTICE files. Change-Id: I347c75e817be61ec1b9c5b4b96226feedc8d09ab
texit_legacy.c
|
2aace21a19b6be8f6a427fc664d4175f0bf832c9 |
22-Dec-2013 |
Elliott Hughes <enh@google.com> |
Remove the bogus exit status from _exit_with_stack_teardown. It should always be 0, and there's no reason to pass a constant in as an argument. Change-Id: I92ac59b718a18e298bd7c52821af447f9181ca2a
exit_with_stack_teardown.S
|
5eccb9646dd94438911706d3ebf52775caa7f41e |
21-Dec-2013 |
Elliott Hughes <enh@google.com> |
Fix aarch64 futex assembly routines. Also make the other architectures more similar to one another, use NULL instead of 0 in calling code, and remove an unused #define. Change-Id: I52b874afb6a351c802f201a0625e484df6d093bb
utex_arm.S
|
e3fb66dd0161902099af0fd381d14cda03368800 |
20-Dec-2013 |
Ben Cheng <bccheng@google.com> |
Add __popcountsi2 to the function compat list. This is needed if we use Clang to compile Bionic, which won't include __popcountsi2 anymore as Clang generates inline instructions. However prebuilt binary blobs still depend on libc.so to resolve __popcountsi2. Change-Id: I9001a3884c4be250c0ceebcd79922783fae1a0b7
ibgcc_compat.c
|
c54ca40aef48009e7b0e5b2b3069aad62ffd3453 |
13-Dec-2013 |
Elliott Hughes <enh@google.com> |
Clean up some ARMv4/ARMv5 cruft. Change-Id: I29e836fea4b53901e29f96c6888869c35f6726be
emcmp16.S
emcpy.S
trcmp.S
|
ed45970ac5a182e512669cfa5c15b9f4fa783ad7 |
03-Dec-2013 |
Christopher Ferris <cferris@google.com> |
Add cfi directives to all arm assembly. Since the ENTRY/END macros now have .cfi_startproc/.cfi_endproc, most of the custom arm assembly has no unwind information. Adding the proper cfi directives for these and removing the arm directives. Update the gensyscalls.py script to add these cfi directives for the generated assembly. Also fix the references to non-uapi headers to the proper uapi header. In addition, remove the kill.S, tkill.S, tgkill.S for arm since they are not needed at all. The unwinder (libunwind) is able to properly unwind using the normal abort. After this change, I can unwind through the system calls again. Bug: 11559337 Bug: 11825869 Bug: 11321283 Change-Id: I18b48089ef2d000a67913ce6febc6544bbe934a3
_bionic_clone.S
bort_arm.S
ill.S
emcmp.S
emcmp16.S
etjmp.S
yscall.S
gkill.S
kill.S
|
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
_bionic_clone.S
lone.S
|
70b24b1cc2a1a4436b1fea3f8b76616fdcb27224 |
15-Nov-2013 |
Elliott Hughes <enh@google.com> |
Switch pthread_create over to __bionic_clone. Bug: 8206355 Bug: 11693195 Change-Id: I04aadbc36c87e1b7e33324b9a930a1e441fbfed6
exit_with_stack_teardown.S
lone.S
|
ed74484dcbc2e156a6e5fa861a62425b12e55128 |
07-Nov-2013 |
Elliott Hughes <enh@google.com> |
Stop using the non-uapi <linux/err.h> header file. We only need it for MAX_ERRNO, and it's time we had somewhere to put the little assembler utility macros we've been putting off writing. Change-Id: I9354d2e0dc47c689296a34b5b229fc9ba75f1a83
lone.S
ill.S
yscall.S
gkill.S
kill.S
|
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
fs.S
|
7f70c9b64eec4a4a86a3948966187ff8ee9fa720 |
13-Oct-2013 |
Serban Constantinescu <serban.constantinescu@arm.com> |
AArch64: Fix uses of stack size for 32/64bit libc builds This patch fixes stack size uses to size_t. Change-Id: I0671c85ddb1c1aceaf9440a7c73c21fe528653fa Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
exit_with_stack_teardown.S
|
eb847bc8666842a3cfc9c06e8458ad1abebebaf0 |
10-Oct-2013 |
Elliott Hughes <enh@google.com> |
Fix x86_64 build, clean up intermediate libraries. The x86_64 build was failing because clone.S had a call to __thread_entry which was being added to a different intermediate .a on the way to making libc.so, and the linker couldn't guarantee statically that such a relocation would be possible. ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC This patch addresses that by ensuring that the caller and callee end up in the same intermediate .a. While I'm here, I've tried to clean up some of the mess that led to this situation too. In particular, this removes libc/private/ from the default include path (except for the DNS code), and splits out the DNS code into its own library (since it's a weird special case of upstream NetBSD code that's diverged so heavily it's unlikely ever to get back in sync). There's more cleanup of the DNS situation possible, but this is definitely a step in the right direction, and it's more than enough to get x86_64 building cleanly. Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
texit_legacy.c
|
c4c6e192ac045c06f4aad3afc8e437baf67227b7 |
08-Oct-2013 |
Elliott Hughes <enh@google.com> |
pthread_exit should call __NR_exit with status 0. We shouldn't have been passing the bottom 32 bits of the address used for pthread_join to the kernel. Change-Id: I487e5002d60c27adba51173719213abbee0f183f
exit_with_stack_teardown.S
|
141029327cdc62629e248b3be1d7a58d4e9e5ba8 |
04-Oct-2013 |
Elliott Hughes <enh@google.com> |
Merge "Move common arch-* code to arch-common directory"
|
fc4d70fe54b8199560ce1426fff697a7234bf2d9 |
03-Oct-2013 |
Christopher Ferris <cferris@google.com> |
Remove dead files. memcpy.a15.S/strcmp.a15.S files were submitted by ARM for use as the basis for the memcpy/strcmp implementations in cortex-a15. memset.S was moved in to the generic directory. NOTE: memcpy.a9.S was submitted by Linaro to be the basis for the memcpy for cortex-a9/cortex-a15 but has not been incorporated yet. Bug: 10971279 Merge from internal master. (cherry-picked from 48fc3e8b9fe7241ecf8ad61248247986742f05b6) Change-Id: I8f9297578990d517f004e4e8840e2b2cbd5a47d8
emcpy.a15.S
emset.S
trcmp.a15.S
|
b49c17c2bf1232e29bc390e58d6fa43688929aa5 |
02-Oct-2013 |
Pavel Chupin <pavel.v.chupin@intel.com> |
Move common arch-* code to arch-common directory Will be helpful on adding x86_64 Change-Id: I96cf6fc7912c02f289c75f07ae0079c32d69173f Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
texit.h
rtbegin.c
rtbegin_so.c
rtend.S
rtend_so.S
|
bdbdbb8319b85044ba528f673de253a97910cf77 |
28-Aug-2013 |
Nick Kralevich <nnk@google.com> |
Delete CAVEATS / fix spelling. Change-Id: I0ed504271b7c2e4434d0d5f53bc10335c8cf7b5b
abi.c
|
4e24dcc8d869db7303650d8444c8796445fbbc07 |
15-Jul-2013 |
Christopher Ferris <cferris@google.com> |
Optimize strcat/strcpy, small tweaks to strlen. DO NOT MERGE Create one version of strcat/strcpy/strlen for cortex-a15/krait and another version for cortex-a9. Tested with the libc_test strcat/strcpy/strlen tests. Including new tests that verify that the src for strcat/strcpy do not overread across page boundaries. NOTE: The handling of unaligned strcpy (same code in strcat) could probably be optimized further such that the src is read 64 bits at a time instead of the partial reads occurring now. strlen improves slightly since it was recently optimized. Performance improvements for strcpy and strcat (using an empty dest string): cortex-a9 - Small copies vary from about 5% to 20% as the size gets above 10 bytes. - Copies >= 1024, about a 60% improvement. - Unaligned copies, from about 40% improvement. cortex-a15 - Most small copies exhibit a 100% improvement, a few copies only improve by 20%. - Copies >= 1024, about 150% improvement. - Unaligned copies, about 100% improvement. krait - Most small copies vary widely, but on average 20% improvement, then the performance gets better, hitting about a 100% improvement when copies 64 bytes of data. - Copies >= 1024, about 100% improvement. - When coping MBs of data, about 50% improvement. - Unaligned copies, about 90% improvement. As strcat destination strings get larger in size: cortex-a9 - about 40% improvement for small dst strings (>= 32). - about 250% improvement for dst strings >= 1024. cortex-a15 - about 200% improvement for small dst strings (>=32). - about 250% improvement for dst strings >= 1024. krait - about 25% improvement for small dst strings (>=32). - about 100% improvement for dst strings >=1024. Merge from internal master. (cherry-picked from d119b7b6f48fe507088cfb98bcafa99b320fd884) Change-Id: I296463b251ef9fab004ee4dded2793feca5b547a
trcpy.S
|
772b797b7b758328eaf6d4e9c93a6d2f78cbe3d0 |
03-Aug-2013 |
Ben Cheng <bccheng@google.com> |
Update the comments to reflect the current status. Change-Id: I3a6348b568230fe8b21d121e5b8d30561a9703c2
ibgcc_compat.c
|
efddf44c8e75f2807437bf26e8117f86f2645454 |
28-Jul-2013 |
synergydev <synergye@codefi.re> |
libgcc_compat: Introduce __aeabi_lasr for cortex-a9 and higher This is needed when passing -mcpu=cortex-a9 or higher on a modern toolchain for prebuilt library compatibility Change-Id: I73eb2393377914ae26216a8c2828ad973d1c1225
ibgcc_compat.c
|
0aa9b52efa75b4c8bbdc12845434e25e457ea57b |
10-Jul-2013 |
Christopher Ferris <cferris@google.com> |
Add new optimized strlen for arm. This optimized version is primarily targeted at cortex-a15. Tested on all nexus devices using the system/extras/libc_test strlen test. Tested alignments from 1 to 32 that are powers of 2. Tested that strlen does not cross page boundaries at all alignments. Speed improvements listed below: cortex-a15 - Sizes >= 32 bytes, ~75% improvement. - Sizes >= 1024 bytes, ~250% improvement. cortex-a9 - Sizes >= 32 bytes, ~75% improvement. - Sizes >= 1024 bytes, ~85% improvement. krait - Sizes >= 32 bytes, ~95% improvement. - Sizes >= 1024 bytes, ~160% improvement. Merge from internal master. (cherry-picked from 2fc071797743b88a9a47427d46baed7c7b24f4d2) Change-Id: I1ceceb4e745fd68e9d946f96d1d42e0cdaff6ccf
trlen.c
|
da4a3e65153f2979b5e339d0efe6b81ebf74af8f |
16-Jul-2013 |
Elliott Hughes <enh@google.com> |
EABI syscall cleanup. We cleaned up the auto-generated ones a while back to not touch the stack unnecessarily if they have <= 4 arguments. This patch cleans up some hand-crafted ones. Also improve comments in clone.S. Change-Id: I8850bf98f2b26829385315304472a760e6880ed8
lone.S
utex_arm.S
|
2753e12af50a83882a3f854343aa686289da97b5 |
03-Jul-2013 |
Will Newton <will.newton@linaro.org> |
libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings. This memcpy code uses NEON/VFP to achieve very good performance on ARMv7-A processors. It is specifically tuned for A15 but should provide good performance on A9 also. It is equivalent to the code in cortex-strings rev 116. This patch is a follow up the existing gerrit change: I7f6f77995f3ca903ad9c66d14261441667a2a935 This version includes a tweak for performance on misaligned buffers and splits the header comment into license and documentation sections. Change-Id: Ibd2e23c8d8e01357ba0247be1d05192de3ceba69 Signed-off-by: Will Newton <will.newton@linaro.org>
emcpy.a9.S
|
b61103dff4531322b02dd0f2217149e9b258fa10 |
01-Jul-2013 |
Will Newton <will.newton@linaro.org> |
libc/arch-arm/bionic/memcpy.a9.S: memcpy from cortex-strings. This memcpy code uses NEON/VFP to achieve very good performance on ARMv7-A processors. It is specifically tuned for A15 but should provide good performance on A9 also. It is equivalent to the code in cortex-strings rev 116. This patch is a follow up the existing gerrit change: I7f6f77995f3ca903ad9c66d14261441667a2a935 But this version includes a tweak for performance on misaligned buffers. Change-Id: I285abac0068f8ae29a1cbf7862ea8590aadaf0a7 Signed-off-by: Will Newton <will.newton@linaro.org>
emcpy.a9.S
|
7e6ce1a3c52d8533fed92c143419fedb0c93988a |
11-Jun-2013 |
Ben Cheng <bccheng@google.com> |
Fix abort(3) to raise SIGABRT rather than causing SIGSEGV. tgkill() needs the .save stack unwinding directive to get the complete stack trace. BUG: https://code.google.com/p/android/issues/detail?id=16672 Change-Id: Ifb447dca2147a592c48baf32769dfc175d8aea72
gkill.S
|
a123b5d3199ea2eaf8cfc513278f1906dcde1ab8 |
31-May-2013 |
Ben Cheng <bccheng@google.com> |
Use bl instead of blx to support interworking properly. (cherry picked from commit 9e1905794b4ecd8f7b87d8e4e2f954c8cfc6beda in master) Change-Id: I9b8c35ea9e201e00f84315f9f105013c23c94d85
bort_arm.S
|
e8f46e8eddc8ebfbe7bea0a238f61f1e9adf4a0a |
25-Apr-2013 |
Andrew Hsieh <andrewhsieh@google.com> |
Remove redundant space within square brackets The new "as" in binutils-2.23 (with gcc4.8) is more picky: it expects register right after [ Change-Id: I876124841582070ab2083ffafe38bc333b5812d0
trlen.c
|
8794ece296dd62cbeb3d00fe57c831c90a1bef77 |
22-Mar-2013 |
Elliott Hughes <enh@google.com> |
Replace unnecessary ARM uses of <sys/linux-syscalls.h> with <asm/unistd.h>. For some reason, socketcalls.c was only being compiled for ARM, where it makes no sense. For x86 we generate stubs for the socket functions that use __NR_socketcall directly. Change-Id: I84181e6183fae2314ae3ed862276eba82ad21e8e
exit_with_stack_teardown.S
lone.S
utex_arm.S
yscall.S
|
5c2772f59d3b6f564897187324d8606f54423207 |
22-Mar-2013 |
Elliott Hughes <enh@google.com> |
The SYS_ constants should cover all __NR_ values. <sys/linux-syscalls.h> only contains constants for the syscalls we're generating stubs for. We want all the syscalls available on the architecture in question. Keep using <sys/linux-syscalls.h> on ARM for now because the __NR_ARM_set_tls and __NR_ARM_cacheflush values aren't in <asm/unistd.h>. Change-Id: I66683950d87d9b18d6107d0acc0ed238a4496f44
ill.S
gkill.S
kill.S
|
8f2a5a0b40fc82126c691d5c30131d908772aab7 |
15-Mar-2013 |
Elliott Hughes <enh@google.com> |
Clean up internal libc logging. We only need one logging API, and I prefer the one that does no allocation and is thus safe to use in any context. Also use O_CLOEXEC when opening the /dev/log files. Move everything logging-related into one header file. Change-Id: Ic1e3ea8e9b910dc29df351bff6c0aa4db26fbb58
texit_legacy.c
|
9aceab50155b17741faded1fb22e2daa51a07fb1 |
12-Mar-2013 |
Elliott Hughes <enh@google.com> |
Use the kernel's MAX_ERRNO in the syscall stubs. Bug: http://code.google.com/p/android/issues/detail?id=53104 Change-Id: Iaabf7025b153e96dc5eca231a33a32d4cb7d8116
lone.S
ill.S
yscall.S
gkill.S
kill.S
|
14283004f5a8fe4c74961a9c89009a781e1becbe |
01-Mar-2013 |
Ben Cheng <bccheng@google.com> |
Add stack unwinding directives to memcpy. Also include some Android specific header files. Change-Id: Idbcbd43458ba945ca8c61bfbc04ea15fc0ae4e00
emcpy.a15.S
|
eb149e954ed7c455d3fb3b19bc064ad358c8bb1e |
30-Nov-2012 |
Greta Yorsh <greta.yorsh@arm.com> |
Adding strcmp tuned for Cortex-A15. The attached patch provides a new implementation of strcmp for ARM, using LDRD instead of LDR whenever possible. For older architectures that do not support LDRD, this implementation uses the same algorithm as before. Testing and benchmarking: * Validation: successfully passes a test that compares different strings of length 1-128 and offsets 0-8 from a word boundary. Checked on qemu/A15/A9, ARM/Thumb mode, Big/Little Endian. * Integration with gcc: no regression on qemu for arm-none-eabi --with-cpu a15/a9 --with-mode arm/thumb. Change-Id: I9e230e1b99dbdc9119b69ee858a89038c516a4ea Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
trcmp.a15.S
|
5b349fc22e7ba35ecb76b365d8be71939d204cde |
04-Oct-2011 |
Greta Yorsh <greta.yorsh@arm.com> |
Adding memcpy tuned for Cortex-A15. The strategy for large block sizes is LDRD and STRD with offset addressing, where the main loop copies 64 bytes in every iteration, (i.e., 8 calls to LDRD and STRD pairs), interleaving load and stores (i.e., the pairs of LDRD and STRD of the same data are consecutive instructions), and the writeback of an updated address is a separate instruction, which allows us to write back the accumulated update once per iteration. This strategy is implemented in memcpy.S. In some configurations, a plain version of memcpy (included from memcpy-stub.c) is used instead of the optimized one. Validation: * Correctness: checked memcpy using a test harness for block sizes ranging between 1 to 128, and source and destination buffers alignment ranging in { 0,1,2,3,4,8,12 } bytes each. * Performance: benchmarking on Cortex-A15 FPGA indicates that this strategy is better for A15 than the strategy used by glibc and even slightly better than using NEON. Benchmarking on Cortex-A9 bare metal and Linux shows that the proposed strategy is reasonable: not as fast as the version of memcpy from glibc (which is the best open source strategy for A9), but comparable with csl and bionic. * Integration with GCC: no regression for arm-none-eabi --with-cpu cortex-a15 and cortex-a9. Change-Id: Ied56354d8992c62ae3e02d582a2bd55585d814b9 Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
emcpy.a15.S
|
40eabe24e4e3ae8ebe437f1f4e43cf39cbba2e9e |
15-Feb-2013 |
Elliott Hughes <enh@google.com> |
Fix the pthread_setname_np test. Fix the pthread_setname_np test to take into account that emulator kernels are so old that they don't support setting the name of other threads. The CLONE_DETACHED thread is obsolete since 2.5 kernels. Rename kernel_id to tid. Fix the signature of __pthread_clone. Clean up the clone and pthread_setname_np implementations slightly. Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d
lone.S
|
6719500dbd9330d7539d2db3dcf3e8ad1858c7aa |
14-Feb-2013 |
Elliott Hughes <enh@google.com> |
Add a bunch more missing ENDs to assembler routines. This isn't everything; I've missed out those x86 files that are Change-Id: Idb7bb1a68796d6c0b70ea2b5c3300e49da6c62d2
emcmp.S
emset.S
|
73964c592c8d23901e9479893dfbd3d0f25bab04 |
13-Feb-2013 |
Elliott Hughes <enh@google.com> |
Everyone has CLZ. Even armv5 had CLZ. Change-Id: I51bc8d1166d09940fd0d3f4c7717edf26977082c
fs.S
|
9f878c2fcab4e497d8b59f69dab74f092ad04deb |
13-Feb-2013 |
Elliott Hughes <enh@google.com> |
Really set errno if __pthread_clone fails. If r0 == 0, we're the child. If r0 > 0, we're the parent. Otherwise set errno. The __bionic_clone code I copy & pasted was wrong. This patch fixes both. Bug: 3461078 Change-Id: Ibb7d6cc7e54e666841f2f0dc59a141a0b31982e4
lone.S
|
d7a3a403c1a0bbb30786f052adc7332fdda3e1f9 |
12-Feb-2013 |
Elliott Hughes <enh@google.com> |
Use ENTRY/END in ARM __get_sp. Change-Id: If2f159b266f5fa4ad9d188a17d4cd318b605e446
_get_sp.S
|
5e3fc43ddeada547a155c6f561a12ff0b16e02d3 |
12-Feb-2013 |
Elliott Hughes <enh@google.com> |
Fix __pthread_clone on ARM to set errno on failure. MIPS and x86 appear to have been correct already. (Also fix unit tests that ASSERT_EQ with errno so that the arguments are in the retarded junit order.) Bug: 3461078 Change-Id: I2418ea98927b56e15b4ba9cfec97f5e7094c6291
lone.S
|
f94fd3ccc66e05f53965bc14237778c0d8437bb6 |
12-Feb-2013 |
Elliott Hughes <enh@google.com> |
Clean up ARM assembler files to use ENTRY/END. We also don't need legacy syscall support (non-"swi 0"). Change-Id: Id1012e8ca18bf13f3f4e42200f39ba0e2e632cbf
exit_with_stack_teardown.S
lone.S
utex_arm.S
yscall.S
|
646e058136d59671d5d32d93bedbb71004a9ce73 |
07-Feb-2013 |
Elliott Hughes <enh@google.com> |
Fix x86 build, remove void* arithmetic. Change-Id: Idc7f14af2e094ac33de315e808176237af063bb8
rtbegin.c
|
42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6 |
07-Feb-2013 |
Elliott Hughes <enh@google.com> |
Clean up the argc/argv/envp/auxv handling. There's now only one place where we deal with this stuff, it only needs to be parsed once by the dynamic linker (rather than by each recipient), and it's now easier for us to get hold of auxv data early on. Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
rtbegin.c
|
1e980b6bc8315d00a07312b25486531247abd98c |
18-Jan-2013 |
Elliott Hughes <enh@google.com> |
Fix the duplication in the debugging code. We had two copies of the backtrace code, and two copies of the libcorkscrew /proc/pid/maps code. This patch gets us down to one. We also had hacks so we could log in the malloc debugging code. This patch pulls the non-allocating "printf" code out of the dynamic linker so everyone can share. This patch also makes the leak diagnostics easier to read, and makes it possible to paste them directly into the 'stack' tool (by using relative PCs). This patch also fixes the stdio standard stream leak that was causing a leak warning every time tf_daemon ran. Bug: 7291287 Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8
texit_legacy.c
|
35f5385aa5206c8958dc38a197cd6847e01b8c7b |
14-Jan-2013 |
Ben Cheng <bccheng@google.com> |
Add __aeabi_idiv to the dummy reference list. If the platform code is compiled with -mcpu=cortex-a15, then without this change prebuilt libraries built against -march=armv7 cannot resolve the dependency on __aeabi_idiv (provided by libgcc.a). Bug: 7961327 cherry-picked from internal master. Change-Id: I8fe59a98eb53d641518b882523c1d6a724fb7e55
ibgcc_compat.c
|
884e4f839b18552237c1453312aa4ccba46f94e9 |
05-Nov-2010 |
Henrik Smiding <henrik.smiding@stericsson.com> |
Add optimized version of memset for Cortex A9 Adds new code to function memset, optimized for Cortex A9. Copyright (C) ST-Ericsson SA 2010 Added neon implementation Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson. Change-Id: Id3c87767953439269040e15bd30a27aba709aef6 Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
emset.S
|
6d0bcdc8329dde4d3c83e95475bc670002f41309 |
17-Jan-2011 |
Henrik Smiding <henrik.smiding@stericsson.com> |
Add optimized version of memcpy for Cortex A9 Adds new code to memcpy function, optimized for Cortex A9. Adds new ARM-only loop, for operations where source and destination are aligned. Copyright (C) ST-Ericsson SA 2010 Modified neon implementation to fit Cortex A9 cache line size, for those running 32 bytes L2 cache line size. Also split the implementation in aligned and unaligned access, for those that allows unaligned memory access with Neon. For totally aligned operations, arm-only code is used. Change-Id: I95ebf6164cd6486b12a7e3e98e369db21e7e18d2 Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson. Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
emcpy.S
|
c2132915158014f578c3f003c9399961fe8d6da2 |
09-Nov-2012 |
Elliott Hughes <enh@google.com> |
Merge "Add optimized version of memcmp for Cortex A9"
|
048569be54188fadde19d5e48363e5fe3943023a |
05-Sep-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Rename __dso_handle_so.c to __dso_handle_so.h Also chang libc/arch-arm/bionic/crtbegin_so.c to include it as a header. Change-Id: Ib91b0b8caf5c8b936425aa8a4fc1a229b2b27929
rtbegin_so.c
|
b2c5bd543dcbbc1b2cbf7afd8b124256ce2c128e |
05-Sep-2012 |
Elliott Hughes <enh@google.com> |
Merge "ARM: warn about atexit() calls from legacy shared libraries"
|
26f2e4a1639a959513c4ff5981b4eb52757e8012 |
05-Sep-2012 |
Elliott Hughes <enh@google.com> |
Merge "ARM: make CRT_LEGACY_WORKAROUND work as intended"
|
069c64cdf2d3da7b7ff6ea5d1041f982fb10ab22 |
28-Aug-2012 |
Nick Kralevich <nnk@google.com> |
Merge "ARM: make sure __on_dlclose() actually gets called"
|
e026b1d89a0dcada499da186d4d94cc3ce5d3ef3 |
28-Aug-2012 |
Nick Kralevich <nnk@google.com> |
Merge "ARM: remove dummy entries from .so init_array/fini_array"
|
144c2918668ac0d506a86478d5b9966ad816cec4 |
28-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
ARM: warn about atexit() calls from legacy shared libraries Legacy ARM shared libraries use this generic version of atexit(), which queues exit functions for invocation at program exit, at which time the library may have been dlclose()'d, causing the program to crash. Change-Id: I41ae153c23268daa65ede7fb8966fc3e9caec369 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
texit_legacy.c
|
f3cfcd869ded41d25c1f4f4e48e7c374a64f9583 |
21-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
ARM: make CRT_LEGACY_WORKAROUND work as intended To properly support legacy ARM shared libraries, libc.so needs to export the symbols __dso_handle and atexit, even though these are now supplied by the crt startup code. This patch reshuffles the existing CRT_LEGACY_WORKAROUND conditionally compiled code slightly so it works as the original author likely intended. Change-Id: Id6c0e94dc65b7928324a5f0bad7eba6eb2f464b9 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
texit.h
texit_legacy.c
rtbegin_so.c
abi.c
|
c23092887fce8bf97ff33f72adf2d454946e7271 |
28-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
ARM: remove dummy entries from .so init_array/fini_array The runtime linker parses the ELF section headers to discover the size of the init_array and fini_array, so there is no point in putting NULL terminators at the end. Change-Id: I3246cd585efce9314155600277dd829e9f37d04f Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
rtend_so.S
|
0a150ead18019c0e4e59417ae3c5e8e0d7d2e4f4 |
21-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
libc: remove ctors/dtors sections None of the supported ARCHs actually populate these sections, so there is no point in keeping them in the binaries. Change-Id: I21a364f510118ac1114e1b49c53ec8c895c6bc6b Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
rtbegin.c
rtend.S
|
404e28ff8c3352a4fa290ae7769922db0172008e |
22-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
hardening: remove pointless ARM __get_pc() function Useful if you're trying to defeat ASLR, otherwise not so much ... Change-Id: I17ebb50bb490a3967db9c3038f049adafe2b8ea7 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
_get_pc.S
|
5ed48a4d7fece002afbbd2bd981563aea6e52e24 |
21-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
ARM: make sure __on_dlclose() actually gets called Change-Id: I280e5428b0543cccf17ca36baee4865395928cdb Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
rtbegin_so.c
|
b7beb6907599b36809effe1b4db76039ac649518 |
16-Aug-2012 |
Pavel Chupin <pavel.v.chupin@intel.com> |
Add link.h for all platforms with dl_phdr_info This header is used on bionic build and should be propagated into sysroot on toolchain rebuild. Discussion re. this header is here: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00936.html It is available already in mips NDK platforms: development/ndk/platforms/android-9/arch-mips/include/link.h Change-Id: I39ff467cdac9f448e31c11ee3e14a6200e82ab57 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
xidx_dynamic.c
xidx_static.c
|
6eee1fc68f366651379e776e4e3408069772562f |
10-Aug-2012 |
Nick Kralevich <nnk@google.com> |
crtend*: Add GNU_STACK note Add a GNU_STACK marker to crtend* files. This tells the linker that these files do not require an executable stack. When linking, a missing GNU_STACK marker in any .o file can prevent the compiler from automatically marking the final executable as NX safe (executable stack not required). In Android, we normally work around this by adding -Wa,--noexecstack / -Wl,-z,noexecstack. For files like crtend.S / crtend_so.S, which are included in every executable / shared library, it's better to add the GNU_STACK note directly to the assembly file. This allows the compiler to automatically mark the final executable as NX safe without any special command line options. References: http://www.gentoo.org/proj/en/hardened/gnu-stack.xml Change-Id: I07bd058f9f60ddd8b146e0fb36ba26ff84c0357d
rtend.S
rtend_so.S
|
3460db9490d7aee834dc05f99356e44d7549c538 |
09-Jul-2012 |
Peter Enderborg <peter.enderborg@sonymobile.com> |
bionic: Stack pointer/signal race condition. Move the stackpointer so a captured signal does not corrupt stack variables needed for __thread_entry. Change-Id: I3e1e7b94a6d7cd3a07081f849043262743aa8064
lone.S
|
9d40326830c2bd407427889c554adeb915ee6b4a |
31-May-2012 |
Nick Kralevich <nnk@google.com> |
arm: rewrite crtbegin* as C files. Rewrite crtbegin.S -> crtbegin.c crtbegin_so.S -> crtbegin_so.c This change allows us to generate PIC code without relying on text relocations. As a consequence of this rewrite, also rewrite __dso_handle.S -> __dso_handle.c __dso_handle_so.S -> __dso_handle_so.c atexit.S -> atexit.c In crtbegin.c _start, place the __PREINIT_ARRAY__, __INIT_ARRAY__, __FINI_ARRAY__, and __CTOR_LIST__ variables onto the stack, instead of passing a pointer to the text section of the binary. This change appears sorta wonky, as I attempted to preserve, as much as possible, the structure of the original assembly. As a result, you have C files including other C files, and other programming uglyness. Result: This change reduces the number of files with text-relocations from 315 to 19 on my Android build. Before: $ scanelf -aR $OUT/system | grep TEXTREL | wc -l 315 After: $ scanelf -aR $OUT/system | grep TEXTREL | wc -l 19 Change-Id: Ib9f98107c0eeabcb606e1ddc7ed7fc4eba01c9c4
texit.S
texit.h
rtbegin.S
rtbegin.c
rtbegin_so.S
rtbegin_so.c
|
83a73d1afe972014f6c8ff2520fe6d3357421f87 |
30-May-2012 |
Nick Kralevich <nnk@google.com> |
crtbegin: eliminate duplicate code crtbegin_dynamic and crtbegin_static are essentially identical, minus a few trivial differences (comments and whitespace). Eliminate duplicates. Change-Id: Ic9fae6bc9695004974493b53bfc07cd3bb904480
rtbegin.S
rtbegin_dynamic.S
rtbegin_static.S
|
3ebd31c0a1d343c3fd7845d7b1149e841ad83c6a |
05-Nov-2010 |
Henrik Smiding <henrik.smiding@stericsson.com> |
Add optimized version of memcmp for Cortex A9 Adds new code to function memcmp, optimized for Cortex A9. Copyright (C) ST-Ericsson SA 2010 Added neon optimization Change-Id: I8864d277042db40778b33232feddd90a02a27fb0 Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson. Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
emcmp.S
|
6cdefd06c0386776405e4379af036722db5d60c0 |
20-Oct-2011 |
Nick Kralevich <nnk@google.com> |
Add linker support for PIE Modify the dynamic linker so that executables can be loaded at locations other than 0x00000000. Modify crtbegin* so that non-PIC compilant "thumb interwork veneers" are not created by the linker. Bug: 5323301 Change-Id: Iece0272e2b708c79034f302c20160e1fe9029588
rtbegin_dynamic.S
rtbegin_static.S
|
8034415ddd8404f8788199ed993af89692235dc5 |
10-May-2012 |
Iliyan Malchev <malchev@google.com> |
resolved conflicts for merge of 08e72d01 to jb-dev-plus-aosp Change-Id: If00e354a5953ed54b31963d4f8ea77e1603c321e
|
08e72d0161e39e99ff1003bf1ce894f37d7b7eb4 |
07-May-2012 |
Prajakta Gudadhe <pgudadhe@nvidia.com> |
bionic: add support for non-NEON memcpy() on NEON SoCs Some SoCs that support NEON nevertheless perform better with a non-NEON than a NEON memcpy(). This patch adds build variable ARCH_ARM_USE_NON_NEON_MEMCPY, which can be set in BoardConfig.mk. When ARCH_ARM_USE_NON_NEON_MEMCPY is defined, we compile in the non-NEON optimized memcpy() even if the SoC supports NEON. Change-Id: Ia0e5bee6bad5880ffc5ff8f34a1382d567546cf9
emcpy.S
|
da0d8534f1a6273a383f1dc631fbaf032674bb4d |
09-May-2012 |
Ben Cheng <bccheng@google.com> |
am 08b51e2c: Implement the "abort" stub in assembly for ARM. * commit '08b51e2c091d036c124259ae59eb7be6bbe346af': Implement the "abort" stub in assembly for ARM.
|
eda7be454d6ff8689392442223335c6558bea932 |
08-May-2012 |
Ben Cheng <bccheng@google.com> |
Implement the "abort" stub in assembly for ARM. So that we can always get the full stack trace regardless of gcc's handling of the "noreturn" attribute associated with abort(). (Cherry pick of Id264a5167e7cabbf11515fbc48f5469c527e34d4.) Bug: 6455193 Conflicts: libc/Android.mk Change-Id: I568fc5303fd1d747075ca933355f914122f94dac
bort_arm.S
|
08b51e2c091d036c124259ae59eb7be6bbe346af |
08-May-2012 |
Ben Cheng <bccheng@google.com> |
Implement the "abort" stub in assembly for ARM. So that we can always get the full stack trace regardless of gcc's handling of the "noreturn" attribute associated with abort(). [cherry-picked from master] BUG:6455193 Change-Id: I0102355f5bf20e636d3feab9d1424495f38e39e2
bort_arm.S
|
e636e1f2c17d7097b6638cb4ae2b4857765b502d |
07-May-2012 |
Elliott Hughes <enh@google.com> |
am 8657eafc: Merge "Adjust memcpy for ARM Cortex A9 cache line size" * commit '8657eafc3552f36c176667c1591beab255308da6': Adjust memcpy for ARM Cortex A9 cache line size
|
fe6338da9168330d44b409b2ee36103e8bfe6697 |
15-Sep-2010 |
Henrik Smiding <henrik.smiding@stericsson.com> |
Adjust memcpy for ARM Cortex A9 cache line size ARM Cortex A8 use 64 bytes and ARM Cortex A9 use 32 bytes cache line size. The following patch: Adds code to adjust memcpy cache line size to match A9 cache line size. Adds a flag to select between 32 bytes and 64 bytes cache line size. Copyright (C) ST-Ericsson SA 2010 Modified neon implementation to fit Cortex A9 cache line size Author: Henrik Smiding henrik.smiding@stericsson.com for ST-Ericsson. Change-Id: I8a55946bfb074e6ec0a14805ed65f73fcd0984a3 Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
emcpy.S
|
4a9d6e50bb800eeadf579eb36b63e8b2eedb0d43 |
17-Apr-2012 |
Evgeniy Stepanov <eugenis@google.com> |
Fix segv when unwinding stack past __libc_init. This change mirrors cd15bac for statically-linked binaries. Change-Id: Id870832a50b37f0ef3e79e1ed03ed31390bfc9ef
rtbegin_static.S
|
d5099016f70b5acbfeb969787687099df703a4f4 |
12-Apr-2012 |
Elliott Hughes <enh@google.com> |
Merge "Fix segv when unwinding stack past __libc_init."
|
470835b215c14aa5ff2368527feeff35bfb46a90 |
11-Apr-2012 |
Kenny Root <kroot@google.com> |
Move end of __on_dlclose up The END macro was put too far down which made the linker complain about it. Move up to the end of the code. Change-Id: Ica71a9c6083b437d2213c7cefe34b0083c78f16b
rtbegin_so.S
|
03273f8fc0a7ac2b54fa2c983d4a647580e34458 |
11-Apr-2012 |
Kenny Root <kroot@google.com> |
__on_dlclose should be aligned Marking segments read-only was pushing the alignment of __on_dlclose by 2 bytes making it unaligned. This change makes sure the ARM code is aligned to the 4 byte boundary. Bug: 6313309 Change-Id: Ic2bf475e120dd61225ec19e5d8a9a8b1d0b7f081
rtbegin_so.S
|
cd15bacf334ab254a5f61c3bba100adde1b6b80a |
10-Apr-2012 |
Evgeniy Stepanov <eugenis@google.com> |
Fix segv when unwinding stack past __libc_init. This change fixes a segmentation fault in the libc unwinder when it goes past __libc_init. Unwind instructions for __libc_init direct it to grab the return address from the stack frame. Without this change, the unwinder gets a wild address and looks up further unwind instructions for the routine at that address. If it's unlucky enough to hit an existing function, it will try to unwind it. Bad things happen then. With this change, the return address always points to the _start function, which does not have unwind instructions associated with it. This stop the unwind process. __libc_init never returns, so this does not affect program execution, other than adding 4 bytes on the main thread stack. Change-Id: Id58612172e8825c8729cccd081541a13bff96bd0
rtbegin_dynamic.S
|
be101bf39aaaaaee3a96d62fbc4c1136548480de |
05-Mar-2012 |
Kenny Root <kroot@google.com> |
Revert "Reference __dso_handle in PIC way" This reverts commit 93cb30813764b140f0adbaa620dcdbb1cae56dd8
rtbegin_so.S
|
93cb30813764b140f0adbaa620dcdbb1cae56dd8 |
02-Mar-2012 |
Kenny Root <kroot@google.com> |
Reference __dso_handle in PIC way Use the same pattern in atexit.S to reference __dso_handle in a way that doesn't require a TEXTREL flag to be set. Change-Id: Id69d20863ee203d2b2f7ef0db230f9b548657741
rtbegin_so.S
|
4fc127345968c0e75775a6377c6f784ae6600cff |
29-Feb-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Merge "Trivial fix in comment"
|
f1a17e762b6fab449cff3006178e42b68e8e241e |
23-Feb-2012 |
Dima Zavin <dima@android.com> |
libc: Add __aeabi_llsl and __aeabi_llsr to libgcc_compat Some platform libraries built for ICS do not work with master because of some refactoring in frameworks/base. Make sure that these libgcc symbols are always present in our libc Change-Id: Ib8d345878be0ba711f051082a778f5cc1f1b3a19 Signed-off-by: Dima Zavin <dima@android.com>
ibgcc_compat.c
|
58b2c1616bed68fe5a6a1794c8764b24d29ad8cb |
22-Feb-2012 |
Andrew Hsieh <andrewhsieh@google.com> |
Trivial fix in comment Very, very trivial fix for minor typo in comment about how it works Change-Id: Ia08d332366837dec8f7e91b9728732c5edea223e
ibgcc_compat.c
|
f1a39dce60be0b453416e1b82a6d445a7677eb4b |
23-Nov-2011 |
David 'Digit' Turner <digit@google.com> |
libc: Fix typo that broke NDK compatibility. The function must be named __atomic_cmpxchg, not __android_cmpxchg. This typo broke existing prebuilt binaries (they couldn't be loaded at runtime anymore). Change-Id: I25ca7d18329817f0056e616a0409113269ad7b1f
tomics_arm.c
|
de44d0b2bd32a2c2cc5e2ffb64f8356efd893bca |
22-Nov-2011 |
David 'Digit' Turner <digit@google.com> |
Merge "libc: provide atomic operations will full barriers for NDK apps."
|
10c8ce59a40a1d8ae8f49145eca365b364aabe58 |
19-Nov-2011 |
Jeff Brown <jeffbrown@google.com> |
Add tgkill syscall. Use tgkill instead of tkill to implement pthread_kill. This is safer in the event that the thread has already terminated and its id has been reused by a different process. Change-Id: Ied715e11d7eadeceead79f33db5e2b5722954ac9
gkill.S
|
0fec6b9d88ee5a9e359b2208038f9806c0804538 |
16-Nov-2011 |
David 'Digit' Turner <digit@google.com> |
libc: provide atomic operations will full barriers for NDK apps. __atomic_cmpxchg and other related atomic operations did not provide memory barriers, which can be a problem for non-platform code that links against them when it runs on multi-core devices. This patch does two things to fix this: - It modifies the existing implementation of the functions that are exported by the C library to always provide full memory barriers. We need to keep them exported by the C library to prevent breaking existing application machine code. - It also modifies <sys/atomics.h> to only export always-inlined versions of the functions, to ensure that any application code compiled against the new header will not rely on the platform version of the functions. This ensure that said machine code will run properly on all multi-core devices. This is based on the GCC built-in sync primitives. The end result should be only slightly slower than the previous implementation. Note that the platform code does not use these functions at all. A previous patch completely removed their usage in the pthread and libstdc++ code. + rename arch-arm/bionic/atomics_arm.S to futex_arm.S + rename arch-x86/bionic/atomics_x86.S to futex_x86.S + remove arch-x86/include/sys/atomics.h which already provided inlined functions to the x86 platform. Change-Id: I752a594475090cf37fa926bb38209c2175dda539
tomics_arm.S
tomics_arm.c
utex_arm.S
|
d9ad62343c2db6b66a5fa597c9b20a6faabd7a9a |
20-Oct-2011 |
Nick Kralevich <nnk@google.com> |
Add linker support for PIE Modify the dynamic linker so that executables can be loaded at locations other than 0x00000000. Modify crtbegin* so that non-PIC compilant "thumb interwork veneers" are not created by the linker. Bug: 5323301 Change-Id: Iece0272e2b708c79034f302c20160e1fe9029588
rtbegin_dynamic.S
rtbegin_static.S
|
487b613e572160e80d0700e1bcd0e405420d14ea |
04-Oct-2011 |
Evgeniy Stepanov <eugenis@google.com> |
Use ENTRY and EXIT macros for strcmp, memcpy, atexit. Without this change strcmp size is zero (not set), and it gets ignored by Valgrind. Changes to memcpy and atexit don't affect the generated binary in any way. Change-Id: I05818cb5951f75901dc8c0eef02807a2e83a9231
texit.S
emcpy.S
trcmp.S
|
58246b7067b4e1a0b3ce48ccd94331f6fd8fa7cc |
22-Aug-2011 |
David 'Digit' Turner <digit@google.com> |
libc: Add __aeabi_f2uiz to libgcc_compat.c This patch ensure that __aeabi_f2uiz is embedded in our C library. This is needed to avoid breaking certain applications when they are loaded in ICS. It is likely that the issue is due to mis-linked binaries generated with the stand-alone toolchain (the problem should not exist if you use ndk-build), but this fix is easier than asking all app developers to fix their custom build system. If you want more technical details, read the comments inside libgcc_compat.c Change-Id: I59ac1fc781ecb70b90b5573c5a3c67560ca8f270
ibgcc_compat.c
|
b489666086265eb756f11fd224137c7e3a03a707 |
23-Jun-2011 |
David Turner <digit@android.com> |
am 1c0a0381: Merge "Enable functional DSO object destruction" * commit '1c0a0381dfb3648ffadef9537ec9383d63d62473': Enable functional DSO object destruction
|
39640842823ba4cd42bd11514c0da39aa939519f |
20-Jun-2011 |
Bruce Beare <bruce.j.beare@intel.com> |
Enable functional DSO object destruction Unfortunately, legacy .so files for ARM don't have a correct crtbegin file. Consequently, we have to grandfather the old __dso_handle behaviour. Add some ifdefs for ARM to allow it to use the old code until we can work out a transition. Change-Id: I6a28f368267d792c94e1d985d8344023bc632f6f Author: H.J. Lu <hongjiu.lu@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
texit.S
rtbegin_dynamic.S
rtbegin_so.S
rtbegin_static.S
|
a9e409a03530c79bc7ad8144d08e8921ebe0dd02 |
17-May-2011 |
David Turner <digit@android.com> |
am a7a9dddb: Merge "bionic: Add ARM optimized strcmp()" * commit 'a7a9dddb5dfe783d65fec4d3b0dee9f734345a29': bionic: Add ARM optimized strcmp()
|
f50e9be5930a08fa825b0c23353c802e11369b14 |
20-Apr-2011 |
Jim Huang <jim.huang@linaro.org> |
bionic: Add ARM optimized strcmp() Reference results of the experiments on TI OMAP3430 at 600 MHz $ bench_strcmp -N "strcmp_1k" -s 1k -I 200 [original C code] prc thr usecs/call samples errors cnt/samp size strcmp_1k 1 1 10.38000 102 0 15000 1024 [ARM optimized code] prc thr usecs/call samples errors cnt/samp size strcmp_1k 1 1 3.08840 88 0 15000 1024 The work was derived from ARM Ltd, contributed to newlib, and reworked for Android by Linaro. Change-Id: Ib0d5755e1eb9adb07d80ef0252f57a5c4c57a425 Signed-off-by: Jim Huang <jserv@0xlab.org>
trcmp.S
|
3224c08bd77043338ad6e9ecacbd4c118205e873 |
19-Feb-2011 |
David Turner <digit@google.com> |
Merge changes I8c481c89,I791406f8,I5f09cef8 * changes: libc: ARM: update syscalls with new script libc: ARM: add size info to gensyscalls Add function marks and size indications
|
420878c6908cf9c2862888477ec3f424a06cf172 |
16-Feb-2011 |
Kenny Root <kroot@google.com> |
Add function marks and size indications Add a macro to annotate function end and start using both ENTRY and END for each function. This allows valgrind (and presumably other debugging tools) to use the debug symbols to trace the functions. Change-Id: I5f09cef8e22fb356eb6f5cee952b031e567599b6
exit_with_stack_teardown.S
setjmp.S
tomics_arm.S
lone.S
fs.S
ill.S
emcmp.S
emcmp16.S
emcpy.S
emset.S
etjmp.S
igsetjmp.S
trcpy.S
kill.S
|
0233509c16046766bea9af6c7053cc6ceecef7a2 |
17-Feb-2011 |
Kenny Root <kroot@google.com> |
Amend previous commit with needed include Change-Id: Idae8daaf095d90513820e05f423144ffed4ba913
fs.S
|
3a3c1853aca502ec109e5e97423e9f721035915c |
17-Feb-2011 |
Kenny Root <kroot@google.com> |
Use CLZ on ARMv5 and newer Change-Id: Ia5aa6974c0343ae43fbcb91304501213048e9ec0
fs.S
|
24dc936346b4a31005ac28c4bd464320cca9320a |
22-Nov-2010 |
Jean-Baptiste Queru <jbq@google.com> |
resolved conflicts for merge of 1bc98ccb to gingerbread-plus-aosp Change-Id: Ief9ec3d0472660e26864e082e03c26e09a043b9d
|
73c04b32691cb344cb60289a646ded8fc551d09e |
10-Aug-2010 |
Jim Huang <jserv@0xlab.org> |
bionic: Add ARM optimized strcpy() Reference results of the experiments on Qualcomm MSM7x25 (524MHz): [original C code] prc thr usecs/call samples errors cnt/samp size strcpy_1k 1 1 14.56159 99 0 1000 1024 [ARM optimized code] prc thr usecs/call samples errors cnt/samp size strcpy_1k 1 1 3.46653 99 0 1000 1024 The work was derived from ARM Ltd. Change-Id: I906ac53bb7a7285e14693c77d3ce8d4ed6f98bfd
trcpy.S
|
a1727092595a65e4dd9d9a6bae3778ad8c31d77f |
08-Aug-2010 |
Jim Huang <jserv@0xlab.org> |
bionic: Rename _ARM_HAVE_LDREX_STREX to __ARM_HAVE_LDREX_STREX for consistency The patch follows the naming manner in existing macros with prefix __ARM_HAVE. Change-Id: I6763ce2bf3ee85fd1da112c719543061d8d19bf4
tomics_arm.S
|
18c5bcc66a9a7b2178dcdcf04a0716958798ab81 |
30-Jul-2010 |
Dima Zavin <dima@android.com> |
Revert "Set SA_RESTORER in sigaction()" This reverts commit e4fa46e75cd0d433b5c6c064720ed7e195cba7c8.
_sig_restorer.S
igaction.c
|
3b43f87d2949a340e2c19cb735af7727157d8274 |
02-Jul-2010 |
David 'Digit' Turner <digit@android.com> |
Allow dlclose() to properly call static C++ destructors. With this patch _and_ an upcoming build/ patch, the destruction of static C++ objects contained in shared libraries will happen properly when dlclose() is called. Note that this change introduces crtbegin_so.S and crtend_so.S which are currently ignored by the build system. + move definition of __dso_handle to the right place (before that, all shared libraries used the __dso_handle global variable from the C library). Note that we keep a 'weak' __dso_handle in aeabi.c to avoid breaking the build until the next patch to build/core/combo/ appears. We will be able to remove that later. + move bionic/aeabi.c to arch-arm/bionic/ (its proper location) NOTE: The NDK will need to be modified to enable this feature in the shared libraries that are generated through it. Change-Id: I99cd801375bbaef0581175893d1aa0943211b9bc
rtbegin_dynamic.S
rtbegin_so.S
rtbegin_static.S
rtend_so.S
abi.c
|
6a9b888d7c4b246f6f66360789c72b754ff85021 |
18-Jun-2010 |
David 'Digit' Turner <digit@google.com> |
Allow static C++ destructors to be properly called on dlclose(). With this patch, _and_ an upcoming build/ patch, the destruction of static C++ objects contained in shared libraries will happen properly when dlclose() is called. Note that this change introduces crtbegin_so.S and crtend_so.S which are currently ignored by the build system. + move definition of __dso_handle to the right place (before that, all shared libraries used the __dso_handle global variable from the C library). Note that we keep a 'weak' __dso_handle in aeabi.c to avoid breaking the build until the next patch to build/core/combo/ appears. We will be able to remove that later. + move bionic/aeabi.c to arch-arm/bionic/ (its proper location) Change-Id: Ie771aa204e3acbdf02fd30ebd4150373a1398f39 NOTE: The NDK will need to be modified to enable this feature in the shared libraries that are generated through it.
rtbegin_dynamic.S
rtbegin_so.S
rtbegin_static.S
rtend_so.S
abi.c
|
b8e6c50cfa2d4c4b73e071d0e836a2667db010b1 |
25-Mar-2010 |
David 'Digit' Turner <digit@google.com> |
Fix setjmp()/longjmp() to save FP registers on ARMv7. - DO NOT MERGE Change-Id: I3a0c2c05e295ac05ed51a531dabda668be204ca0
setjmp.S
etjmp.S
|
fcd00ebbdf3e7f4e1e7782a65ae10fb0fc03a1aa |
28-May-2010 |
Andy McFadden <fadden@android.com> |
Atomic/SMP update, part 3. Update ARM atomic ops to use LDREX/STREX. Stripped out #if 0 chunk. Insert explicit memory barriers in pthread and semaphore code. For bug 2721865. Change-Id: I0f153b797753a655702d8be41679273d1d5d6ae7
tomics_arm.S
|
4fdbadde921ec17b4ff9e97fbd41096903b21772 |
20-May-2010 |
Andy McFadden <fadden@android.com> |
Atomic/SMP update. Added an underscore to _ARM_HAVE_LDREX_STREX to make it match the others. Added __ARM_HAVE_DMB and __ARM_HAVE_LDREXD when appropriate. Fixed some typos. Change-Id: I2f55febcff4aeb7de572a514fb2cd2f820dca27c
tomics_arm.S
|
4aef0ae660e81ca151a04ce0ddaf956275c70116 |
13-May-2010 |
The Android Open Source Project <initial-contribution@android.com> |
merge from open-source master Change-Id: I2be62bce462ee53fe9519f433523bd7a44a73d40
|
e4fa46e75cd0d433b5c6c064720ed7e195cba7c8 |
11-Jan-2010 |
Matt Fischer <matt.fischer@garmin.com> |
Set SA_RESTORER in sigaction() GDB looks for specific opcode sequences when trying to recognize a stack frame as a signal trampoline. The sequences it looks for happen to be those created when SA_RESTORER is set, since glibc always sets a restorer. This patch does the same here, so that the trampolines can be correctly identified. Change-Id: I0ac574a68818cb24d939c3527f3aaeb04b853d04
_sig_restorer.S
igaction.c
|
88f06cd84a70f8a5212cb03272ec2c7cf0017afa |
19-Mar-2010 |
David 'Digit' Turner <digit@google.com> |
Use private futexes for pthread_mutex_t. This does not change the implementation of conditional variables since we're waiting for other system components to properly use pthread_condattr_init/setpshared before that. Also remove an obsolete x86 source file. Change-Id: Ia3e3fbac35b87a534fb04d4381c3c66b975bc8f7
tomics_arm.S
|
8641833b62e3b319796dc80ea16eb1592c05edf6 |
11-Mar-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Revert "bionic: pthread: use private futexes by default for mutexes and condvars" This reverts commit ba9c6f0989ae94778ba2b9f597adc827c9dc81e8.
tomics_arm.S
|
ba9c6f0989ae94778ba2b9f597adc827c9dc81e8 |
11-Mar-2010 |
David 'Digit' Turner <digit@google.com> |
bionic: pthread: use private futexes by default for mutexes and condvars Private futexes are a recent kernel addition: faster futexes that cannot be shared between processes. This patch uses them by default, unless the PROCESS_SHARED attribute flag is used when creating a mutex and/or conditional variable. Also introduces pthread_condattr_init/destroy/setpshared/getpshared. Change-Id: I3a0e2116f467072b046524cb5babc00e41057a53
tomics_arm.S
|
ecede4022283650ee4c4ed117a792d6db0b929fd |
10-Mar-2010 |
Colin Cross <ccross@android.com> |
Only use NEON memcpy if __ARM_NEON__ is defined Change-Id: I32e6b9385d46efeec15dee8e395a82eef24ba3ea
emcpy.S
|
97cf7f3394780d524038fc083e2c134031b54728 |
23-Jan-2010 |
David 'Digit' Turner <digit@google.com> |
Implement clone() C library function properly. Only provide an implementation for ARM at the moment, since it requires specific assembly fragments (the standard syscall stubs cannot be used because the child returns in a different stack).
lone.S
|
d548a265ca0d998241443504afdcdc12e1507811 |
04-Dec-2009 |
Doug Kwan <dougkwan@google.com> |
Add missing symbol type directives.
_get_pc.S
_get_sp.S
tomics_arm.S
|
ecac54db21256952b4b4a9c6f17604ec31743183 |
30-Oct-2009 |
Mathias Agopian <mathias@google.com> |
am 3ba822cc: am 199f9d92: Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment) Merge commit '3ba822cc3f0a252db73cf63cb8390e46fc0ceb0a' into eclair-mr2-plus-aosp * commit '3ba822cc3f0a252db73cf63cb8390e46fc0ceb0a': Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment)
|
47c5e30b61bad28731e4acff2d690a4207801f27 |
29-Oct-2009 |
Mathias Agopian <mathias@google.com> |
am 199f9d92: Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment) Merge commit '199f9d923804d74e021dd80e48ec75c0a96dba77' into eclair-plus-aosp * commit '199f9d923804d74e021dd80e48ec75c0a96dba77': Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment)
|
199f9d923804d74e021dd80e48ec75c0a96dba77 |
28-Oct-2009 |
Mathias Agopian <mathias@google.com> |
Improve memcpy performance from 290 MiB/s to 340 MiB/s (17% improvment) use 64 bytes cache lines, reduce the main loop to 64-bytes instead of 128 bytes and adjust the prefetch distance to the optimal value.
emcpy.S
|
581f43056b594429b3df4678d87989c93d8f81d2 |
20-Oct-2009 |
Mathias Agopian <mathias@google.com> |
am 76ef331c: am 7e7d6c48: use local symbols in memset so it doesn\'t screw up profiling Merge commit '76ef331cd6967ca8f5af779d25c8b634f8cdd2b6' into eclair-mr2-plus-aosp * commit '76ef331cd6967ca8f5af779d25c8b634f8cdd2b6': use local symbols in memset so it doesn't screw up profiling
|
214dec2811ef893984ce5bceceb28a47d701fa9f |
20-Oct-2009 |
Mathias Agopian <mathias@google.com> |
am 7e7d6c48: use local symbols in memset so it doesn\'t screw up profiling Merge commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c' into eclair-plus-aosp * commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c': use local symbols in memset so it doesn't screw up profiling
|
7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c |
20-Oct-2009 |
Mathias Agopian <mathias@google.com> |
use local symbols in memset so it doesn't screw up profiling
emset.S
|
1f2a381e844abfb364af7cfc48d8a2cb1e194637 |
07-Oct-2009 |
David 'Digit' Turner <digit@google.com> |
am fdc5c1f5: Re-enable ARMv7 memcpy implementation. Merge commit 'fdc5c1f56f9d21034badb8e4b092c47098f19613' into eclair-plus-aosp * commit 'fdc5c1f56f9d21034badb8e4b092c47098f19613': Re-enable ARMv7 memcpy implementation.
|
5be45ce0cf81a3904c697a77fa3e73bf85aead8b |
07-Oct-2009 |
David 'Digit' Turner <digit@google.com> |
am 1e40783d: Fix armv7-user builds by disabling the ARMv7-optimized memcpy. Merge commit '1e40783d9ad29c88a4d547774e05080fc4327a2e' into eclair-plus-aosp * commit '1e40783d9ad29c88a4d547774e05080fc4327a2e': Fix armv7-user builds by disabling the ARMv7-optimized memcpy.
|
fdc5c1f56f9d21034badb8e4b092c47098f19613 |
05-Oct-2009 |
David 'Digit' Turner <digit@google.com> |
Re-enable ARMv7 memcpy implementation. Do not submit this patch before the one that modifies the Android emulator to work-around a weird ARMv7 emulation issue. This is done to temporarily re-allow the -user builds needed for QA.
emcpy.S
|
1e40783d9ad29c88a4d547774e05080fc4327a2e |
03-Oct-2009 |
David 'Digit' Turner <digit@google.com> |
Fix armv7-user builds by disabling the ARMv7-optimized memcpy. This is required to work-around some corny bugs in ARMv7 emulation. The emulation itself is required to run the dex pre-optimization pass for -user builds.
emcpy.S
|
0893d4918742db3b4bd8ef82c4f3008b60de9e2a |
30-Sep-2009 |
David 'Digit' Turner <digit@google.com> |
am 7a9e06fa: Merge change I2a7ad975 into eclair Merge commit '7a9e06fa7e4e533074cde314f25dff3024f34a5d' into eclair-plus-aosp * commit '7a9e06fa7e4e533074cde314f25dff3024f34a5d': Fix ABI breakage in libc.so and libm.so between 1.6 and Eclair.
|
7a9e06fa7e4e533074cde314f25dff3024f34a5d |
30-Sep-2009 |
Android (Google) Code Review <android-gerrit@google.com> |
Merge change I2a7ad975 into eclair * changes: Fix ABI breakage in libc.so and libm.so between 1.6 and Eclair.
|
2a7ad97539313c82e13d36c9c75cefb2982a87d8 |
29-Sep-2009 |
David 'Digit' Turner <digit@google.com> |
Fix ABI breakage in libc.so and libm.so between 1.6 and Eclair. For a detailed description of the problem and why this fix is needed, plrease read the comments in libgcc_compat.c
ibgcc_compat.c
|
2d77d4dbd690e2d85b9795e670c3b94f8233e962 |
29-Sep-2009 |
Mathias Agopian <mathias@google.com> |
am ee223d02: NEON optimized memcpy. Merge commit 'ee223d02d96815c989b62043ff1237b1cd4e14b0' into eclair-plus-aosp * commit 'ee223d02d96815c989b62043ff1237b1cd4e14b0': NEON optimized memcpy.
|
ee223d02d96815c989b62043ff1237b1cd4e14b0 |
28-Sep-2009 |
Mathias Agopian <mathias@google.com> |
NEON optimized memcpy. 372 MB/s for large transfers, 440 MB/s for smaller ones down to 1KB. 130 MB/s for very small transfers ( < 32 bytes ) Performance is similar with non-congruent buffers.
emcpy.S
|
dfa87a200fd3f99e2a8790f2efc12528fba8e756 |
27-Sep-2009 |
David 'Digit' Turner <digit@google.com> |
am f355096a: Remove NEON optimizations for memcpy Merge commit 'f355096a64b74c8e869527de55f7e908873e3128' into eclair-plus-aosp * commit 'f355096a64b74c8e869527de55f7e908873e3128': Remove NEON optimizations for memcpy
|
f355096a64b74c8e869527de55f7e908873e3128 |
27-Sep-2009 |
David 'Digit' Turner <digit@google.com> |
Remove NEON optimizations for memcpy
emcpy.S
|
b8a18d059b8bde9a04e5778a0074a54413328472 |
15-Sep-2009 |
Ben Cheng <bccheng@google.com> |
am bd192b47: Add stack unwinding directives to assembly leaf functions. Merge commit 'bd192b470b69e00e9313680b70c5572a609e535d' into eclair-plus-aosp * commit 'bd192b470b69e00e9313680b70c5572a609e535d': Add stack unwinding directives to assembly leaf functions.
|
bd192b470b69e00e9313680b70c5572a609e535d |
15-Sep-2009 |
Ben Cheng <bccheng@google.com> |
Add stack unwinding directives to assembly leaf functions. So that the real culprit of native crashes can surface in the stack trace.
tomics_arm.S
emcmp.S
emcmp16.S
emcpy.S
|
cdeb4c8afa2fb7b92cce3b32a9d2f3c05ad759ba |
15-Sep-2009 |
Jean-Baptiste Queru <jbq@google.com> |
merge from open-source master
|
76ec6891e2bc18c9e12cd2f567358bb817b24cff |
09-Sep-2009 |
vinay harugop <vinay.harugop@stericsson.com> |
ARM architecture reference manuals for ARMv6 & ARMv7 state that the use of 'swp' instruction is deprecated ARMv6 onwards. These architectures provide the load-linked, store-conditional pair of ldrex/strex whose use is recommended in place of 'swp'. Also, the description of the 'swp' instruction in the ARMv6 reference manual states that the swap operation does not include any memory barrier guarantees.This fix attempts to address these issues by providing an atomic swap implementation using ldrex/strex under _ARM_HAVE_LDREX_STREX macro. This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party: Surinder-pal SINGH from STMicroelectronics.
tomics_arm.S
|
1bbc56cd227546cb155bb47721cdb717780a3400 |
26-Aug-2009 |
David 'Digit' Turner <digit@google.com> |
Neon-optimized versions of memcpy. This optimization come from the external 0xdroid repository. Original patch can be found here: http://gitorious.org/0xdroid/bionic/commit/ebafe41c2c02f8c09a3c1d7746047083df180ac5
emcpy.S
|
3a654b1e04d4275ae315cfe1b196998acf10052c |
03-Jun-2009 |
David 'Digit' Turner <digit@google.com> |
Revert "Fix the C library initialization to avoid calling static C++ constructors twice." This reverts commit 03eabfe65e1e2c36f4d26c78a730fa19a3bdada3.
rtbegin_dynamic.S
rtbegin_static.S
|
03eabfe65e1e2c36f4d26c78a730fa19a3bdada3 |
28-May-2009 |
David 'Digit' Turner <digit@google.com> |
Fix the C library initialization to avoid calling static C++ constructors twice. The problem was due to the fact that, in the case of dynamic executables, the dynamic linker calls the DT_PREINIT_ARRAY, DT_INIT and DT_INIT_ARRAY constructors when loading shared libraries and dynamic executables, *before* calling the executable's entry point (i.e. arch-$ARCH/bionic/crtbegin_dynamic.c) which in turns call __libc_init() in libc.so, as defined by bionic/libc_init_dynamic.c The latter did call these constructors array again, mistakenly. The patch also updates the documentation of many related functions. Also adds a new section to linker/README.TXT explaining restrictions on C library usage. The patch has been tested on a Dream for stability issues with proprietary blobs: - H264 decoding works - Camera + Video recording works - GPS works - Sensors work The tests in system/extra/tests/bionic/libc/common/test_static_cpp_mutex.cpp has been run and shows the static C++ constructor being called only once.
rtbegin_dynamic.S
rtbegin_static.S
|
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
_get_pc.S
_get_sp.S
exit_with_stack_teardown.S
setjmp.S
tomics_arm.S
lone.S
rtbegin_dynamic.S
rtbegin_static.S
rtend.S
xidx_dynamic.c
xidx_static.c
fs.S
ill.S
emcmp.S
emcmp16.S
emcpy.S
emset.S
etjmp.S
igsetjmp.S
trlen.c
yscall.S
kill.S
|
1767f908af327fa388b1c66883760ad851267013 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
_get_pc.S
_get_sp.S
exit_with_stack_teardown.S
setjmp.S
tomics_arm.S
lone.S
rtbegin_dynamic.S
rtbegin_static.S
rtend.S
xidx_dynamic.c
xidx_static.c
fs.S
ill.S
emcmp.S
emcmp16.S
emcpy.S
emset.S
etjmp.S
igsetjmp.S
trlen.c
yscall.S
kill.S
|
6d6c82c7a0a6b9a89f61b61c66f9b90d9c7177dc |
10-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@125939
fs.S
|
4e468ed2eb86a2406e14f1eca82072ee501d05fd |
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
emcmp.S
emcmp16.S
emcpy.S
trlen.c
|
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 |
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
_get_pc.S
_get_sp.S
exit_with_stack_teardown.S
setjmp.S
tomics_arm.S
lone.S
rtbegin_dynamic.S
rtbegin_static.S
rtend.S
xidx_dynamic.c
xidx_static.c
ill.S
emcmp.S
emcmp16.S
emcpy.S
emset.S
etjmp.S
igsetjmp.S
trlen.c
yscall.S
kill.S
|