|
|
|
|
|
|
|
|
return prev; |
|
|
return prev; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _read(int file, char *ptr, int len) |
|
|
int _read(int file, char *ptr, int len) |
|
|
{ |
|
|
{ |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _write(int file, char *ptr, int len) |
|
|
int _write(int file, char *ptr, int len) |
|
|
{ |
|
|
{ |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _close(int fd) |
|
|
int _close(int fd) |
|
|
{ |
|
|
{ |
|
|
return -1; |
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/stat.h> |
|
|
#include <sys/stat.h> |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _fstat(int fd, struct stat *st) |
|
|
int _fstat(int fd, struct stat *st) |
|
|
{ |
|
|
{ |
|
|
st->st_mode = S_IFCHR; |
|
|
st->st_mode = S_IFCHR; |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _isatty(int fd) |
|
|
int _isatty(int fd) |
|
|
{ |
|
|
{ |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int _lseek(int fd, long long offset, int whence) |
|
|
int _lseek(int fd, long long offset, int whence) |
|
|
{ |
|
|
{ |
|
|
return -1; |
|
|
return -1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
void _exit(int status) |
|
|
void _exit(int status) |
|
|
{ |
|
|
{ |
|
|
while (1); |
|
|
while (1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
void __cxa_pure_virtual() |
|
|
void __cxa_pure_virtual() |
|
|
{ |
|
|
{ |
|
|
while (1); |
|
|
while (1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
int __cxa_guard_acquire (int *g) |
|
|
int __cxa_guard_acquire (int *g) |
|
|
{ |
|
|
{ |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) |
|
|
void __cxa_guard_release(int *g) |
|
|
void __cxa_guard_release(int *g) |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |