Page 1 of 1

[Solved]Can not get multiboot info(section header)

Posted: Sun Jun 03, 2012 7:56 am
by orighost
I want to get section header info, but I failed.

MULTIBOOT_PAGE_ALIGN equ 1<<0
MULTIBOOT_MEMORY_INFO equ 1<<1
MULTIBOOT_FLAG_ELF equ 1<<5
MULTIBOOT_HEADER_MAGIC equ 0x1BADB002
MULTIBOOT_HEADER_FLAGS equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_FLAG_ELF
MULTIBOOT_CHECKSUM equ -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
EXTERN code, bss, end

; This is the GRUB Multiboot header. A boot signature
dd MULTIBOOT_HEADER_MAGIC
dd MULTIBOOT_HEADER_FLAGS
dd MULTIBOOT_CHECKSUM

...
section .text
mov esp, stack
push ebx
mov ebp, 0
call kmain
...

when I start bochs, the grub inform me "unsupported multiboot features requested". But when I remove MULTIBOOT_FLAG_ELF flag ,no error occured. and can get memory info, remain can not get section header info(I get the value all is 0 : num size addr shndx).

Re: Can not get multiboot info(section header)

Posted: Sun Jun 03, 2012 8:34 pm
by orighost
version:0.5.98
May be it's too old, I will try a new version

Re: Can not get multiboot info(section header)

Posted: Sun Jun 03, 2012 9:13 pm
by Love4Boobies
Where did you manage to even find that 11 year old copy of GRUB? :lol:

Re: Can not get multiboot info(section header)

Posted: Tue Jun 05, 2012 4:34 am
by orighost
Love4Boobies wrote:Where did you manage to even find that 11 year old copy of GRUB? :lol:
I have a little lazy that I used others floppy image.
I just installed grub 0.97(this is the last version of grub 1), and remain not. I suppose it 's not the issue of version. Mustn't install grub 2 can solve the problem. I spend much time on install grub2 but not success. Can anyone give me a floppy image which has installed grub2 ?

Re: Can not get multiboot info(section header)

Posted: Thu Jun 07, 2012 5:13 am
by orighost
I have solved it ,in grub 0.97. I just remove the flag MULTIBOOT_FLAG_ELF and it works.
It's not necessary to use this flag if you want to get elf info. It's default supporting it. But if you use this flag it will occur an error.