www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/14/02:24:28

From: "Mark & Candice White" <mhewii AT home DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: grub coff-go32/a.out?
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <npfo7.108499$K6.43252312@news2>
Date: Fri, 14 Sep 2001 04:08:51 GMT
NNTP-Posting-Host: 24.19.84.198
X-Complaints-To: abuse AT home DOT net
X-Trace: news2 1000440531 24.19.84.198 (Thu, 13 Sep 2001 21:08:51 PDT)
NNTP-Posting-Date: Thu, 13 Sep 2001 21:08:51 PDT
Organization: Excite AT Home - The Leader in Broadband http://home.com/faster
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Is there a stub for djgpp coff to be loaded by grub?
Is coff-go32 an a.out format?

I compile all the parts as coff then make one link
as OUTPUT_FORMAT("i386elf') and one as
OUTPUT_FORMAT("coff-go32'). The elf one works,
the coff's a.out kludge header is read but then errors as:
Error 13: Invalid or unsupported executable format

I have:
; start.asm  NASM

    global KernelEntry
    extern _KernelMain

    bits 32
    segment .text

F_PAGE_ALIGN equ 1<<0
F_MEM_FIELDS equ 1<<1
F_A_OUT_KLUD equ 1<<16

MAGIC        equ 0x1BADB002
FLAGS        equ F_PAGE_ALIGN | F_MEM_FIELDS | F_A_OUT_KLUD
CHECKSUM     equ -(MAGIC + FLAGS)

KernelEntry:
    mov esp, 0x00101000
    push ebx
    call _KernelMain

; The Multiboot header

    align 8
boot_hdr:
    dd MAGIC
    dd FLAGS
    dd CHECKSUM
;--a.out kludge header
    dd boot_hdr        ;header_addr
    dd KernelEntry    ;load_addr
    dd KernelEntry+0x2000    ;load_end_addr
    dd KernelEntry+0x2000    ;bss_end_addr
    dd KernelEntry    ;entry
;end



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019