X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=ginge.git;a=blobdiff_plain;f=loader%2Fpatches.c;h=b7ea613ff641637e15c1f18ebfc62991095a8c8f;hp=a6e31921946a3d45e1b237613fe5baa2916365bb;hb=c3831532675b527bd34ee92377b1b6d323345cb1;hpb=d0b9b0df7ed0dc36aabe30e2d584c27c8c32a3d9 diff --git a/loader/patches.c b/loader/patches.c index a6e3192..b7ea613 100644 --- a/loader/patches.c +++ b/loader/patches.c @@ -130,6 +130,13 @@ static const unsigned int sig_mask_chdir[] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xff000000 }; +static const unsigned int sig_readlink[] = { + 0xef900055, // svc 0x900055 + 0xe3700a01, // cmn r0, #0x1000 + 0x312fff1e, // bxcc lr +}; +#define sig_mask_readlink sig_mask_all + /* special */ static const unsigned int sig_cache1[] = { 0xee073f5e, // mcr 15, 0, r3, cr7, cr14, 2 @@ -163,8 +170,8 @@ asm( \ " ldmfd sp!, {r1-r3,r12,lr,pc}\n" \ ); -SVC_CMN_R0_MOV_R4_WRAPPER(hw_read, w_read) -SVC_CMN_R0_MOV_R4_WRAPPER(hw_ioctl, w_ioctl) +SVC_CMN_R0_MOV_R4_WRAPPER(hw_read, w_read_raw) +SVC_CMN_R0_MOV_R4_WRAPPER(hw_ioctl, w_ioctl_raw) #define PATCH_(p, f, t) { sig_##p, sig_mask_##p, ARRAY_SIZE(sig_##p), t, f, #p } #define PATCH(f) PATCH_(f, w_##f, 0) @@ -190,6 +197,7 @@ static const struct { PATCH (sigaction), // PATCH_(execve, execve2, 0), // hangs PATCH (chdir), + PATCH (readlink), PATCH_(cache1, NULL, 2), PATCH_(cache2, NULL, 2), };