diff --git a/mods/src/core.c b/mods/src/core.c index ad3a44b..64fb2e2 100644 --- a/mods/src/core.c +++ b/mods/src/core.c @@ -3,8 +3,6 @@ #include #include #include -#include -#include #include @@ -72,10 +70,7 @@ void _patch(const char *file, int line, void *start, unsigned char patch[]) { mprotect((void *) page_start, end - page_start, PROT_READ | PROT_EXEC); - if (cacheflush(start, 4, ICACHE) != 0) { - fprintf(stderr, "Error Flushing Cache: %s\n", strerror(errno)); - exit(1); - } + __builtin___clear_cache(start, (void *) end); } void _patch_address(const char *file, int line, void *start, void *target) {