feat: add initial impl of efi-stub and kernel
This commit is contained in:
60
arch/x86/boot/kcapsule.ld
Normal file
60
arch/x86/boot/kcapsule.ld
Normal file
@@ -0,0 +1,60 @@
|
||||
OUTPUT_ARCH(i386:x86_64)
|
||||
SECTIONS {
|
||||
. = 0x1000;
|
||||
.text : {
|
||||
_text = .;
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
_etext = .;
|
||||
}
|
||||
.rodata : {
|
||||
_rodata = .;
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
_erodata = .;
|
||||
}
|
||||
. = ALIGN(0x1000);
|
||||
.data : {
|
||||
_data = .;
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
. = ALIGN(0x1000);
|
||||
_edata = .;
|
||||
}
|
||||
.bss : {
|
||||
_bss = .;
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
*(COMMON)
|
||||
_ebss = .;
|
||||
}
|
||||
|
||||
.pgtable : {
|
||||
_pgtable = .;
|
||||
*(.pgtable)
|
||||
_epgtable = .;
|
||||
}
|
||||
|
||||
. = ALIGN(0x1000);
|
||||
_end = .;
|
||||
.got.plt (INFO) : {
|
||||
*(.got.plt)
|
||||
}
|
||||
ASSERT(SIZEOF(.got.plt) == 0 ||
|
||||
SIZEOF(.got.plt) == 0x18,
|
||||
"Unexpected GOT/PLT entries detected!")
|
||||
|
||||
/*
|
||||
* Sections that should stay zero sized, which is safer to
|
||||
* explicitly check instead of blindly discarding.
|
||||
*/
|
||||
.got : {
|
||||
*(.got)
|
||||
}
|
||||
ASSERT(SIZEOF(.got) == 0, "Unexpected GOT entries detected!")
|
||||
|
||||
.plt : {
|
||||
*(.plt) *(.plt.*)
|
||||
}
|
||||
ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
|
||||
}
|
||||
Reference in New Issue
Block a user