Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 1995 23:49:10 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, hackers@FreeBSD.org, hasty@netcom.com
Subject:   Re: text's start address?
Message-ID:  <199503121349.XAA12746@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503121349.XAA12746>