| 5 | #include "stdlib.c" |
| 6 | |
| 7 | void *_mmap(void *addr, size_t length, int prot, int flags, int fd, |
| 8 | off_t offset) |
| 9 | { |
| 10 | static bool seen = false; |
| 11 | if (!seen) |
| 12 | fprintf(stderr, "mmap() intercepted\n"); |
| 13 | seen = true; |
| 14 | prot |= PROT_WRITE; |
| 15 | return mmap(addr, length, prot, flags, fd, offset); |
| 16 | } |
| 17 | |
| 18 | asm |
| 19 | ( |