xref: /netbsd-src/lib/csu/arch/arm/crtbegin.h (revision 350cb9bc6c688a6620070f2910b6495424963dde)
1*350cb9bcSmatt /* $NetBSD: crtbegin.h,v 1.1 2013/06/27 21:24:39 matt Exp $ */
2*350cb9bcSmatt /*-
3*350cb9bcSmatt  * Copyright (c) 2013 The NetBSD Foundation, Inc.
4*350cb9bcSmatt  * All rights reserved.
5*350cb9bcSmatt  *
6*350cb9bcSmatt  * This code is derived from software contributed to The NetBSD Foundation
7*350cb9bcSmatt  * by Matt Thomas of 3am Software Foundry.
8*350cb9bcSmatt  *
9*350cb9bcSmatt  * Redistribution and use in source and binary forms, with or without
10*350cb9bcSmatt  * modification, are permitted provided that the following conditions
11*350cb9bcSmatt  * are met:
12*350cb9bcSmatt  * 1. Redistributions of source code must retain the above copyright
13*350cb9bcSmatt  *    notice, this list of conditions and the following disclaimer.
14*350cb9bcSmatt  * 2. Redistributions in binary form must reproduce the above copyright
15*350cb9bcSmatt  *    notice, this list of conditions and the following disclaimer in the
16*350cb9bcSmatt  *    documentation and/or other materials provided with the distribution.
17*350cb9bcSmatt  *
18*350cb9bcSmatt  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19*350cb9bcSmatt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20*350cb9bcSmatt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21*350cb9bcSmatt  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22*350cb9bcSmatt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*350cb9bcSmatt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*350cb9bcSmatt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*350cb9bcSmatt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*350cb9bcSmatt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*350cb9bcSmatt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*350cb9bcSmatt  * POSSIBILITY OF SUCH DAMAGE.
29*350cb9bcSmatt  */
30*350cb9bcSmatt __asm(
31*350cb9bcSmatt 	".pushsection	.init, \"ax\", %progbits"
32*350cb9bcSmatt "\n\t"	"bl	__do_global_ctors_aux"
33*350cb9bcSmatt "\n\t"	".popsection");
34*350cb9bcSmatt 
35*350cb9bcSmatt __asm(
36*350cb9bcSmatt 	".pushsection	.fini, \"ax\", %progbits"
37*350cb9bcSmatt "\n\t"	"bl	__do_global_dtors_aux"
38*350cb9bcSmatt "\n\t"	".popsection");
39