summaryrefslogtreecommitdiffstats
path: root/libc/arch-arm64
Commit message (Collapse)AuthorAgeFilesLines
...
* | Clean up the arm64 setjmp.Elliott Hughes2014-12-055-297/+144
| | | | | | | | | | | | | | | | 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
* | Switch aarch64 to __builtin_bswap16.Elliott Hughes2014-12-021-6/+1
| | | | | | | | | | | | | | It generates the same code. Bug: 18597513 Change-Id: I164296da8c676668983dd93697c6dfa05f10ec56
* | Kill <machine/exec.h>.Elliott Hughes2014-12-021-50/+0
|/ | | | | Bug: 18546535 Change-Id: I479e003deab21e31eb5caa5393067ed1dc558387
* Bring our <machine/endian.h> files back in sync.Elliott Hughes2014-11-211-7/+2
| | | | | | | | They'd drifted slightly which led to a compilation error in toybox, which was assuming pid_t was defined. arm and arm64 were picking it up via <endian.h> but x86 wasn't. Change-Id: I58401e6c0066959dfc3b305b020876aaf7074bbf
* Add sethostname(2).Elliott Hughes2014-11-071-0/+14
| | | | | | Not very useful, but helps building stuff like toybox out of the box. Change-Id: I110e39030452bd093a84278e019c5752d293718d
* Add clock_settime and clock_nanosleep.Haruki Hasegawa2014-10-131-2/+3
| | | | | | | | | | | Add the missing prototypes, fix the existing prototypes to use clockid_t rather than int, fix clock_nanosleep's failure behavior, and add simple tests. Bug: 17644443 Bug: https://code.google.com/p/android/issues/detail?id=77372 Change-Id: I03fba369939403918abcabae9551a7123953d780 Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
* Add __memcpy_chk assembly for 64 bit.Christopher Ferris2014-09-265-370/+484
| | | | | Bug: 17623887 Change-Id: I443723bc941b40f84884b330d222baabee01f868
* Remove the unnecessary generic-neon code.Christopher Ferris2014-09-233-193/+1
| | | | Change-Id: Ib75c33caafd76750ec1aca3a74dec5e4b881e965
* Merge "Use the kernel's sa_restorer for aarch64."Elliott Hughes2014-09-172-36/+0
|\
| * Use the kernel's sa_restorer for aarch64.Elliott Hughes2014-09-162-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | gdb was happy with what we had, but libgcc and libunwind weren't. libgcc is happy with the kernel's restorer (because of the extra nop), though libunwind looks like it's going to need code changes regardless. We could make our restorer more like the kernel's one, but why bother when we can just let the kernel supply the canonical one? Bug: 17436734 Change-Id: I330fa5e68f23b1cf8133aa552896657b0b873ed3
* | Clean up the architecture-specific makefiles.Elliott Hughes2014-09-161-11/+18
|/ | | | | | Group things appropriately and name each group. Change-Id: I0da45eb0ccde19c31d5e984d0e6eb3dad26630dc
* Fix signal trampolines.Elliott Hughes2014-09-152-5/+6
| | | | | | | | | | | | | | | | | | | | | | * 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
* Merge "Add IFUNC support for arm64 and IRELATIVE reloc"Dmitriy Ivanov2014-09-121-0/+1
|\
| * Add IFUNC support for arm64 and IRELATIVE relocDmitriy Ivanov2014-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are number of changes in the way IFUNC related relocations are done: 1. IRELATIVE relocations are now supported for x86/x86_64 and arm64. 2. IFUNC relocations are now relying on static linker to generate them in correct order - this removes necessety of additional relocation pass for ifuncs. 3. Related to 2: rela?.dyn relocations are preformed before .plt ones. 4. Ifunc are resolved on symbol lookup this approach allowed to avoid mprotect(PROT_WRITE) call on r-x program segments. Bug: 17399706 Bug: 17177284 Change-Id: I414dd3e82bd47cc03442c5dfc7c279949aec51ed
* | Add posix_fadvise(3).Elliott Hughes2014-09-111-0/+15
|/ | | | | | | (cherry-pick of 00008263782e484020420c606f7d145fe7d0a4d8.) Bug: 12449798 Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
* Ensure __set_errno is still visible on LP32.Elliott Hughes2014-09-08192-570/+192
| | | | | | | | | | | | | | | | | | 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
* Revert "Fix arm64 build"Dmitriy Ivanov2014-09-041-0/+5
| | | | | | This reverts commit 5c1a7fdbd5a085024019b4c9307d2b2ace35df5e. Change-Id: Ia5fea0d6a8f59700edce0742e2271b5f02a5d87c
* Fix arm64 buildDmitriy Ivanov2014-09-031-5/+0
| | | | | Bug: 14611536 Change-Id: I4f7f4d1f5c0a37ef38fa0956778393f8d7668512
* Fix pthread_getattr_np for the main thread.Elliott Hughes2014-08-262-35/+0
| | | | | | | | | | | | | | | | | | | | 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
* Simplify _ALIGN_TEXT.Elliott Hughes2014-08-201-3/+1
| | | | | Bug: 16872067 Change-Id: I2b622f252c21ce1b344c040f828ab3f4bf9b6c0a
* Make __set_errno hidden in asm.Dan Albert2014-08-08189-0/+378
| | | | | | | This fixes the build after the -Bsymbolic change. Bug: 16853291 Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2
* Remove misleading arm/arm64 PIC_SYM.Elliott Hughes2014-08-074-15/+9
| | | | | Bug: 16823325 Change-Id: Ic8ff3a628bb4cd71361e3a1c2cfde4b3d39c50b1
* Revert "Replaces vfork() implementation with fork()"Dan Albert2014-08-052-0/+49
| | | | | | | | We're getting cold feet on this one... let's put it back. This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9. Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269
* Merge "Fix memchr with a zero length."Christopher Ferris2014-07-301-0/+5
|\
| * Fix memchr with a zero length.Christopher Ferris2014-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The memchr implementation for 64 bit fails if these conditions occur: - The buffer is 32 byte aligned. - The buffer contains the character in the first byte. - The count sent in is zero. The function should return NULL, but it's not. Bug: 16676625 Change-Id: Iab33cc7a8b79920350c72f054dff0e0a3cde69ce
* | Implement <sys/fsuid.h>.Elliott Hughes2014-07-302-0/+28
|/ | | | Change-Id: I1e5e50444a1b5a430ba5b5d9b8b1d91219af5e92
* Use VDSO for clock_gettime(2) and gettimeofday(2).Elliott Hughes2014-07-162-4/+6
| | | | | Bug: 15387103 Change-Id: Ifc3608ea65060c1dc38120b10b6e79874f182a36
* Add optimized memchr implementation from newlibBernhard Rosenkränzer2014-07-115-1/+163
| | | | | | | Add NEON optimized memchr adapted from newlib Change-Id: I91b2fafa243e4ab35fa56bb6171d48433c947cfd Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
* Regenerate the bionic NOTICE files.Elliott Hughes2014-07-072-2/+5
| | | | | | | Also fix a few formatting issues in copyright headers that were confusing the script (though obviously it would be better if the script were smarter). Change-Id: I7f561bef4f84fdcbd84f375ee226bd65db0e507b
* Add optimized stpcpy.Christopher Ferris2014-06-307-167/+277
| | | | Change-Id: Ifed38f92a54fef4488fd0ed26a1569059a054574
* Merge "Add optimized 64 bit strcpy."Christopher Ferris2014-06-265-1/+196
|\
| * Add optimized 64 bit strcpy.Christopher Ferris2014-06-265-1/+196
| | | | | | | | Change-Id: I4ac12735a53c3ae9336b148ce694fe6c63613139
* | Add optimized neon strchr implementation based on newlibBernhard Rosenkränzer2014-06-275-1/+156
|/ | | | | Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Change-Id: I276ff0f879e733a1115456247e1342b9c5a09015
* Add splice, tee, and vmsplice.Elliott Hughes2014-06-243-0/+42
| | | | Change-Id: I5f43380b88d776a8bb607b47dbbc5db5a2fe6163
* Cache getpid.Elliott Hughes2014-06-201-2/+3
| | | | | | | | | | | | | | | | | In practice, with this implementation we never need to make a system call. We get the main thread's tid (which is the same as our pid) back from the set_tid_address system call we have to make during initialization. A new pthread will have the same pid as its parent, and a fork child's main (and only) thread will have a pid equal to its tid, which we get for free from the kernel before clone returns. The only time we'd actually have to make a getpid system call now is if we take a signal during fork and the signal handler calls getpid. (That, or we call getpid in the dynamic linker while it's still dealing with its own relocations and hasn't even set up the main thread yet.) Bug: 15387103 Change-Id: I6d4718ed0a5c912fc75b5f738c49a023dbed5189
* Merge "add 64-bit bionic implementation for denver arch"Christopher Ferris2014-06-174-1/+487
|\
| * add 64-bit bionic implementation for denver archShu Zhang2014-06-124-1/+487
| | | | | | | | | | | | | | Add 64-bit bionic implementation for denver. memcpy/memset are denver-specific optimized. Use generic version of other routines. Change-Id: I44a830e07b82b2986001d73d1540b4080aaa839b
* | Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64."Dan Albert2014-06-122-28/+0
|\ \
| * | Remove ioprio_get(2) and ioprio_set(2) from LP64.Dan Albert2014-06-122-28/+0
| |/ | | | | | | | | Bug: 11156955 Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
* | Remove __memcmp16 from bionic.Elliott Hughes2014-06-121-1/+0
|/ | | | Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
* Merge "Replaces vfork() implementation with fork()"Dan Albert2014-06-102-49/+0
|\
| * Replaces vfork() implementation with fork()Dan Albert2014-06-102-49/+0
| | | | | | | | | | | | | | | | vfork() was removed from POSIX 2008, so this replaces its implementation with a call to fork(). Bug: 13935372 Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
* | AArch64: Remove Frame Record from ARM64 syscallsSerban Constantinescu2014-06-09188-2069/+0
| | | | | | | | | | | | | | This patch removes the frame record created on svc calls. Change-Id: I67cf926ba59540e824fb9749d30538e332df7c1e Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* | Merge "Rename __bionic_clone_entry to __start_thread."Elliott Hughes2014-06-061-3/+3
|\ \
| * | Rename __bionic_clone_entry to __start_thread.Elliott Hughes2014-06-061-3/+3
| |/ | | | | | | | | | | This seems a bit less obscure. Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
* | Remove getdents from bionic.Elliott Hughes2014-06-061-2/+3
|/ | | | | Bug: 11156955 Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
* Removes index() from bionic.Dan Albert2014-06-051-1/+0
| | | | | | | | | | This function has been removed from POSIX. Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place because defining a preprocessor macro for index() breaks a whole lot of code. Bug: 13935372 Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
* Removes bcopy and bzero from bionic.Dan Albert2014-06-033-62/+0
| | | | | | | | These symbols are still defined for LP32 for binary compatibility, but the declarations have been replaced with the POSIX recommended #defines. Bug: 13935372 Change-Id: Ief7e6ca012db374588ba5839f11e8f3a13a20467
* Avoid a system call in 'gettid'.Elliott Hughes2014-06-021-25/+0
| | | | | | | | | | | | | System calls can be pretty slow. This is mako, which has one of our lowest latencies: iterations ns/op BM_unistd_getpid 10000000 209 BM_unistd_gettid 200000000 8 Bug: 15297299 (kernel panic from too many gettid calls) Bug: 15315766 (excessive gettid overhead in liblogd) Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
* Merge "Add Aarch64 optimized bzero based on memset"Christopher Ferris2014-05-295-40/+48
|\