1 /* Copyright (C) 2000-2018 Free Software Foundation, Inc.
2 This file was adapted from glibc sources.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 3, or (at your option) any
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
27 /* The code in sections .init and .fini is supposed to be a single
28 regular function. The function in .init is called directly from
29 start in crt1.S. The function in .fini is atexit()ed in crt1.S
32 crti.S contributes the prologue of a function to these sections,
33 and crtn.S comes up the epilogue. STARTFILE_SPEC should list
34 crti.o before any other object files that might add code to .init
35 or .fini sections, and ENDFILE_SPEC should list crtn.o after any
39 /* The alignment below can't be smaller, otherwise the mova below
40 breaks. Yes, we might align just the label, but then we'd be
41 exchanging an alignment here for one there, since the code fragment
42 below ensures 4-byte alignment on __ELF__. */
65 0: .long _GLOBAL_OFFSET_TABLE_
70 /* The alignment below can't be smaller, otherwise the mova below
71 breaks. Yes, we might align just the label, but then we'd be
72 exchanging an alignment here for one there, since the code fragment
73 below ensures 4-byte alignment on __ELF__. */
96 0: .long _GLOBAL_OFFSET_TABLE_