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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
orighost
Posts: 17
Joined: Sun May 27, 2012 8:38 pm

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

Post 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).
Last edited by orighost on Wed Jun 13, 2012 7:30 pm, edited 1 time in total.
orighost
Posts: 17
Joined: Sun May 27, 2012 8:38 pm

Re: Can not get multiboot info(section header)

Post by orighost »

version:0.5.98
May be it's too old, I will try a new version
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Can not get multiboot info(section header)

Post by Love4Boobies »

Where did you manage to even find that 11 year old copy of GRUB? :lol:
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
orighost
Posts: 17
Joined: Sun May 27, 2012 8:38 pm

Re: Can not get multiboot info(section header)

Post 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 ?
orighost
Posts: 17
Joined: Sun May 27, 2012 8:38 pm

Re: Can not get multiboot info(section header)

Post 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.
Post Reply