aarch64: add static asserts for struct layout

arm_linker_fix
Ariadne Conill 2021-01-08 10:39:47 +00:00
parent 09f78ddc28
commit 5546fde1e5
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@
extern void libucontext_trampoline(void);
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.regs[0]) == R0_OFFSET, "R0_OFFSET is invalid");
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.sp) == SP_OFFSET, "SP_OFFSET is invalid");
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.pc) == PC_OFFSET, "PC_OFFSET is invalid");
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.pstate) == PSTATE_OFFSET, "PSTATE_OFFSET is invalid");
void
libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int argc, ...)