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
Bring our <machine/endian.h> files back in sync. 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 clock_settime and clock_nanosleep. 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. Bug: 17623887 Change-Id: I443723bc941b40f84884b330d222baabee01f868
Use the kernel's sa_restorer for aarch64. gdb was happy with what we had, but libgcc and libunwind weren't. libgcc is happy with the kernel's restorer (because of the extra nop), though libunwind looks like it's going to need code changes regardless. We could make our restorer more like the kernel's one, but why bother when we can just let the kernel supply the canonical one? Bug: 17436734 Change-Id: I330fa5e68f23b1cf8133aa552896657b0b873ed3
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