Skip to content

Commit 6d51f93

Browse files
committed
runtime: jump instead of branch in netbsd/arm64 entry point
CL 706175 removed the NOFRAME directive from _rt0_arm64_netbsd but did not change the BL instruction to a JMP instruction. This causes the frame pointer to be stored on the stack, this making direct load from RSP to be off by 8 bytes. Cq-Include-Trybots: luci.golang.try:gotip-netbsd-arm64 Change-Id: I0c212fbaba74cfce508f961090dc6e66154c3054 Reviewed-on: https://go-review.googlesource.com/c/go/+/707675 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 5500cbf commit 6d51f93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/rt0_netbsd_arm64.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
TEXT _rt0_arm64_netbsd(SB),NOSPLIT,$0
88
MOVD 0(RSP), R0 // argc
99
ADD $8, RSP, R1 // argv
10-
BL main(SB)
10+
JMP main(SB)
1111

1212
// When building with -buildmode=c-shared, this symbol is called when the shared
1313
// library is loaded.

0 commit comments

Comments
 (0)