GRUB & COFF Kernel
Posted: Wed Apr 14, 2004 4:27 am
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?
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?