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 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 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 T.lsd
: .tc __libc_start_data[tc], __libc_start_data[rw]
22 T.main
: .tc main[tc], main[rw]
23 T.init
: .tc __libc_start_init[tc], __libc_start_init[rw]
24 T.fini
: .tc __libc_start_fini[tc], __libc_start_init[rw]
25 T.rtld_fini
: .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw]
29 .globl __libc_start_data
31 .extern .__libc_start_main
34 .extern __libc_start_init
35 .extern __libc_start_fini
36 .extern __libc_start_rtld_fini
42 .long .__start, TOC[tc0], 0
47 /* No prologue needed, __start does not have to follow the ABI.
49 Input from kernel/loader
58 r31 : default processing flag
60 If r31 == r30, no special processing is needed, ie r28, r29 & r30
63 Save input in __libc_start_data */
65 st 1, 0(16) /* stack */
67 st 3, 8(16) /* argc */
68 st 4, 12(16) /* argv */
69 st 5, 16(16) /* envp */
70 st 28, 20(16) /* data origin */
71 st 29, 24(16) /* text origin */
72 st 30, 28(16) /* module count */
73 st 31, 32(16) /* special */
75 /* Call __libc_start_main() */
80 /* No epilog needed, __start does not have to follow the ABI */
87 .long TB.__start - .__start
94 Space to keep libc initialization information */
96 .csect __libc_start_data[rw]
98 /* For kernel/loader input args */
104 .long __libc_start_init
106 .long __libc_start_fini
108 .long __libc_start_rtld_fini
109 .space 0x1000 + (4 + rtld_fini - __libc_start_data)