From: Dave Cheney Date: Sun, 11 Jan 2015 03:40:08 +0000 (+0000) Subject: runtime: use runtime.sysargs to parse auxv on linux/arm X-Git-Tag: go1.5beta1~2363 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f15c675fb436f8225903d46ec10a9f49c6eb5553;p=gostls13.git runtime: use runtime.sysargs to parse auxv on linux/arm Make auxv parsing in linux/arm less of a special case. * rename setup_auxv to sysargs * exclude linux/arm from vdso_none.go * move runtime.checkarm after runtime.sysargs so arm specific values are properly initialised Change-Id: I1ca7f5844ad5a162337ff061a83933fc9a2b5ff6 Reviewed-on: https://go-review.googlesource.com/2681 Reviewed-by: Minux Ma Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/asm_arm.s b/src/runtime/asm_arm.s index fc95bb05d0..f3ce1a8f17 100644 --- a/src/runtime/asm_arm.s +++ b/src/runtime/asm_arm.s @@ -59,7 +59,6 @@ nocgo: MOVW R0, g_stackguard0(g) MOVW R0, g_stackguard1(g) - BL runtime·checkgoarm(SB) BL runtime·check(SB) // saved argc, argv @@ -68,6 +67,7 @@ nocgo: MOVW 64(R13), R1 MOVW R1, 8(R13) BL runtime·args(SB) + BL runtime·checkgoarm(SB) BL runtime·osinit(SB) BL runtime·schedinit(SB) diff --git a/src/runtime/os_linux_arm.go b/src/runtime/os_linux_arm.go index c1d506661c..d88bf785ee 100644 --- a/src/runtime/os_linux_arm.go +++ b/src/runtime/os_linux_arm.go @@ -34,8 +34,7 @@ func checkgoarm() { } } -//go:nosplit -func setup_auxv(argc int32, argv **byte) { +func sysargs(argc int32, argv **byte) { // skip over argv, envv to get to auxv n := argc + 1 for argv_index(argv, n) != nil { diff --git a/src/runtime/rt0_linux_arm.s b/src/runtime/rt0_linux_arm.s index 5f521d24ba..15a57cbc56 100644 --- a/src/runtime/rt0_linux_arm.s +++ b/src/runtime/rt0_linux_arm.s @@ -53,9 +53,6 @@ TEXT _rt0_arm_linux1(SB),NOSPLIT,$-4 // SWI $0 // restore signal handler // ADD $32, R13 - SUB $4, R13 // fake a stack frame for runtime·setup_auxv - BL runtime·setup_auxv(SB) - ADD $4, R13 B runtime·rt0_go(SB) TEXT bad_abi<>(SB),NOSPLIT,$-4 diff --git a/src/runtime/vdso_none.go b/src/runtime/vdso_none.go index 6f83ecc895..93bd91ca85 100644 --- a/src/runtime/vdso_none.go +++ b/src/runtime/vdso_none.go @@ -4,6 +4,7 @@ // +build !linux !amd64 // +build !linux !386 +// +build !linux !arm package runtime