1 /* Copyright (C) 2000 Free Software Foundation, Inc.
2 Contributed by Jes Sorensen, <Jes.Sorensen@cern.ch>
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 .section .ctors,"aw","progbits"
24 .section .dtors,"aw","progbits"
29 .section .IA_64.unwind
33 * Fragment of the ELF _init routine that invokes our dtor cleanup.
35 * We make the call by indirection, because in large programs the
36 * .fini and .init sections are not in range of the destination, and
37 * we cannot allow the linker to insert a stub at the end of this
38 * fragment of the _fini function. Further, Itanium does not implement
39 * the long branch instructions, and we do not wish every program to
40 * trap to the kernel for emulation.
42 * Note that we require __do_global_ctors_aux to preserve the GP,
43 * so that the next fragment in .fini gets the right value.
45 .section .init,"ax","progbits"
47 movl r2 = @gprel(__do_global_ctors_aux#)
57 br.call.sptk.many b0 = b6
63 .proc __do_global_ctors_aux#
64 __do_global_ctors_aux:
66 for (loc0 = __CTOR_END__-1; *p != -1; --p)
70 alloc loc4 = ar.pfs, 0, 5, 0, 0
71 addl loc0 = @ltoff(__CTOR_END__# - 8), gp
83 cmp.eq p6, p0 = -1, loc3
84 (p6) br.cond.spnt.few 2f
95 br.call.sptk.many b0 = b6
99 cmp.ne p6, p0 = -1, loc3
100 (p6) br.cond.sptk.few 0b
112 .endp __do_global_ctors_aux#
114 .section .init,"ax","progbits"
116 movl r2 = @gprel(__do_frame_setup_aux#)
126 br.call.sptk.many b0 = b6
132 .proc __do_frame_setup_aux#
133 __do_frame_setup_aux:
135 if (__register_frame_info_aux)
136 __register_frame_info_aux(__EH_FRAME_END__)
138 alloc loc0 = ar.pfs, 0, 3, 1, 0
139 addl r14 = @ltoff(@fptr(__register_frame_info_aux#)), gp
143 addl r16 = @ltoff(__EH_FRAME_END__#), gp
146 cmp.eq p6, p7 = 0, r15
154 br.call.sptk.many b0 = b6
161 .endp __do_frame_setup_aux#
163 .weak __register_frame_info_aux#