Added build system and some core boot files
This commit is contained in:
56
arch/x86_64/layout.ld
Normal file
56
arch/x86_64/layout.ld
Normal file
@@ -0,0 +1,56 @@
|
||||
ENTRY(_start)
|
||||
|
||||
KERNEL_LMA = 1M;
|
||||
KERNEL_VMA = 0xFFFFFFFF80000000;
|
||||
|
||||
SECTIONS {
|
||||
. = KERNEL_LMA;
|
||||
|
||||
.boot.text ALIGN(4K) : {
|
||||
*(.boot.text)
|
||||
*(.boot.rodata)
|
||||
}
|
||||
|
||||
.boot.bss ALIGN(4K) : {
|
||||
*(.boot.bss)
|
||||
}
|
||||
|
||||
. += KERNEL_VMA;
|
||||
|
||||
.text ALIGN(4K) : AT(ADDR(.text) - KERNEL_VMA)
|
||||
{
|
||||
*(.text)
|
||||
}
|
||||
|
||||
.data ALIGN(4K) : AT(ADDR(.data) - KERNEL_VMA)
|
||||
{
|
||||
_data = .;
|
||||
*(.data)
|
||||
}
|
||||
|
||||
.eh_frame ALIGN(4K) : AT(ADDR(.eh_frame) - KERNEL_VMA)
|
||||
{
|
||||
_ehframe = .;
|
||||
*(.eh_frame)
|
||||
}
|
||||
|
||||
.bss ALIGN(4K) : AT(ADDR(.bss) - KERNEL_VMA)
|
||||
{
|
||||
_bss = .;
|
||||
*(.bss)
|
||||
|
||||
*/
|
||||
/*
|
||||
* You usually need to include generated COMMON symbols
|
||||
* under kernel BSS section or use gcc's -fno-common
|
||||
*/
|
||||
*(COMMON)
|
||||
}
|
||||
|
||||
_end = .;
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.comment)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user