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