mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 12:00:17 +02:00
Thunks: Explicitly put thunks into the text library section
Previously, defining zero-initialized variables right before LOAD_LIB
could cause the compiler to put thunk definitions into bss, hence triggering
errors during assembly ("attempt to store non-zero value in section `.bss'").
This commit is contained in:
1 parent
5854d4ad1c
commit
5d555a10a2
1 file changed
+1
-1
@@ -4,7 +4,7 @@
|
||||
#ifndef _M_ARM_64
|
||||
#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 );
|
||||
asm(".text\nfexthunks_" #lib "_" #name ":\n.byte 0xF, 0x3F\n.byte " hash );
|
||||
#else
|
||||
// We're compiling for IDE integration, so provide a dummy-implementation that just calls an undefined function.
|
||||
// The name of that function serves as an error message if this library somehow gets loaded at runtime.
|
||||
|
||||
Reference in new issue
Block a user