crt0.S revision 1.1
11.1Sjoerg/* $NetBSD: crt0.S,v 1.1 2010/08/07 18:01:34 joerg Exp $ */
21.1Sjoerg
31.1Sjoerg/*
41.1Sjoerg * Copyright (c) 1999 Matt Thomas
51.1Sjoerg * Copyright (c) 1995 Christopher G. Demetriou
61.1Sjoerg * All rights reserved.
71.1Sjoerg *
81.1Sjoerg * Redistribution and use in source and binary forms, with or without
91.1Sjoerg * modification, are permitted provided that the following conditions
101.1Sjoerg * are met:
111.1Sjoerg * 1. Redistributions of source code must retain the above copyright
121.1Sjoerg *    notice, this list of conditions and the following disclaimer.
131.1Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
141.1Sjoerg *    notice, this list of conditions and the following disclaimer in the
151.1Sjoerg *    documentation and/or other materials provided with the distribution.
161.1Sjoerg * 3. All advertising materials mentioning features or use of this software
171.1Sjoerg *    must display the following acknowledgement:
181.1Sjoerg *          This product includes software developed for the
191.1Sjoerg *          NetBSD Project.  See http://www.NetBSD.org/ for
201.1Sjoerg *          information about NetBSD.
211.1Sjoerg * 4. The name of the author may not be used to endorse or promote products
221.1Sjoerg *    derived from this software without specific prior written permission.
231.1Sjoerg *
241.1Sjoerg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
251.1Sjoerg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
261.1Sjoerg * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
271.1Sjoerg * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
281.1Sjoerg * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
291.1Sjoerg * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
301.1Sjoerg * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
311.1Sjoerg * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
321.1Sjoerg * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
331.1Sjoerg * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
341.1Sjoerg *
351.1Sjoerg * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
361.1Sjoerg */
371.1Sjoerg
381.1Sjoerg#include <machine/asm.h>
391.1Sjoerg
401.1SjoergRCSID("$NetBSD: crt0.S,v 1.1 2010/08/07 18:01:34 joerg Exp $")
411.1Sjoerg
421.1SjoergSTRONG_ALIAS(_start,__start)
431.1Sjoerg
441.1Sjoerg_ENTRY(__start)
451.1Sjoerg	.word	0x0101
461.1Sjoerg	pushl	%r9		/* ps_strings */
471.1Sjoerg	pushl	%r8		/* obj */
481.1Sjoerg	pushl	%r7		/* cleanup */
491.1Sjoerg	movl	(%r6),%r0	/* argc */
501.1Sjoerg	pushal	8(%r6)[%r0]	/* envp = &argv[argc + 1] */
511.1Sjoerg	pushal	4(%r6)		/* argv */
521.1Sjoerg	pushl	%r0		/* argc */
531.1Sjoerg	calls	$6,___start
54