aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_arm.s
diff options
context:
space:
mode:
authorHyang-Ah Hana Kim <hyangah@gmail.com>2015-01-24 17:51:42 -0500
committerHyang-Ah Hana Kim <hyangah@gmail.com>2015-02-04 21:02:41 +0000
commit3a8713575499622dbe77d78e9871dbe2ae94b8bb (patch)
treeae7554028ee41e2ca551e626b21eb40fb10a565b /src/runtime/sys_linux_arm.s
parent11c1227493f2661e34ad35f5dce0fd798a7e5927 (diff)
downloadgo-3a8713575499622dbe77d78e9871dbe2ae94b8bb.tar.xz
runtime: support panic/print logging in android-L.
In android-L, logging is done through the logd daemon. If logd daemon is available, send logging to logd. Otherwise, fallback to the legacy mechanism (/dev/log files). This change adds access/socket/connect calls to interact with the logd. Fixes golang/go#9398. Change-Id: I3c52b81b451f5862107d7c675f799fc85548486d Reviewed-on: https://go-review.googlesource.com/3350 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_arm.s')
-rw-r--r--src/runtime/sys_linux_arm.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s
index f7d08cae3c..bf0c810ad1 100644
--- a/src/runtime/sys_linux_arm.s
+++ b/src/runtime/sys_linux_arm.s
@@ -45,6 +45,9 @@
#define SYS_epoll_wait (SYS_BASE + 252)
#define SYS_epoll_create1 (SYS_BASE + 357)
#define SYS_fcntl (SYS_BASE + 55)
+#define SYS_access (SYS_BASE + 33)
+#define SYS_connect (SYS_BASE + 283)
+#define SYS_socket (SYS_BASE + 281)
#define ARM_BASE (SYS_BASE + 0x0f0000)
@@ -471,3 +474,29 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4
MOVW $0xffff0fe0, R0
B (R0)
+
+TEXT runtime·access(SB),NOSPLIT,$0
+ MOVW 0(FP), R0
+ MOVW 4(FP), R1
+ MOVW $SYS_access, R7
+ SWI $0
+ MOVW R0, ret+8(FP)
+ RET
+
+TEXT runtime·connect(SB),NOSPLIT,$0
+ MOVW 0(FP), R0
+ MOVW 4(FP), R1
+ MOVW 8(FP), R2
+ MOVW $SYS_connect, R7
+ SWI $0
+ MOVW R0, ret+12(FP)
+ RET
+
+TEXT runtime·socket(SB),NOSPLIT,$0
+ MOVW 0(FP), R0
+ MOVW 4(FP), R1
+ MOVW 8(FP), R2
+ MOVW $SYS_socket, R7
+ SWI $0
+ MOVW R0, ret+12(FP)
+ RET