1 # Copyright (C) 2001, 2004, 2008, 2009, 2010, 2011
2 # Free Software Foundation, Inc.
3 # Written By Nick Clifton
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
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.
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.
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/>.
24 /* An executable stack is *not* required for these functions. */
25 #if defined(__ELF__) && defined(__linux__)
26 .section .note.GNU-stack,"",%progbits
31 /* Some attributes that are common to all routines in this file. */
32 /* Tag_ABI_align_needed: This code does not require 8-byte
33 alignment from the caller. */
34 /* .eabi_attribute 24, 0 -- default setting. */
35 /* Tag_ABI_align_preserved: This code preserves 8-byte
36 alignment in any callee. */
38 #endif /* __ARM_EABI__ */
40 # This file just makes sure that the .fini and .init sections do in
41 # fact return. Users may put any desired instructions in those sections.
42 # This file is the last thing linked into any executable.
44 # Note - this macro is complemented by the FUNC_START macro
45 # in crti.S. If you change this macro you must also change
48 # Note - we do not try any fancy optimizations of the return
49 # sequences here, it is just not worth it. Instead keep things
50 # simple. Restore all the save resgisters, including the link
51 # register and then perform the correct function return instruction.
52 # We also save/restore r3 to ensure stack alignment.
57 pop {r3, r4, r5, r6, r7}
64 ldmfd sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
67 #if defined __THUMB_INTERWORK__ || defined __thumb__