Autor Thema: GRUB sagt Error 13  (Gelesen 4601 mal)

rizor

  • Beiträge: 521
    • Profil anzeigen
Gespeichert
« am: 01. October 2009, 20:22 »
Nabend zusammen,

ich habe mal alles ein wenig umgeschrieben und schon meckert GRUB.
Kann den Fehler beim besten Willen aber nicht finden.

Mein Linker-Skript sieht wie folgt aus;
ENTRY(_start) /* the entry-method for the kernel */
OUTPUT_FORMAT(elf32-i386) /* the linked code is x86-code */

ALIGNMENT = 0x1000; /* the alignment for the linker-parts */
KERNEL_LMA = 0x100000; /* the loaded memory-address */
KERNEL_MMA = 0x100000; /* the mapped memory-address */
KERNEL_OFFSET = KERNEL_MMA - KERNEL_LMA; /* the offset between the mapped and the loaded address */

SECTIONS
{
. = KERNEL_MMA; /* load the kernel at KERNEL_MMA */
kernel_entry = .; /* the method for the loaded entry*/
kernel_virt_entry = . - KERNEL_OFFSET; /* the method for the virtual entry */

/* code-section and the read-only data from the c-code*/
.text : AT(ADDR(.text) - KERNEL_OFFSET)
{
*(.text)
*(.rodata)
}

/* initialized data */
.data ALIGN(ALIGNMENT) : AT(ADDR(.data) - KERNEL_OFFSET)
{
*(.data)
}

/* uninitialized data */
.bss : AT(ADDR(.bss) - KERNEL_OFFSET)
{
_sbss = .;
*(.bss)
*(COMMON)
_ebss = .;
}

. = ALIGN(ALIGNMENT); /* expand the kernel to a new ALIGNED address */

kernel_virt_end = . - KERNEL_OFFSET; /* the method for the virtual end */
kernel_end = .; /* the method for the loaded end*/

kernel_size = kernel_end - kernel_entry;/* the method for the size of the kernel */
}

Meine GCC-Flags so:
gcc -O0 -g -m32 -march=i386 -maccumulate-outgoing-args -fstrength-reduce -fomit-frame-pointer -finline-functions -fno-stack-protector -nostdinc -fno-builtin -I$(INC) -I$(ROOT)/rizor-libraries/libc/include -I$(ROOT)/rizor-libraries/librizor/include -L/usr/lib/gcc/i486-linux-gnu/4.3.3/libgcc.a -L$(BUILD)/libc.lib -L$(BUILD)/librizor.lib
Meine Linker-Flags so:
ld -I$(INC) -I$(ROOT)/rizor-libraries/libc/include -I$(ROOT)/rizor-libraries/librizor/include -T$(KERNEL)/config/linker_x86.ld -melf_i386

Ich kann den Fehler nicht finden.

Gruß
rizor
Programmiertechnik:
Vermeide in Assembler zu programmieren wann immer es geht.

kevin

  • Administrator
  • Beiträge: 2 767
    • Profil anzeigen
Gespeichert
« Antwort #1 am: 01. October 2009, 20:55 »
Ist der Multibootheader in Ordnung und in den ersten 8 Kilobytes? Das kannst du z.B. mit mbchk prüfen.
Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

 

Einloggen