It's a long time since last time I touched my OS sources. Now I did a fresh recompile on it and tried to continue the work, but when I tried to load it with GRUB, it just says that the kernel binary has an invalid or unsupported format. I just started to check my kernel binary and noticed that its size is about 1.3Mb. This looks a bit strange for me as the kernel binary should be at around 200kB or so.
Here's my linker script:
Code: Select all
OUTPUT_FORMAT("elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS {
. = 0x100000 + SIZEOF_HEADERS;
.text : {
*(.multiboot_header)
*(.text)
*(.text.*)
*(.gnu.linkonce.t*)
__smp_trampoline_start = .;
*(.smp_trampoline)
__smp_trampoline_end = .;
}
. = ALIGN(0x1000);
.rodata : {
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r*)
}
. = ALIGN(0x1000);
__ro_end = .;
__data_start = .;
.data : {
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
}
. = ALIGN(0x1000);
.bss : {
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b*)
}
. = ALIGN(0x1000);
__k_init_start = .;
.kinit : {
*(.kernel_init)
}
. = ALIGN(0x1000);
__kernel_end = .;
}