summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/rt0_linux_amd64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/rt0_linux_amd64.s')
-rw-r--r--src/pkg/runtime/rt0_linux_amd64.s9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pkg/runtime/rt0_linux_amd64.s b/src/pkg/runtime/rt0_linux_amd64.s
index dac9ae181..dfc9c0421 100644
--- a/src/pkg/runtime/rt0_linux_amd64.s
+++ b/src/pkg/runtime/rt0_linux_amd64.s
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Darwin and Linux use the same linkage to main
-
TEXT _rt0_amd64_linux(SB),7,$-8
+ LEAQ 8(SP), SI // argv
+ MOVQ 0(SP), DI // argc
+ MOVQ $main(SB), AX
+ JMP AX
+
+TEXT main(SB),7,$-8
MOVQ $_rt0_amd64(SB), AX
- MOVQ SP, DI
JMP AX