xref: /illumos-gate/usr/src/lib/crt/amd64/crti.s (revision 3e76f9d6851ef6c63217178eb67278ec2809b944)
1*3e76f9d6SRichard Lowe/*
2*3e76f9d6SRichard Lowe * CDDL HEADER START
3*3e76f9d6SRichard Lowe *
4*3e76f9d6SRichard Lowe * The contents of this file are subject to the terms of the
5*3e76f9d6SRichard Lowe * Common Development and Distribution License (the "License").
6*3e76f9d6SRichard Lowe * You may not use this file except in compliance with the License.
7*3e76f9d6SRichard Lowe *
8*3e76f9d6SRichard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3e76f9d6SRichard Lowe * or http://www.opensolaris.org/os/licensing.
10*3e76f9d6SRichard Lowe * See the License for the specific language governing permissions
11*3e76f9d6SRichard Lowe * and limitations under the License.
12*3e76f9d6SRichard Lowe *
13*3e76f9d6SRichard Lowe * When distributing Covered Code, include this CDDL HEADER in each
14*3e76f9d6SRichard Lowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3e76f9d6SRichard Lowe * If applicable, add the following below this CDDL HEADER, with the
16*3e76f9d6SRichard Lowe * fields enclosed by brackets "[]" replaced with your own identifying
17*3e76f9d6SRichard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
18*3e76f9d6SRichard Lowe *
19*3e76f9d6SRichard Lowe * CDDL HEADER END
20*3e76f9d6SRichard Lowe */
21*3e76f9d6SRichard Lowe/*
22*3e76f9d6SRichard Lowe * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
23*3e76f9d6SRichard Lowe * Use is subject to license terms.
24*3e76f9d6SRichard Lowe */
25*3e76f9d6SRichard Lowe
26*3e76f9d6SRichard Lowe	.file	"crti.s"
27*3e76f9d6SRichard Lowe
28*3e76f9d6SRichard Lowe/*
29*3e76f9d6SRichard Lowe * These crt*.o modules are provided as the bare minimum required
30*3e76f9d6SRichard Lowe * from a crt*.o for inclusion in building low level system
31*3e76f9d6SRichard Lowe * libraries.  The are only be to included in libraries which
32*3e76f9d6SRichard Lowe * contain *no* C++ code and want to avoid the startup code
33*3e76f9d6SRichard Lowe * that the C++ runtime has introduced into the crt*.o modules.
34*3e76f9d6SRichard Lowe *
35*3e76f9d6SRichard Lowe * For further details - see bug#4433015
36*3e76f9d6SRichard Lowe */
37*3e76f9d6SRichard Lowe
38*3e76f9d6SRichard Lowe/*
39*3e76f9d6SRichard Lowe * _init function prologue
40*3e76f9d6SRichard Lowe */
41*3e76f9d6SRichard Lowe	.section	.init,"ax"
42*3e76f9d6SRichard Lowe	.globl	_init
43*3e76f9d6SRichard Lowe	.type	_init,@function
44*3e76f9d6SRichard Lowe	.align	16
45*3e76f9d6SRichard Lowe_init:
46*3e76f9d6SRichard Lowe	pushq	%rbp
47*3e76f9d6SRichard Lowe	movq	%rsp, %rbp
48*3e76f9d6SRichard Lowe
49*3e76f9d6SRichard Lowe/*
50*3e76f9d6SRichard Lowe * _fini function prologue
51*3e76f9d6SRichard Lowe */
52*3e76f9d6SRichard Lowe	.section	.fini,"ax"
53*3e76f9d6SRichard Lowe	.globl	_fini
54*3e76f9d6SRichard Lowe	.type	_fini,@function
55*3e76f9d6SRichard Lowe	.align	16
56*3e76f9d6SRichard Lowe_fini:
57*3e76f9d6SRichard Lowe	pushq	%rbp
58*3e76f9d6SRichard Lowe	movq	%rsp, %rbp
59