1
0
mirror of https://github.com/golang/go synced 2024-10-04 22:31:22 -06:00
go/src/pkg/runtime/rt0_openbsd_386.s
Russ Cox dfc22e29ec runtime: change 386 startup convention
Now the default startup is that the program begins at _rt0_386_$GOOS,
which behaves as if calling main(argc, argv). Main jumps to _rt0_386.

This makes the _rt0_386 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.

386 analogue of https://golang.org/cl/7525043

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7551045
2013-03-07 19:57:10 -08:00

15 lines
317 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_386_openbsd(SB),7,$8
MOVL 8(SP), AX
LEAL 12(SP), BX
MOVL AX, 0(SP)
MOVL BX, 4(SP)
CALL main(SB)
INT $3
TEXT main(SB),7,$0
JMP _rt0_386(SB)