Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New compat_bsdos.8 Manpage



On Sat, Aug 29, 2020 at 19:25:15 -0400, Dan Plassche wrote:

> The magic setup is a bit more varied though.  For a.out binaries,
> /emul/$foo lookups happen for SunOS,

This is done by the kernel.


> but NetBSD a.out libraries are searched under /emul/aout for
> COMPAT_09 through COMPAT_14.

This, OTOH, is done by a.out ld.so and ldconfig - and doesn't seem to
be documented at all except for a note in passing at the end of
compat_netbsd32(8).

 
> > So ideally the wording should explain that bsdos does NOT have a magic
> > /emul/$foo root like other emulations as it's COMPAT_NOMID, not
> > COMPAT_BSDOS, and the binaries run under COMPAT_NOMID get their files
> > looked up in the normal root namespace, so you have to have a real
> > /shlib in you file system, whatever that is, a directory or a symlink
> > to elsewhere.  /emul/bsdos/shlib might be not that bad a choice for
> > $elsewhere, but then the man page has to be super-clear that this is
> > just to follow the convention and there's no magic in that choice, as
> > /emul prefix might imply.
> 
> Okay, you make a good point that the library lookup path needs to be
> clear to the user.  I'll revise the wording when sending the next
> diff to explain that there's no magic path.

I'd say, don't mention chroot.  Instead it would be nice to document a
working setup that puts the least amount of stuff into the main
namespace.  Now, I haven't even RTFS'ed this, but if I'd have to go
about it I'd check if the following works:

i386:  /usr/libexec/ld.so
amd64: /emul/netbsd32/usr/libexec/ld.so  
       /emul/aout/etc/ld.so.conf
       /emul/aout/shlib

I guess on amd64 you can also use

       /emul/netbsd32/emul/aout/etc/ld.so.conf
       /emul/netbsd32/emul/aout/shlib

but that's probably overly pedantic :)

-uwe


Home | Main Index | Thread Index | Old Index