Subject: Re: 32 bit & 64 bit libraries.
To: matthew green <mrg@eterna.com.au>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 08/12/2001 11:14:15
On Sun, 12 Aug 2001, matthew green wrote:
: what do we want to do? suggestions off the top of my head (i have no
: real attachment to any of these ideas):
:
: 32 bit 64 bit
: /usr/lib32 /usr/lib [*]
: /usr/lib /usr/lib64
: /usr/lib /usr/lib/64
:
: for [*], while it provides backwards compatibility for NetBSD/sparc64,
: it doesn't truly allow proper sharing of binaries between the 32 bit
: and 64 bit platforms.
`sharing of binaries' depends on exactly what kind of sharing you want.
If the default output of the toolchain on sparc64 will be 64-bit (as it
should--there's a 32-bit kernel config for systems that want a 32-bit
userland), then 32-bit mode is simply binary compatibility: the 64-bit
libraries belong in /usr/lib.
I personally don't like `/usr/lib32' at all; it's divergent from the tree
structure. How about `/usr/lib/netbsd32' (to reflect the kernel compat
name)?
: also, there's the problem of ld.elf_so:
:
: /usr/libexec/ld.elf_so32 /usr/libexec/ld.elf_so
: /usr/libexec/ld.elf_so /usr/libexec/ld.elf_so64
: /usr/libexec/ld.elf_so /usr/libexec/64/ld.elf_so
This is a little more annoying, because none of these can provide binary
compatibility in a cleanish way. The /emul/netbsd32 situation works fine
for this, but I know your opinion of that. 8-)
Ideally, again, /usr/libexec/ld.elf_so should be targeted to the default
output of the toolchain for uniformity. Provided that, an option would be
to provide an in-kernel name substitution (specifically, substitute
something for `/usr/libexec/ld.elf_so' if a binary of the opposite bitsize
is loaded).
Now, I'm not as tied to ld.elf_so being targeted exactly to the toolchain's
default as with /usr/lib. If, for instance, the default on sparc64 is
64-bit code, then the rtld could be ld.elf_so64. For compatibility, a
kernel transform, as above, would be usable under COMPAT_15 to remap old
64-bit binaries to use the new rtld name. (Which would mean that there'd be
no flag day.)
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi NetBSD: Run with it.
-- NetBSD 1.5 now available on CD-ROM -- http://www.wasabisystems.com/