#include <u.h> #include <libc.h>
#define SEGBASE (char*)0x40000000 #define SEGSIZE 4096 int main() { segattach(0, "shared", SEGBASE, SEGSIZE); *(char*)(SEGBASE + SEGSIZE - 1) = 'a'; exec((char*)SEGBASE + SEGSIZE - 1, nil); return 0; } -- Elly
#include <u.h> #include <libc.h>
#define SEGBASE (char*)0x40000000 #define SEGSIZE 4096 int main() { segattach(0, "shared", SEGBASE, SEGSIZE); *(char*)(SEGBASE + SEGSIZE - 1) = 'a'; exec((char*)SEGBASE + SEGSIZE - 1, nil); return 0; } -- Elly