ARM64: Add support for ARM64e pointer authentication codes (PAC).
Contributed by Peter Cawley. #559
This commit is contained in:
14
src/lj_obj.h
14
src/lj_obj.h
@@ -1042,4 +1042,18 @@ LJ_DATA const char *const lj_obj_itypename[~LJ_TNUMX+1];
|
||||
LJ_FUNC int LJ_FASTCALL lj_obj_equal(cTValue *o1, cTValue *o2);
|
||||
LJ_FUNC const void * LJ_FASTCALL lj_obj_ptr(global_State *g, cTValue *o);
|
||||
|
||||
#if LJ_ABI_PAUTH
|
||||
#if LJ_TARGET_ARM64
|
||||
#include <ptrauth.h>
|
||||
#define lj_ptr_sign(ptr, ctx) \
|
||||
ptrauth_sign_unauthenticated((ptr), ptrauth_key_function_pointer, (ctx))
|
||||
#define lj_ptr_strip(ptr) ptrauth_strip((ptr), ptrauth_key_function_pointer)
|
||||
#else
|
||||
#error "No support for pointer authentication for this architecture"
|
||||
#endif
|
||||
#else
|
||||
#define lj_ptr_sign(ptr, ctx) (ptr)
|
||||
#define lj_ptr_strip(ptr) (ptr)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user