mirror of
https://github.com/partic2/libffi
synced 2026-11-10 18:17:19 +00:00
aarch64: implement the trampoline table workaround for ffi closures on Apple systems
This is a direct copy/paste port of the ARM code, with changes because of Aarch64 pc-relative addressing restrictions.
This commit is contained in:
@@ -42,7 +42,13 @@ typedef enum ffi_abi
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
#if defined (__APPLE__)
|
||||
#define FFI_TRAMPOLINE_SIZE 20
|
||||
#define FFI_TRAMPOLINE_CLOSURE_OFFSET 16
|
||||
#else
|
||||
#define FFI_TRAMPOLINE_SIZE 24
|
||||
#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
|
||||
#endif
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
/* ---- Internal ---- */
|
||||
|
||||
Reference in New Issue
Block a user