Subject: Re: more on sparc svr4 emul problem
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 02/01/2000 11:47:02
> I had noticed a while back that the problem only happens when the
> kernel is ELF, a.out kernels work fine.  as a goofy experiment, I
> tried converting an a.out kernel to ELF with objcopy, and I was
> completely amazed to find that this produced a working kernel [...]
> anyone have ideas on how to proceed from here?

Well, here's how I'd approach it.

- objcopy all the .o files from your a.out kernel, then try linking
   with the ELF ld.  If it fails, it's ld; if not, it's elsewhere.

- If it's ld, I'm not sure where to go from there.

- If it's elsewhere, then start recompiling, one file at a time.  (Or
   if you're ambitious, save all the objcopied a.out .o files and do
   binary search on the set of .o files.)  Once you find the file that
   breaks, try a kernel that's ELF all the way except for that .o file.

- If you can narrow it down to a single .o file, then start using cc -S
   and diff and the like, or possibly diff the disassembled .o files.

- If not...I'm not sure where to take it from there.

This is largely built on the hope that it's a codegen bug, somehow, as
you can probably tell from which branches are "I'm not sure what to do".

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B