Added i386 crt's and fixed boot file
This commit is contained in:
parent
b6f6ce2295
commit
8c3b610da6
|
@ -1,4 +1,4 @@
|
|||
.global loader
|
||||
.global _start
|
||||
|
||||
/* Entry point in the kernel. */
|
||||
|
||||
|
@ -41,10 +41,10 @@
|
|||
|
||||
.text
|
||||
|
||||
loader:
|
||||
_start:
|
||||
|
||||
mov $kstack, %esp
|
||||
add KSTACK_SIZE, %esp
|
||||
add $KSTACK_SIZE, %esp
|
||||
|
||||
call kmain
|
||||
cli
|
|
@ -0,0 +1,15 @@
|
|||
.section .init
|
||||
.global _init
|
||||
.type _init, @function
|
||||
_init:
|
||||
push %ebp
|
||||
movl %esp, %ebp
|
||||
/* gcc will nicely put the contents of crtbegin.o's .init section here. */
|
||||
|
||||
.section .fini
|
||||
.global _fini
|
||||
.type _fini, @function
|
||||
_fini:
|
||||
push %ebp
|
||||
movl %esp, %ebp
|
||||
/* gcc will nicely put the contents of crtbegin.o's .fini section here. */
|
|
@ -0,0 +1,9 @@
|
|||
.section .init
|
||||
/* gcc will nicely put the contents of crtend.o's .init section here. */
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
.section .fini
|
||||
/* gcc will nicely put the contents of crtend.o's .fini section here. */
|
||||
popl %ebp
|
||||
ret
|
|
@ -1,4 +1,4 @@
|
|||
ENTRY(loader)
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS {
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
KERNEL_ARCH_CFLAGS=
|
||||
KERNEL_ARCH_CPPFLAGS=
|
||||
KERNEL_ARCH_LDFLAGS=
|
||||
KERNEL_ARCH_LIBS=
|
||||
|
||||
KERNEL_ARCH_OBJS=\
|
||||
$(ARCHDIR)/boot.o \
|
Loading…
Reference in New Issue