Hy,
I have two modules startup.asm and main.c. Startup.asm is writen in nasm (output is coff format).
startup.asm:
SECTION .text
GLOBAL entry
entry:
; some staff
; aout multiboot Kludge
main.c have only one function main (called from startup.asm).
main.c is compiled with DJGPP GCC. Becuase i want paging, LD
script looks something like this:
ENTRY(entry)
v = 0xC0000000;
p = 0x100000;
SECTIONS
{
.text virt : AT(phys)
{ code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (g_data - g_code))
{ .data = .; _data = .; __data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (g_bss - g_code))
{ bss = .; _bss = .; __bss = .;
*(.bss)
*(COMMON)
. = ALIGN(4096);
}
_end = .; __end = .;
}
GRUB is installed on FAT12 floppy. After booting, I got mesage : Loading below 1MB is not supported? What is problem?
GRUB & COFF Kernel
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:GRUB & COFF Kernel
what are g_* ?
Also, you of course know that GRUB ignores what you say about the virtual address ? it just load the things at their physical addresses and expect the code itself to do whatever fancy tricks required to make physical addresses appear as the requested vaddr.
Also, you of course know that GRUB ignores what you say about the virtual address ? it just load the things at their physical addresses and expect the code itself to do whatever fancy tricks required to make physical addresses appear as the requested vaddr.