Subject: Re: NOTICE: i386 port switched to ELF binary format
To: Frank van der Linden <frank@wins.uva.nl>
From: Paul Goyette <paul@whooppee.com>
List: port-i386
Date: 07/05/1999 15:45:58
There must be another trick missing here...

Every time the ``make build'' attempts to create a new image, I get an
error message like

	/usr/bin/ld: warning: cannot find entry symbol _start;
		defaulting to <some-hex-number>

And, attempting to execute any dynamically-linked ELF image yields for
example:

	/usr/src/usr.bin/banner/obj/banner: Exec format error. Binary
		file not executable.

But I can successfully execute statically-linked ELF images, like
sbin/ping, without problem, even though they (the static images) also
got the above warning from /usr/bin/ld

On Mon, 5 Jul 1999, Frank van der Linden wrote:

> On Mon, Jul 05, 1999 at 09:37:51AM -0700, Paul Goyette wrote:
> > On Mon, 5 Jul 1999, Frank van der Linden wrote:
> > Does this mean _all_ shared libs, including those that live in
> > /usr/pkg/lib?  Do the ones from /usr/pkg/lib go into their own 
> > directory /emul/aout/usr/pkg/lib or into the standard place?
> 
> You don't have to copy the ones in other directories then /usr/lib.
> The ones in /usr/lib need to be copied, because they'll be overwritten
> by their ELF counterparts.
> 
> > Does the kernel have to be built with OBJECT_FMT = ELF, or will
> > the old build procedures work?
> 
> You don't need to set OBJECT_FMT for the kernel build. Just build a kernel
> with COMPAT_AOUT and EXEC_ELF32; the format doesn't matter.
> 
> > (suggest continuing on with original numbering, rather than
> > going back to 4!  :)
> 
> Probably a good idea :-)
> 
> > I think I'd recommend doing a ``make cleandir'' here before the
> > first ``make''
> > 
> > > 	5) make install in each of those directories
> > > 	   (you now have a toolchain of a.out binaries that will generate
> > > 	    ELF binaries)
> > > 	6) cd /usr/src/lib/csu ; make && make install
> > 
> > Ditto with the ``make cleandir''
> 
> Yes, you're right.
> 
> - Frank
> 

--------------------------------------------------------------------------
| Paul Goyette      | PGP DSS Key fingerprint:   | E-mail addresses:     |
| Network Engineer  |   BCD7 5301 9513 58A6 0DBC |  paul@whooppee.com    |
| and kernel hacker |   91EB ADB1 A280 3B79 9221 |  pgoyette@juniper.net |
--------------------------------------------------------------------------