From 574c6209019f1efbca2a058b576b227c2e7b5e61 Mon Sep 17 00:00:00 2001 From: Guoqi Chen Date: Mon, 25 Jul 2022 15:30:53 +0800 Subject: [PATCH] runtime: refactor the linux/loong64 entrypoint Remove the meaningless jump, and add the missing NOFRAME flag to _rt0_loong64_linux. Change-Id: I1aec68c556615b42042684bd176dfc2a8af094d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/420977 Run-TryBot: M Zhuo TryBot-Result: Gopher Robot Reviewed-by: xiaodong liu Reviewed-by: Ian Lance Taylor Reviewed-by: Meidan Li Reviewed-by: Cherry Mui Reviewed-by: WANG Xuerui --- src/runtime/rt0_linux_loong64.s | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/runtime/rt0_linux_loong64.s b/src/runtime/rt0_linux_loong64.s index b23ae7837abd72..b9aaa510e179bf 100644 --- a/src/runtime/rt0_linux_loong64.s +++ b/src/runtime/rt0_linux_loong64.s @@ -4,16 +4,13 @@ #include "textflag.h" -TEXT _rt0_loong64_linux(SB),NOSPLIT,$0 - JMP _main<>(SB) - -TEXT _main<>(SB),NOSPLIT|NOFRAME,$0 +TEXT _rt0_loong64_linux(SB),NOSPLIT|NOFRAME,$0 // In a statically linked binary, the stack contains argc, // argv as argc string pointers followed by a NULL, envv as a // sequence of string pointers followed by a NULL, and auxv. // There is no TLS base pointer. - MOVW 0(R3), R4 // argc - ADDV $8, R3, R5 // argv + MOVW 0(R3), R4 // argc + ADDV $8, R3, R5 // argv JMP main(SB) TEXT main(SB),NOSPLIT|NOFRAME,$0