Skip to content

Instantly share code, notes, and snippets.

@mariasfiraiala
Created July 7, 2022 08:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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