From owner-freebsd-hackers Sun Mar 12 05:50:59 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA16751 for hackers-outgoing; Sun, 12 Mar 1995 05:50:59 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id FAA16745 for ; Sun, 12 Mar 1995 05:50:48 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id XAA12746; Sun, 12 Mar 1995 23:49:10 +1000 Date: Sun, 12 Mar 1995 23:49:10 +1000 From: Bruce Evans Message-Id: <199503121349.XAA12746@godzilla.zeta.org.au> To: bde@zeta.org.au, hackers@FreeBSD.org, hasty@netcom.com Subject: Re: text's start address? Sender: hackers-owner@FreeBSD.org Precedence: bulk >Okay, I re-linked mdos.mon with "-T 1000000" and mdos now gets a >valid ex.a_entry. However, when I jump to location 1000038, I get a >core dump. mdos.mon is a simple program which prints 10. I just It was 0x1000000 + 0x18 before. Did something strip of the 0x1000 byte file header? >wanted to debug the loading process so I replace mdos.mon with the >simple program. The other thing that I noticed is that when I try >to execute mdos.mon, I get the error : >./mdos.mon: Exec format error. Wrong Architecture. I'm not sure if ZMAGIC is still supported. `/kernel' doesn't work either: sh: /kernel: 1: Syntax error: "(" unexpected # braindamaged bash: /kernel: cannot execute binary file # why? csh: Exec format error. Wrong Architecture. # OK >The last problem is not related to my main problem just curious as >to why the system prevents from executing the program. It probably doesn't support the nonzero entry address. Perhaps you are mixing MAGICs. The usual entry address for QMAGIC is 0x1000 + 0x38, the 0x1000 for the unmapped zero page and the 0x38 because there happens to be 0x38 bytes of consts (strings, etc) before the program start in crt0.o. For QMAGIC the file header is part of the program. Bruce