use a trampoline to get to the spicy _x functions

This commit is contained in:
JackDoan committed 2026-09-25 13:01:50 -05:00
1 parent 2ff4852551
commit fd29ebdacd
9 files changed
+227 -62

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
//go:build !ios
#include "textflag.h"
// The same trampoline shape x/sys/unix uses for its libSystem stubs; it assembles for amd64 and arm64 alike.
TEXT msgx_dlsym_trampoline<>(SB),NOSPLIT,$0-0
JMP msgx_dlsym(SB)
GLOBL ·dlsymTrampolineAddr(SB), RODATA, $8
DATA ·dlsymTrampolineAddr(SB)/8, $msgx_dlsym_trampoline<>(SB)