Kernel image size calculation corrected
This commit is contained in:
parent
d7abbcf608
commit
39091a44c1
|
@ -152,8 +152,9 @@
|
|||
│ │ ├── strtol.d
|
||||
│ │ └── strtol.o
|
||||
│ ├── grub.log
|
||||
│ ├── kernel.ld
|
||||
│ └── qemu.log
|
||||
│ ├── kaleid32_disasm.asm
|
||||
│ ├── kaleid64_disasm.asm
|
||||
│ └── kernel.ld
|
||||
├── include
|
||||
│ ├── base
|
||||
│ │ ├── assert.h
|
||||
|
@ -258,4 +259,4 @@
|
|||
├── ProjectTree
|
||||
└── README.md
|
||||
|
||||
41 directories, 192 files
|
||||
41 directories, 193 files
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
[BITS 32]
|
||||
extern kernelEnd
|
||||
extern _bss
|
||||
global newKernelEnd
|
||||
global realKernelEnd
|
||||
|
||||
|
@ -32,6 +33,7 @@ global realKernelEnd
|
|||
KERNEL_STACK equ kernelEnd + 4096 * 2 * 1024 ; 8MB of stack
|
||||
newKernelEnd dq 0x0
|
||||
realKernelEnd dq 0x0
|
||||
|
||||
[section .rodata]
|
||||
;; GDT WITH DOC
|
||||
ALIGN 4096
|
||||
|
@ -52,7 +54,7 @@ GDT64:
|
|||
dq GDT64
|
||||
|
||||
|
||||
;; EMPTY PAGE TABLES (identity of the first 1GiB)
|
||||
;; EMPTY PAGE TABLES (identity of the first 4GiB)
|
||||
[section .bss]
|
||||
ALIGN 4096
|
||||
PML4_table:
|
||||
|
|
|
@ -29,14 +29,14 @@ ENTRY(MB_start) /* the name of the entry label */
|
|||
SECTIONS {
|
||||
. = 0x00100000; /* the code should be loaded at 1 MB */
|
||||
|
||||
.boot ALIGN (0x1000) : /* align at 4 KB */
|
||||
.boot ALIGN (0x1000) :
|
||||
{
|
||||
*(.multiboot)
|
||||
*(.multiboot)
|
||||
}
|
||||
|
||||
.text ALIGN (0x1000) : /* align at 4 KB */
|
||||
.text ALIGN (0x1000) :
|
||||
{
|
||||
*(.text) /* all text sections from all files */
|
||||
*(.text)
|
||||
}
|
||||
|
||||
.data ALIGN (0x1000) :
|
||||
|
@ -51,19 +51,19 @@ SECTIONS {
|
|||
*(.eh_frame)
|
||||
}
|
||||
|
||||
.bss ALIGN (0x1000) : /* align at 4 KB */
|
||||
.rodata ALIGN (0x1000) :
|
||||
{
|
||||
*(.bss) /* all bss sections from all files */
|
||||
*(.rodata)
|
||||
}
|
||||
|
||||
.rodata ALIGN (0x1000) : /* align at 4 KB */
|
||||
.bss ALIGN (0x1000) :
|
||||
{
|
||||
*(.rodata) /* all rodata sections from all files */
|
||||
*(.bss)
|
||||
}
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.comment)
|
||||
*(.comment)
|
||||
}
|
||||
|
||||
kernelEnd = .;
|
||||
|
|
Loading…
Reference in New Issue