Page 1 of 1

ELF Kernel Size

Posted: Thu Feb 20, 2003 12:00 am
by Kernel
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.

RE:ELF Kernel Size

Posted: Fri Feb 21, 2003 12:00 am
by Visitor
Weird...

Bump!

RE:ELF Kernel Size

Posted: Fri Feb 21, 2003 12:00 am
by Kernel
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

Posted: Tue Mar 11, 2003 12:00 am
by Fixa
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) }
}