xref: /netbsd-src/lib/csu/arch/arm/crti.S (revision c135af1c814dcd765b26ba8a49d32a7cd55b311b)
1*c135af1cSmatt/* $NetBSD: crti.S,v 1.2 2012/08/11 01:33:36 matt Exp $ */
201bc9d50Sjoerg
301bc9d50Sjoerg/*-
401bc9d50Sjoerg * Copyright (c) 2001 Ross Harvey
501bc9d50Sjoerg * All rights reserved.
601bc9d50Sjoerg *
701bc9d50Sjoerg * Redistribution and use in source and binary forms, with or without
801bc9d50Sjoerg * modification, are permitted provided that the following conditions
901bc9d50Sjoerg * are met:
1001bc9d50Sjoerg * 1. Redistributions of source code must retain the above copyright
1101bc9d50Sjoerg *    notice, this list of conditions and the following disclaimer.
1201bc9d50Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
1301bc9d50Sjoerg *    notice, this list of conditions and the following disclaimer in the
1401bc9d50Sjoerg *    documentation and/or other materials provided with the distribution.
1501bc9d50Sjoerg * 3. All advertising materials mentioning features or use of this software
1601bc9d50Sjoerg *    must display the following acknowledgement:
1701bc9d50Sjoerg *	This product includes software developed by the NetBSD
1801bc9d50Sjoerg *	Foundation, Inc. and its contributors.
1901bc9d50Sjoerg * 4. Neither the name of The NetBSD Foundation nor the names of its
2001bc9d50Sjoerg *    contributors may be used to endorse or promote products derived
2101bc9d50Sjoerg *    from this software without specific prior written permission.
2201bc9d50Sjoerg *
2301bc9d50Sjoerg * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2401bc9d50Sjoerg * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2501bc9d50Sjoerg * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2601bc9d50Sjoerg * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2701bc9d50Sjoerg * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2801bc9d50Sjoerg * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2901bc9d50Sjoerg * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3001bc9d50Sjoerg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3101bc9d50Sjoerg * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3201bc9d50Sjoerg * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3301bc9d50Sjoerg * POSSIBILITY OF SUCH DAMAGE.
3401bc9d50Sjoerg */
3501bc9d50Sjoerg
3601bc9d50Sjoerg#include <machine/asm.h>
3701bc9d50Sjoerg
38*c135af1cSmattRCSID("$NetBSD: crti.S,v 1.2 2012/08/11 01:33:36 matt Exp $")
3901bc9d50Sjoerg
4001bc9d50Sjoerg#include "sysident.S"
4101bc9d50Sjoerg
42*c135af1cSmatt	.section ".init", "ax", %progbits
4301bc9d50Sjoerg	.align 0
4401bc9d50Sjoerg	.globl _init
45*c135af1cSmatt	.type _init,%function
4601bc9d50Sjoerg_init:
4701bc9d50Sjoerg	mov	ip, sp
4801bc9d50Sjoerg	stmfd	sp!, {fp, ip, lr, pc}
4901bc9d50Sjoerg	sub	fp, ip, #4
5001bc9d50Sjoerg
51*c135af1cSmatt	.section ".fini", "ax", %progbits
5201bc9d50Sjoerg	.align 0
5301bc9d50Sjoerg	.globl _fini
54*c135af1cSmatt	.type _fini,%function
5501bc9d50Sjoerg_fini:
5601bc9d50Sjoerg	mov	ip, sp
5701bc9d50Sjoerg	stmfd	sp!, {fp, ip, lr, pc}
5801bc9d50Sjoerg	sub	fp, ip, #4
59