adding kernel crti/crtn but ctors/dtors not called yet

This commit is contained in:
Justin C. Miller
2019-02-03 18:59:09 -08:00
parent f2d39f7df8
commit d19cedb12a
3 changed files with 45 additions and 21 deletions

14
src/kernel/crti.s Normal file
View File

@@ -0,0 +1,14 @@
section .init
global _init:function
_init:
push rbp
mov rbp, rsp
; Control flow falls through to other .init sections
section .fini
global _fini:function
_fini:
push rbp
mov rbp, rsp
; Control flow falls through to other .fini sections

10
src/kernel/crtn.s Normal file
View File

@@ -0,0 +1,10 @@
section .init
; Control flow falls through to here from other .init sections
pop rbp
ret
section .fini
; Control flow falls through to here from other .fini sections
pop rbp
ret