Rev 6074 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6074 | Rev 6536 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | */ |
10 | */ |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | /* Hide the declaration of _fmode with dllimport attribute in stdlib.h to |
12 | /* Hide the declaration of _fmode with dllimport attribute in stdlib.h to |
Line 13... | Line -... | ||
13 | avoid problems with older GCC. */ |
- | |
14 | - | ||
15 | #include |
13 | avoid problems with older GCC. */ |
16 | #include |
- | |
17 | #include |
- | |
18 | #include |
- | |
Line 19... | Line 14... | ||
19 | #include |
14 | |
20 | #include |
15 | #include |
21 | 16 | ||
22 | struct app_hdr |
17 | struct app_hdr |
Line 30... | Line 25... | ||
30 | char *cmdline; |
25 | char *cmdline; |
31 | char *path; |
26 | char *path; |
32 | int __subsystem__; |
27 | int __subsystem__; |
33 | }; |
28 | }; |
Line -... | Line 29... | ||
- | 29 | ||
- | 30 | extern void init_reent(); |
|
34 | 31 | extern void init_stdio(); |
|
35 | void __init_conio(); |
32 | extern void __init_conio(); |
Line -... | Line 33... | ||
- | 33 | extern void __fini_conio(); |
|
36 | void __fini_conio(); |
34 | |
Line 37... | Line 35... | ||
37 | 35 | extern void tls_init(void); |
|
38 | extern int main (int, char **, char **); |
36 | extern int main (int, char **, char **); |
39 | 37 | ||
Line 44... | Line 42... | ||
44 | * a-good-idea use of include. */ |
42 | * a-good-idea use of include. */ |
Line 45... | Line 43... | ||
45 | 43 | ||
46 | char* __appenv; |
44 | char* __appenv; |
Line 47... | Line -... | ||
47 | int __appenv_size; |
- | |
48 | - | ||
49 | extern char _tls_map[128]; |
45 | int __appenv_size; |
50 | 46 | ||
51 | char * __libc_getenv(const char *name) |
47 | char * __libc_getenv(const char *name) |
52 | { |
48 | { |
Line 166... | Line 162... | ||
166 | 162 | ||
167 | return argc; |
163 | return argc; |
Line 168... | Line 164... | ||
168 | }; |
164 | }; |
169 | 165 | ||
170 | void __attribute__((noreturn)) |
166 | void __attribute__((noreturn)) |
171 | __crt_startup (void) |
167 | __libc_init (void) |
172 | { |
168 | { |
Line 173... | Line 169... | ||
173 | struct app_hdr *header = NULL; |
169 | struct app_hdr *header = NULL; |
174 | int retval = 0; |
170 | int retval = 0; |
Line 175... | Line -... | ||
175 | - | ||
176 | char **argv; |
171 | |
177 | int argc; |
172 | char **argv; |
178 | 173 | int argc; |
|
Line 179... | Line 174... | ||
179 | memset(_tls_map, 0xFF, 32*4); |
174 | |
180 | _tls_map[0] = 0xE0; |
175 | tls_init(); |