This isn't really a problem... as the kernel _works_
But there is a ~4k block between the elf header and the actual entry point.
It bothers me...
I've looked everywhere - the ld script, multiboot.h, my kernel startup code - nothing.
ELF Kernel Size
RE:ELF Kernel Size
Well... it IS the ld-script. I now know thats the culprit... I just have no clue HOW to fix it...
RE:ELF Kernel Size
Check this ld-script
/*
* new_chaos/kernel/kernel.lds
*
* Copyright (C) 2001 - 2003 Fixa
*
* ChaOS kernel linker script
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x100000 + SIZEOF_HEADERS;
.text : {
*(.text)
}
. = ALIGN(16);
.rodata : {
*(.rodata)
}
. = ALIGN(16);
.data : {
*(.data)
CONSTRUCTORS
}
. = ALIGN(16);
_edata = .;
.bss : {
*(.bss)
}
. = ALIGN(16);
_end = .;
/DISCARD/ : { *(.comment .note) }
}
/*
* new_chaos/kernel/kernel.lds
*
* Copyright (C) 2001 - 2003 Fixa
*
* ChaOS kernel linker script
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x100000 + SIZEOF_HEADERS;
.text : {
*(.text)
}
. = ALIGN(16);
.rodata : {
*(.rodata)
}
. = ALIGN(16);
.data : {
*(.data)
CONSTRUCTORS
}
. = ALIGN(16);
_edata = .;
.bss : {
*(.bss)
}
. = ALIGN(16);
_end = .;
/DISCARD/ : { *(.comment .note) }
}