1# crtn.s for sysv4
2
3#   Copyright (C) 1996 Free Software Foundation, Inc.
4#   Written By Michael Meissner
5# 
6# This file 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 2, or (at your option) any
9# later version.
10# 
11# In addition to the permissions in the GNU General Public License, the
12# Free Software Foundation gives you unlimited permission to link the
13# compiled version of this file with other programs, and to distribute
14# those programs without any restriction coming from the use of this
15# file.  (The General Public License restrictions do apply in other
16# respects; for example, they cover modification of the file, and
17# distribution when not linked into another program.)
18# 
19# This file is distributed in the hope that it will be useful, but
20# WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22# General Public License for more details.
23# 
24# You should have received a copy of the GNU General Public License
25# along with this program; see the file COPYING.  If not, write to
26# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
27# Boston, MA 02110-1301, USA.
28# 
29#    As a special exception, if you link this library with files
30#    compiled with GCC to produce an executable, this does not cause
31#    the resulting executable to be covered by the GNU General Public License.
32#    This exception does not however invalidate any other reasons why
33#    the executable file might be covered by the GNU General Public License.
34# 
35
36# This file just supplies labeled ending points for the .got* and other
37# special sections.  It is linked in last after other modules.
38 
39	.file	"scrtn.s"
40	.ident	"GNU C scrtn.s"
41
42#ifndef __powerpc64__
43# Default versions of exception handling register/deregister
44	.weak	_ex_register
45	.weak	_ex_deregister
46	.set	_ex_register,0
47	.set	_ex_deregister,0
48
49# End list of C++ constructors
50	.section ".ctors","aw"
51	.globl	__CTOR_END__
52	.type	__CTOR_END__,@object
53__CTOR_END__:
54
55# End list of C++ destructors
56	.section ".dtors","aw"
57	.globl	__DTOR_END__
58	.type	__DTOR_END__,@object
59__DTOR_END__:
60
61	.section ".text"
62	.globl	_ex_text1
63_ex_text1:
64
65	.section ".exception_ranges","aw"
66	.globl	_ex_range1
67_ex_range1:
68
69# Tail of _init used for static constructors
70	.section ".init","ax"
71	lwz	%r0,16(%r1)
72	lwz	%r31,12(%r1)
73	mtlr	%r0
74	addi	%r1,%r1,16
75	blr
76
77# Tail of _fini used for static destructors
78	.section ".fini","ax"
79	lwz	%r0,16(%r1)
80	lwz	%r31,12(%r1)
81	mtlr	%r0
82	addi	%r1,%r1,16
83	blr
84#endif
85