1 /* Copyright (C) 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 In addition to the permissions in the GNU Lesser General Public
10 License, the Free Software Foundation gives you unlimited
11 permission to link the compiled version of this file with other
12 programs, and to distribute those programs without any restriction
13 coming from the use of this file. (The GNU Lesser General Public
14 License restrictions do apply in other respects; for example, they
15 cover modification of the file, and distribution when not linked
16 into another program.)
18 Note that people who make modified versions of this file are not
19 obligated to grant this special exception for their modified
20 versions; it is their choice whether to do so. The GNU Lesser
21 General Public License gives permission to release a modified
22 version without this exception; this exception also makes it
23 possible to release a modified version which carries forward this
26 The GNU C Library is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 Lesser General Public License for more details.
31 You should have received a copy of the GNU Lesser General Public
32 License along with the GNU C Library; if not, write to the Free
33 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
38 T.lsd
: .tc __libc_start_data[tc], __libc_start_data[rw]
39 T.main
: .tc main[tc], main[rw]
40 T.init
: .tc __libc_start_init[tc], __libc_start_init[rw]
41 T.fini
: .tc __libc_start_fini[tc], __libc_start_init[rw]
42 T.rtld_fini
: .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw]
46 .globl __libc_start_data
48 .extern .__libc_start_main
51 .extern __libc_start_init
52 .extern __libc_start_fini
53 .extern __libc_start_rtld_fini
59 .long .__start, TOC[tc0], 0
64 /* No prologue needed, __start does not have to follow the ABI.
66 Input from kernel/loader
75 r31 : default processing flag
77 If r31 == r30, no special processing is needed, ie r28, r29 & r30
80 Save input in __libc_start_data */
82 st 1, 0(16) /* stack */
84 st 3, 8(16) /* argc */
85 st 4, 12(16) /* argv */
86 st 5, 16(16) /* envp */
87 st 28, 20(16) /* data origin */
88 st 29, 24(16) /* text origin */
89 st 30, 28(16) /* module count */
90 st 31, 32(16) /* special */
92 /* Call __libc_start_main() */
97 /* No epilog needed, __start does not have to follow the ABI */
104 .long TB.__start - .__start
111 Space to keep libc initialization information */
113 .csect __libc_start_data[rw]
115 /* For kernel/loader input args */
121 .long __libc_start_init
123 .long __libc_start_fini
125 .long __libc_start_rtld_fini
126 .space 0x1000 + (4 + rtld_fini - __libc_start_data)