Problem loading Kernel with Grub
Posted: Sun Oct 24, 2004 6:27 am
After I've downloaded a new version of ld(2.15.90.0.1.1 20040303 SuSE Linux) and gcc(3.3.3 SuSE Linux), grub wouldn't load my kernel. Before updating it works.
That's my linkerscript:
and that's the commando which I use to link all together:
$(LD) -T link.ld *.o -o ../kernel.bin
That's my linkerscript:
Code: Select all
/* Link.ld */
/*OUTPUT_FORMAT("binary") it seems that this doesn't work under Linux (I knew you have to add the AOUT_KLUGDE in your start.asm*/
OUTPUT_FORMAT("elf32-i386")
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
*(.text)
code = .; _code = .; __code = .;
. = ALIGN(4096);
}
.data :
{
/* only for cpp ??? */
/*__CTOR_LIST__ = .; LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) *(.ctors) LONG(0) __CTOR_END__ = .;
__DTOR_LIST__ = .; LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) *(.dtors) LONG(0) __DTOR_END__ = .;*/
*(.data)
data = .; _data = .; __data = .;
. = ALIGN(4096);
}
.bss :
{
*(.bss)
bss = .; _bss = .; __bss = .;
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}
$(LD) -T link.ld *.o -o ../kernel.bin