| 1 |
/* crti.s for eabi |
| 2 |
Copyright (C) 1996-2025 Free Software Foundation, Inc. |
| 3 |
Written By Michael Meissner |
| 4 |
|
| 5 |
This file is free software; you can redistribute it and/or modify it |
| 6 |
under the terms of the GNU General Public License as published by the |
| 7 |
Free Software Foundation; either version 3, or (at your option) any |
| 8 |
later version. |
| 9 |
|
| 10 |
This file is distributed in the hope that it will be useful, but |
| 11 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
General Public License for more details. |
| 14 |
|
| 15 |
Under Section 7 of GPL version 3, you are granted additional |
| 16 |
permissions described in the GCC Runtime Library Exception, version |
| 17 |
3.1, as published by the Free Software Foundation. |
| 18 |
|
| 19 |
You should have received a copy of the GNU General Public License and |
| 20 |
a copy of the GCC Runtime Library Exception along with this program; |
| 21 |
see 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 |
| 101 |
FUNC_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 |
| 109 |
FUNC_START(__fini) |
| 110 |
stwu 1,-16(1) |
| 111 |
mflr 0 |
| 112 |
stw 0,20(1) |
| 113 |
#endif |