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:
Yavor Georgiev
2015-01-16 15:19:38 +02:00
parent 05e65b4e20
commit 536366349c
4 changed files with 283 additions and 16 deletions

View File

@@ -215,7 +215,7 @@ fi
FFI_EXEC_TRAMPOLINE_TABLE=0
case "$target" in
*arm*-apple-darwin*)
*arm*-apple-darwin* | aarch64-apple-darwin*)
FFI_EXEC_TRAMPOLINE_TABLE=1
AC_DEFINE(FFI_EXEC_TRAMPOLINE_TABLE, 1,
[Cannot use PROT_EXEC on this target, so, we revert to