Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Constructor used for Shadow Stack on AArch64
void __attribute__ ((constructor)) __attribute__((no_sanitize("shadow-call-stack"))) setup_x18()
{
void *shadow = malloc(16384);
__asm __volatile ( "mov x18, %0" : : "r" (shadow) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment