X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Fpatches.c;h=0504909c77018918378fe6d9255660f05b910c08;hp=7d8cf9736e2bfba134d253fdce87f28d12d6953c;hb=db9191ed7ea2e1c190b4445bf3c576b206c88b36;hpb=6ca083930098ee075c8f61cf2c04d616349959c3 diff --git a/loader/patches.c b/loader/patches.c index 7d8cf97..0504909 100644 --- a/loader/patches.c +++ b/loader/patches.c @@ -45,8 +45,25 @@ static const unsigned int sig_mask_sigaction[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000, 0xff000000 }; +static const unsigned int sig_execve[] = { + 0xef90000b, 0xe1a04000, 0xe3700a01 +}; +#define sig_mask_execve sig_mask_all + +static const unsigned int sig_execve2[] = { + 0xef90000b, 0xe3700a01, 0xe1a04000 +}; +#define sig_mask_execve2 sig_mask_all + +static const unsigned int sig_chdir[] = { + 0xef90000c, 0xe3700a01, 0x312fff1e, 0xea0004bb +}; +static const unsigned int sig_mask_chdir[] = { + 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000 +}; -#define PATCH(f) { sig_##f, sig_mask_##f, ARRAY_SIZE(sig_##f), w_##f } +#define PATCH_(f,p) { sig_##p, sig_mask_##p, ARRAY_SIZE(sig_##p), w_##f } +#define PATCH(f) PATCH_(f,f) static const struct { const unsigned int *sig; @@ -60,6 +77,8 @@ static const struct { PATCH(read), PATCH(ioctl), PATCH(sigaction), +// PATCH_(execve, execve2), // hangs + PATCH(chdir), }; void do_patches(void *ptr, unsigned int size)