grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiboot2 doesn't work


From: Simon Peter
Subject: Multiboot2 doesn't work
Date: Sun, 30 Sep 2007 18:23:38 +0200

Hi,

I built a Multiboot2 compliant kernel, but GRUB2 (current CVS) crashes
when loading (not booting) it (i.e. as soon as I execute the multiboot
command on it). I assert this is a bug in GRUB2, as it should print out
an error message if there's something wrong with my image.

I traced the bug back to the grub_elf32_load_segment() function in
kern/elf.c: GRUB2 correctly detects the Multiboot2 and ELF32 headers
and tries to load the first (and only) loadable segment of the ELF32
program header, which it also correctly detects (debug printout shows
correct addresses). It crashes while trying to call the load_hook
function pointer, which is given as a parameter and should be pointing
to grub_mb2_arch_elf32_hook() in loader/i386/pc/multiboot2.c and that
pointer seems to be invalid.

I tried to print out the memory address of the
grub_mb2_arch_elf32_hook() function from within
grub_elf32_load_segment() for comparison, but this makes grub-mkimage
segfault, so I cannot generate a test GRUB2 image including the
printout.

I'm stuck at this point and would like to ask the knowledgable GRUB2
developers to have a look at this bug.

Thanks,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]