[Solved]Can not get multiboot info(section header)
Posted: Sun Jun 03, 2012 7:56 am
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).
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).