Subject: ELF integration on a.out platforms
To: None <tech-toolchain@netbsd.org, tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 02/09/1999 02:56:55
Hi,

Since ELF is now completely working on i386 (including shared libraries,
debugger, kernel, boot blocks, installboot) I'd like to open a discussion
to decide which is the best way to integrate this without major hassles
to the user base.

Currently there are two proposals on how to integrate elf:

1. Create /usr/lib.aout /usr/lib.elf
	- modify ld.so to look into /usr/lib.aout
	- modify the tools to look there
   Pros:
	- clear identification of the binaries and co-existance
	- easy generation of binaries in both formats provided
	  cross compiler tools are there
   Cons:
	- ld.so still needs to be present in /usr/libexec
	- does not deal with third party libraries; pkg and xsrc
	  need to be dealt with the same way as /usr/lib
	- configuration scripts of third party software might break
	  when looking for /usr/lib
	- a lot of work modifying tools to look in /usr/lib.xxx
	- default 'make install' of elf libraries on third party
	  software already installed in a.out can break things

2. Create new emulation /emul/aout and COMPAT_AOUT
	- modify kernel to use system call table and system calls
	  that access pathnames to look in /emul/aout first.
	- provide package of aout libraries
	- move aout tools on /emul/aout
   Pros:
	- /usr/lib gets populated with elf binaries and stays under
	  the same pathname
	- No a.out binaries/libraries required in the main tree to
	  run a.out binaries
	- a.out support can be easily added and removed 
   Cons:
	- Flag day installation
	- The emulation path lookup is not perfect, it fails TDRT
	  in some cases
	- default 'make install' of elf libraries on third party
	  software already installed in a.out can break things
	- modest amount of work adding aout emulation in the kernel

o The list of pros and cons is not comprehensive. Please feel free to
  point out things I missed.
o Provide other alternatives.
o I am willing to do the work for either (1) or (2).


christos