1/* crti.s for eabi
2   Copyright (C) 1996-2020 Free Software Foundation, Inc.
3   Written By Michael Meissner
4
5This file is free software; you can redistribute it and/or modify it
6under the terms of the GNU General Public License as published by the
7Free Software Foundation; either version 3, or (at your option) any
8later version.
9
10This file is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13General Public License for more details.
14
15Under Section 7 of GPL version 3, you are granted additional
16permissions described in the GCC Runtime Library Exception, version
173.1, as published by the Free Software Foundation.
18
19You should have received a copy of the GNU General Public License and
20a copy of the GCC Runtime Library Exception along with this program;
21see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
22<http://www.gnu.org/licenses/>.  */
23
24/* This file just supplies labeled starting points for the .got* and other
25   special sections.  It is linked in first before other modules.  */
26
27	.ident	"GNU C crti.s"
28
29#include <ppc-asm.h>
30
31#ifndef __powerpc64__
32	.section ".got","aw"
33	.globl	__GOT_START__
34	.type	__GOT_START__,@object
35__GOT_START__:
36
37	.section ".got1","aw"
38	.globl	__GOT1_START__
39	.type	__GOT1_START__,@object
40__GOT1_START__:
41
42	.section ".got2","aw"
43	.globl	__GOT2_START__
44	.type	__GOT2_START__,@object
45__GOT2_START__:
46
47	.section ".fixup","aw"
48	.globl	__FIXUP_START__
49	.type	__FIXUP_START__,@object
50__FIXUP_START__:
51
52	.section ".ctors","aw"
53	.globl	__CTOR_LIST__
54	.type	__CTOR_LIST__,@object
55__CTOR_LIST__:
56
57	.section ".dtors","aw"
58	.globl	__DTOR_LIST__
59	.type	__DTOR_LIST__,@object
60__DTOR_LIST__:
61
62	.section ".sdata","aw"
63	.globl	__SDATA_START__
64	.type	__SDATA_START__,@object
65	.weak	_SDA_BASE_
66	.type	_SDA_BASE_,@object
67__SDATA_START__:
68_SDA_BASE_:
69
70	.section ".sbss","aw",@nobits
71	.globl	__SBSS_START__
72	.type	__SBSS_START__,@object
73__SBSS_START__:
74
75	.section ".sdata2","a"
76	.weak	_SDA2_BASE_
77	.type	_SDA2_BASE_,@object
78	.globl	__SDATA2_START__
79	.type	__SDATA2_START__,@object
80__SDATA2_START__:
81_SDA2_BASE_:
82
83	.section ".sbss2","a"
84	.globl	__SBSS2_START__
85	.type	__SBSS2_START__,@object
86__SBSS2_START__:
87
88	.section ".gcc_except_table","aw"
89	.globl	__EXCEPT_START__
90	.type	__EXCEPT_START__,@object
91__EXCEPT_START__:
92
93	.section ".eh_frame","aw"
94	.globl	__EH_FRAME_BEGIN__
95	.type	__EH_FRAME_BEGIN__,@object
96__EH_FRAME_BEGIN__:
97
98/* Head of __init function used for static constructors.  */
99	.section ".init","ax"
100	.align 2
101FUNC_START(__init)
102	stwu 1,-16(1)
103	mflr 0
104	stw 0,20(1)
105
106/* Head of __fini function used for static destructors.  */
107	.section ".fini","ax"
108	.align 2
109FUNC_START(__fini)
110	stwu 1,-16(1)
111	mflr 0
112	stw 0,20(1)
113#endif
114