Reorganized source tree

This commit is contained in:
2020-08-01 16:37:44 -05:00
parent f5dd5bb135
commit 44e712d214
29 changed files with 35 additions and 53 deletions

36
src/x86/linker.ld Executable file
View File

@@ -0,0 +1,36 @@
ENTRY(_start)
SECTIONS
{
. = 0xFF900000;
VIRTUAL_BASE = .;
PHYSICAL_BASE = 0x100000;
BASE_DIFF = VIRTUAL_BASE - PHYSICAL_BASE;
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot)
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
LOAD_START = ADDR(.text) - (VIRTUAL_BASE - PHYSICAL_BASE);
LOAD_END = ADDR(.data) + SIZEOF(.data) - (VIRTUAL_BASE - PHYSICAL_BASE);
BSS_END = ADDR(.bss) + SIZEOF(.bss) - (VIRTUAL_BASE - PHYSICAL_BASE);
IMAGE_SIZE = ((BSS_END - LOAD_START) + (4096 - ((BSS_END - LOAD_START) % 4096))) / 4096;
}