global _init global _fini section .init _init: ; call pushes an 8 byte return address on the stack ; 64 bit ABI requires stack to be aligned to 16 bytes ; we realign with another 8 byte address push rbp mov rbp, rsp ;; compiler inserts the rest here section .fini _fini: push rbp ; see above mov rbp, rsp ;; compiler inserts the rest here