Subject: SVR4/i386 emulation
To: None <port-i386@netbsd.org>
From: Bill Squier <groo@guinness.cs.stevens-tech.edu>
List: port-i386
Date: 09/09/1998 00:44:06
This has got to be something braindead I'm doing:

1) I have a Solaris/x86 2.6 distribution C
2) I extracted /usr/lib and /usr/bin (and more, actually)
   to /emul/svr4/
3) I wrote a little awk script to grok the pkgmap files
   that Sun provides to do appropriate permissions and symlinks
   on the files I extracted.
4) I checked that the awk script did the "right thing"
5) I created the /emul/svr4/dev dir with the NetBSD supplied SVR4_MAKEDEV

Static executables work fine. (well, /emul/svr4/sbin/uname does)

Dynamic exeuctables die with a Bus Error:

---

(root, 277) /emul/svr4/usr/bin>ktrace ./ls
Bus error (core dumped)
(root, 278) /emul/svr4/usr/bin>kdump
 12104 ktrace   RET   ktrace 0
 12104 ktrace   CALL  execve(0xefbfd5df,0xefbfd534,0xefbfd53c)
 12104 ktrace   NAMI  "./ls"
 12104 ktrace   NAMI  "/emul/svr4/usr/lib/ld.so.1"
 12104 ktrace   NAMI  "/emul/svr4"
 12104 ktrace   NAMI  "/emul/svr4/usr/lib/ld.so.1"
 12104 ls       EMUL  "svr4"
 12104 ls       RET   execve JUSTRETURN
 12104 ls       PSIG  SIGBUS SIG_DFL
 12104 ls       NAMI  "ls.core"
(root, 279) /emul/svr4/usr/bin>ls -l ../lib/ld.so.1
-rwxr-xr-x  1 bin  bin  142820 Sep  8 23:31 ../lib/ld.so.1
(root, 280) /emul/svr4/usr/bin>file ../lib/ld.so.1
../lib/ld.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1

---

Any clue?  Need more info?

-wps