1
0
mirror of https://github.com/golang/go synced 2024-10-04 12:21:26 -06:00
go/src/pkg/runtime/rt0_netbsd_amd64.s
Russ Cox 36b414f639 runtime: change amd64 startup convention
Now the default startup is that the program begins at _rt0_amd64_$GOOS,
which sets DI = argc, SI = argv and jumps to _rt0_amd64.

This makes the _rt0_amd64 entry match the expected semantics for
the standard C "main" function, which we can now provide for use when
linking against a standard C library.

R=golang-dev, devon.odell, minux.ma
CC=golang-dev
https://golang.org/cl/7525043
2013-03-06 15:03:04 -05:00

14 lines
325 B
ArmAsm

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
TEXT _rt0_amd64_openbsd(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
JMP AX