From 70a98cd4651dcfa6972ec5f3f28ae636d38c3736 Mon Sep 17 00:00:00 2001 From: Stefanos Kornilios Mitsis Poiitidis Date: Fri, 26 Feb 2021 12:43:37 +0200 Subject: [PATCH] Thunks: Convert guest thunk to asm, to avoid issues with older gcc verions --- ThunkLibs/include/common/Guest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThunkLibs/include/common/Guest.h b/ThunkLibs/include/common/Guest.h index fa878151c..9758d303e 100644 --- a/ThunkLibs/include/common/Guest.h +++ b/ThunkLibs/include/common/Guest.h @@ -1,7 +1,7 @@ #pragma once #include -#define MAKE_THUNK(lib, name, hash) static __attribute__((naked)) int fexthunks_##lib##_##name(void *args) { asm(".byte 0xF, 0x3F"); asm(".byte " hash ); } +#define MAKE_THUNK(lib, name, hash) extern "C" { int fexthunks_##lib##_##name(void *args); } asm("fexthunks_" #lib "_" #name ":\n.byte 0xF, 0x3F\n.byte " hash ); struct LoadlibArgs { const char *Name;