From c2cd8a78cca32fbca05e236d5c553ec34ad5686e Mon Sep 17 00:00:00 2001 From: bebbo Date: Tue, 18 Jun 2024 12:31:56 +0200 Subject: [PATCH] clear the cache after stub copy/init to resolve 68060 issues --- sources/startup/init_shared.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/startup/init_shared.c b/sources/startup/init_shared.c index 84bdb76..2301ab8 100644 --- a/sources/startup/init_shared.c +++ b/sources/startup/init_shared.c @@ -199,6 +199,7 @@ __LibOpen(struct Library *_masterlib asm("a6")) { *(long*)(t + to) -= diff; --count; } + CacheClearU(); // reload a4 for the child library asm volatile( @@ -292,6 +293,9 @@ char const * __ResolveSymbols(long *p asm("a0"), struct Library *childLib asm("a void **to = (void**) *p++; r = __so_xlib_init(name, to); } + + CacheClearU(); + asm volatile("move.l (a7)+,a4" : "=r"(a4)); return r; }