Subject: Linux emulation on 1.3_ALPHA
To: None <port-i386@NetBSD.ORG>
From: Giles Lean <giles@nemeton.com.au>
List: port-i386
Date: 11/22/1997 10:08:49
I've got the FreeBSD emulation working nicely and am now wanting to
run Adobe Acrobat, which has a Linux version.

I have

  options 	COMPAT_LINUX	# binary compatibility with Linux
  options 	EXEC_ELF32	# 32-bit ELF executables (SVR4, Linux)

in my kernel.  (I don't have COMPAT_SVR4 compiled in, if that
matters.)

I have loaded a set of dynamic link libararies (from Debian 1.3.1)
and can happily run linux-ldconfig.

So far so good.  Now for the bad news:

   topaz [giles]$ acroread
   /emul/linux/usr/local/Acrobat3/Reader/intellinux/bin/acroread: 1:
   Syntax error: word unexpected (expecting ")")

Darn ... looks like the shell is being asked to run the binary.

     topaz [giles]$ file /emul/linux/.../acroread
     /emul/linux/usr/local/Acrobat3/Reader/intellinux/bin/acroread:
     ELF 32-bit LSB executable, Intel 80386, version 1

     topaz [giles]$ linux-ldd /emul/linux/.../acroread ldd: can't
     execute
     /emul/linux/usr/local/Acrobat3/Reader/intellinux/bin/acroread
     (Exec format error)

I've missed something and can't see the answer in the compat_linux
manual page.  Is it necessary to 'brand' the ELF32 binaries to
indicate that they're Linux binaries?  FreeBSD has a 'brandelf'
command for this (so I see searching their web pages ...).

I guess it could still be a library problem ... surely ldd doesn't
need libraries to run though?

All suggestions welcomed!

Thanks,

Giles