1 2 3 4 5 6 7 8 9 10 11 12 13
#include <stddef.h> #include <stdint.h> typedef struct SYS_MMAP_PARAMS { void *addr; size_t length; int prot; int flags; int fd; size_t offset; } __attribute__((packed)) SYS_MMAP_PARAMS; void *syscall_mmap(SYS_MMAP_PARAMS *args);