Subject: Problem with binarie emulation
To: None <current-users@NetBSD.ORG>
From: Manuel BOUYER <bouyer@antioche.ibp.fr>
List: current-users
Date: 11/08/1996 11:06:13
Hello,
could someone explain me the following behavior ?
antifer#/tmp>/emul/linux/bin/ls
ktrace.out    ktrace.out.0  mutt016402    mutta16402
antifer#/tmp>chroot /emul/linux /bin/ls
chroot: /bin/ls: Exec format error
antifer#/tmp>

But if I do a symlink from '/emul/linux/emul/linux' to '../..',
then the chroot command will works.

Is this a bug or a feature ? From the ktrace output, it seems that the
emulation code try to open /emul/linux/lib/ld-linux.so.1, but never
linux/lib/ld-linux.so.1

Here is the kdump portion relevant to this:
 14988 bsdsh    CALL  execve(0x4b69c,0x4b648,0x4b650)
 14988 bsdsh    NAMI  "/bin/ls"
 14988 bsdsh    NAMI  "/emul/linux/lib/ld-linux.so.1"
 14988 bsdsh    RET   execve -1 errno 8 Exec format error

(bsdsh sits in /emul/linux, and was started with 
chroot /emul/linux /bsdsh).

--
Manuel Bouyer, MASI, Universite Paris VI.
email: bouyer@masi.ibp.fr
--