Subject: Re: libsa/loadfile.c (a.out not working)
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 07/16/2001 11:06:43
> 1) aout_exec() seems to load files non-zero entry point at the wrong
> address. A kernel with a_entry of 0x2e00 loads at address 0x2e00,
> with its entry point at 0x5c00 !
> If this were true, the i386 port wouldn't work. But I'd need to look
> at the code again and get my head wrapped around it to figure out how
> to make your booter work.
Basically, I do something this:
#define COUNT_KERNEL (COUNT_ALL & ~COUNT_HDR)
#define LOAD_KERNEL (LOAD_ALL & ~LOAD_HDR)
if ( loadfile("netbsd.aout", kVec, COUNT_KERNEL) == 1 )
buff = calloc(kVec[MARK_MAX], 1);
if ( ! buff )
kVec[MARK_START] = buff;
if ( loadfile("netbsd.aout", kVec, LOAD_KERNEL) == 1 )
a_entry of netbsd.aout is 0x2e00. A dump of buff reveals the
first 0x2e12 bytes to be zero. MARK_ENTRY points to buff + 0x2e00.
| Nigel Pearson, email@example.com | "Reality is that which, |
| Telstra NW-D, Sydney, Australia. | when you stop believing |
| Office: 9206 3468 Fax: 9212 6329 | in it, doesn't go away." |
| Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis.' |