diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-06-02 22:00:18 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-06-02 22:03:58 +0300 |
commit | 9edd4a9979f520abc6a3f5c0029966b5cc0f280e (patch) | |
tree | c94fe900e1e7b3987fe4794163e62a06a18b5af4 /src/libc.c | |
parent | 6e5e3de6214bb792b126d481598e3e9313ea3bbb (diff) |
libc: Wrap low level glibc io calls for stdio
This is much less work and actually works better.
Diffstat (limited to 'src/libc.c')
-rw-r--r-- | src/libc.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -72,7 +72,14 @@ tkill(int tid, int sig) // Stuff needed for runtime compatibility, but not neccessary for linking // Also stuff that exists in glibc, but needs to be wrapped for runtime compatibility -#include "libc-stdio.h" +// Some defines from app-stdio.c as per GNU linker's manual for --wrap: +// You may wish to provide a __real_malloc function as well, so that links without the +// --wrap option will succeed. If you do this, you should not put the definition of +// __real_malloc in the same file as __wrap_malloc; if you do, the assembler may resolve +// the call before the linker has a chance to wrap it to malloc. + +size_t __real_IO_file_xsputn(FILE *f, const void *buf, size_t n) {} + #include "libc-ctype.h" const unsigned int bionic___page_size = PAGE_SIZE; |