Subversion Repositories Kolibri OS

Rev

Rev 6074 | Rev 6664 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6074 Rev 6536
Line 33... Line 33...
33
    void  *__idata_start;
33
    void  *__idata_start;
34
    void  *__idata_end;
34
    void  *__idata_end;
35
    int  (*main)(int argc, char **argv, char **envp);
35
    int  (*main)(int argc, char **argv, char **envp);
36
};
36
};
Line 37... Line 37...
37
 
37
 
38
void _pei386_runtime_relocator (void);
38
extern void _pei386_runtime_relocator (void);
39
void init_loader(void *libc_image);
39
extern void init_loader(void *libc_image);
-
 
40
extern void init_reent(void);
-
 
41
extern void init_stdio(void);
40
void init_reent();
42
 
41
void __init_conio();
43
extern void __init_conio(void);
42
void __fini_conio();
44
extern void __fini_conio(void);
43
int link_app();
45
extern int link_app(void);
-
 
46
extern void* get_entry_point(void *raw);
44
void* get_entry_point(void *raw);
47
 
Line 45... Line 48...
45
int (*entry)(int, char **, char **);
48
extern void tls_init(void);
46
 
49
 
Line 47... Line -...
47
char* __appenv;
-
 
Line 48... Line 50...
48
int   __appenv_size;
50
char* __appenv;
49
 
51
int   __appenv_size;
50
extern char _tls_map[128];
52
 
51
 
53
 
Line 166... Line 168...
166
    }
168
    }
Line 167... Line 169...
167
 
169
 
168
    return argc;
170
    return argc;
Line 169... Line 171...
169
};
171
};
170
 
172
 
171
void  __attribute__((noreturn))
173
__attribute__((noreturn))
172
libc_crt_startup (void *libc_base)
174
void  libc_crt_startup (void *libc_base)
173
{
175
{
Line 174... Line 176...
174
    struct   app_hdr *header = NULL;
176
    struct app_hdr *header = NULL;
175
    int retval = 0;
177
    int retval = 0;
Line 176... Line 178...
176
 
178
 
Line 177... Line -...
177
    char **argv;
-
 
178
    int    argc;
179
    char **argv;
179
 
180
    int    argc;
180
    _pei386_runtime_relocator();
181
 
Line 181... Line 182...
181
 
182
    _pei386_runtime_relocator();
182
    memset(_tls_map, 0xFF, 32*4);
183
 
Line 183... Line -...
183
    _tls_map[0] = 0xE0;
-
 
184
    init_reent();
-
 
185
    init_stdio();
184
    tls_init();
Line 186... Line 185...
186
 
185
    init_reent();
Line 187... Line 186...
187
    if(header->__subsystem__ == 3)
186
    init_stdio();