Advertisement
konalisp

crti and crtn

Nov 16th, 2014
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;--crti.asm
  2. section .init
  3. global _init
  4.  
  5. _init:
  6.     push rbp ;rbp is 64-bit only
  7.     mov rbp, rsp
  8.     ;push ebp ;eba is 32-bit only
  9.     ;mov ebp, esp
  10.  
  11. section .fini
  12. global _fini
  13.  
  14. _fini:
  15.     push rbp ;rbp is 64-bit only
  16.     mov rbp, rsp
  17.     ;push ebp ;eba is 32-bit only
  18.     ;mov ebp, esp
  19.  
  20. ;;--crtn.asm
  21. section .init
  22.     pop rbp ;rbp is 64-bit only
  23.     ;pop ebp ;ebp is 32-bit only
  24.     ret
  25.  
  26. section .fini
  27.     pop rbp ;rbp is 64-bit only
  28.     ;pop ebp ;ebp is 32-bit only
  29.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement