/contrib/sdk/sources/newlib/libc/crt/crt3.c |
---|
18,9 → 18,28 |
#include <string.h> |
#include <stdio.h> |
/* |
typedef void (*ctp)(); |
static void __do_global_ctors () |
{ |
extern int __CTOR_LIST__; |
int *c = &__CTOR_LIST__; |
c++; |
while (*c) |
{ |
ctp d = (ctp)*c; |
(d)(); |
c++; |
} |
} |
*/ |
void *load_libc(); |
//void __main (){}; |
void* get_entry_point(void *raw); |
void _pei386_runtime_relocator (void){}; |
void __attribute__((noreturn)) |
__crt_startup (void) |
29,6 → 48,8 |
void *img; |
void __attribute__((noreturn)) (*entry)(void *img); |
// _pei386_runtime_relocator(); |
img = load_libc(); |
if(img == NULL) |