GRUB & COFF Kernel

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
s4063

GRUB & COFF Kernel

Post by s4063 »

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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GRUB & COFF Kernel

Post by Pype.Clicker »

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