]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: refactor the linux/loong64 entrypoint
authorGuoqi Chen <chenguoqi@loongson.cn>
Mon, 25 Jul 2022 07:30:53 +0000 (15:30 +0800)
committerM Zhuo <mzh@golangcn.org>
Wed, 15 Mar 2023 07:15:46 +0000 (07:15 +0000)
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 <mzh@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: xiaodong liu <teaofmoli@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: WANG Xuerui <git@xen0n.name>
src/runtime/rt0_linux_loong64.s

index b23ae7837abd72afd8529c11fd289d735f697878..b9aaa510e179bf7cd9a4d9094927d13b8242d930 100644 (file)
@@ -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