Summary of Code

Learn about the various patterns we encountered in the course, like function prolog / epilog, adr, and passing parameters.

We'll cover the following...

Here is a summary of the concepts we encountered in this course. Let’s start with function prologs and function epilogs.

Function prolog

The function prolog is composed of these instructions:

stp x29, x30, [sp,#-48]!
mov x29, sp

Some code may omit stp if there are no nested calls inside:

sub sp, sp, #0x10

The function epilog

The function epilog is composed of these instructions:

ldp x29, x30, [sp],#48
ret

Some code may omit to restore x29/x30 if there are no nested calls inside:

add sp, sp, #0x10
ret

Knowing the prolog can help identify ...