Add unwind information for r7 in arm syscalls.
It turns out that clang can emit code where the sp is saved in the r7
register on arm. Unfortunately, a lot of our syscalls overwrite that
value while the syscall is executing, so unwinding through that syscall
fails.
Update the syscall generation code to add unwinding information for
these uses.
Bug: 28411713
(cherry picked from commit 6e45d37decbbaf78ed4685213aebb1c9b5ccf8c2)
Change-Id: Ib775effc44c4113735fe9032b0602b9d63e3e390
diff --git a/libc/arch-arm/syscalls/getuid.S b/libc/arch-arm/syscalls/getuid.S
index 3d07d3c..cdc86bc 100644
--- a/libc/arch-arm/syscalls/getuid.S
+++ b/libc/arch-arm/syscalls/getuid.S
@@ -4,9 +4,11 @@
ENTRY(getuid)
mov ip, r7
+ .cfi_register r7, ip
ldr r7, =__NR_getuid32
swi #0
mov r7, ip
+ .cfi_restore r7
cmn r0, #(MAX_ERRNO + 1)
bxls lr
neg r0, r0