]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgcc/config/mcore/crtn.S
Move crtstuff support to toplevel libgcc
[thirdparty/gcc.git] / libgcc / config / mcore / crtn.S
1 # crtn.S for ELF based systems
2
3 # Copyright (C) 1992, 1999, 2000, 2008, 2009, 2011
4 # Free Software Foundation, Inc.
5 # Written By David Vinayak Henkel-Wallace, June 1992
6 #
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by the
9 # Free Software Foundation; either version 3, or (at your option) any
10 # later version.
11 #
12 # This file is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # Under Section 7 of GPL version 3, you are granted additional
18 # permissions described in the GCC Runtime Library Exception, version
19 # 3.1, as published by the Free Software Foundation.
20 #
21 # You should have received a copy of the GNU General Public License and
22 # a copy of the GCC Runtime Library Exception along with this program;
23 # see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 # <http://www.gnu.org/licenses/>.
25
26 # This file just makes sure that the .fini and .init sections do in
27 # fact return. Users may put any desired instructions in those sections.
28 # This file is the last thing linked into any executable.
29
30 .section ".init"
31 .align 4
32
33 ldw r15,(r0, 12)
34 addi r0,16
35 jmp r15
36
37 .section ".fini"
38 .align 4
39
40 ldw r15, (r0, 12)
41 addi r0,16
42 jmp r15
43
44 # Th-th-th-that is all folks!
45