Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 1998 02:35:16 -0700 (PDT)
From:      Joseph Koshy <jkoshy@FreeBSD.ORG>
To:        jkh@FreeBSD.ORG, jraynard@FreeBSD.ORG
Cc:        freebsd-doc@FreeBSD.ORG
Subject:   pl. review the following patch ?
Message-ID:  <199805280935.CAA21371@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
Hi,

Docs/2780 can almost be closed with the following changes to linuxemu.sgml :
could you please review?

Briefly the changes are:

- using &rel.current; where appropriate instead of hardcoding release names
- change 2.2-RELEASE to `2.2-RELEASE and later' in a couple of places
- adding a small section on the use of `brandelf'.
- removing a pretty old comment about ELF support being new 

If the following patch is OK, I'll commit it (and close docs/2780) in a day
or two ...

Thanks,
Koshy

Index: linuxemu.sgml
===================================================================
RCS file: /home/ncvs/doc/handbook/linuxemu.sgml,v
retrieving revision 1.22
diff -u -r1.22 linuxemu.sgml
--- linuxemu.sgml	1997/10/19 13:32:11	1.22
+++ linuxemu.sgml	1998/05/28 09:39:31
@@ -11,7 +11,7 @@
 to run a large fraction of Linux binaries in both a.out and ELF
 format.  The linux emulation in the 2.1-STABLE branch is capable of
 running Linux DOOM and Mathematica; the version present in
-FreeBSD-2.2-RELEASE is vastly more capable and runs all these as well as
+&rel.current; is vastly more capable and runs all these as well as
 Quake, Abuse, IDL, netrek for Linux and a whole host of other
 programs.
 
@@ -29,8 +29,7 @@
 linux-executable: Exec format error. Wrong Architecture.
 </verb>
 </tscreen>
-then you do not have linux compatibility support and
-you need to configure and install a new kernel.
+then you do not have linux compatibility support in your kernel.
 
 Depending on which version of FreeBSD you are running, how you get 
 Linux-emulation up will vary slightly:
@@ -187,10 +186,9 @@
 archives :-) seems to hold that Linux emulation works best with
 linux binaries linked against the ZMAGIC libraries; QMAGIC libraries
 (such as those used in Slackware V2.0) may tend to give the
-Linuxulator heartburn.  As of this writing (March 1996) ELF emulation
-is still in the formulative stages but seems to work pretty well.  Also, 
-expect some programs to complain about incorrect minor versions.  In 
-general this does not seem to be a problem.
+Linuxulator heartburn.  Also, expect some programs to complain about 
+incorrect minor versions of the system libraries.  In general, however,
+this does not seem to be a problem.
 
 <sect2><heading>Installing libraries manually</heading>
 
@@ -208,8 +206,8 @@
 
 
 FreeBSD-2.2-RELEASE and later works slightly differently with respect to
-/compat/linux.  On -CURRENT, all files, not just libraries, are
-searched for from the ``shadow root'' /compat/linux.
+/compat/linux:  all files, not just libraries, are searched for from 
+the ``shadow root'' /compat/linux.
 
 Generally, you will need to look for the shared libraries that Linux 
 binaries depend on only the first few times that you install a Linux 
@@ -227,8 +225,8 @@
 the necessary installation steps).
 
 <p>If you have access to a Linux system, see what shared libraries
-it needs, and copy them to your FreeBSD system. Example: you have
-just ftp'ed the Linux binary of Doom. Put it on the Linux
+the application needs, and copy them to your FreeBSD system. Example: 
+you have just ftp'ed the Linux binary of Doom. Put it on the Linux
 system you have access to, and check which shared libraries it
 needs by running `ldd linuxxdoom':
 
@@ -397,6 +395,28 @@
 the minor number(s) mm are less important, though it is advised to
 take the most recent version.
 
+<sect1><heading>Installing Linux ELF binaries</heading>
+ELF binaries sometimes require an extra step of ``branding''.
+If you attempt to run  an unbranded ELF binary, you will get an error 
+message like the following:
+
+<verb>
+% ./my-linux-elf-binary
+ELF binary type not known
+Abort
+%
+</verb>
+
+<p>To help the FreeBSD kernel distinguish between a FreeBSD ELF binary from a
+a Linux one, use the brandelf(1) utility:
+<verb>
+% brandelf -t Linux my-linux-elf-binary
+</verb>
+
+The GNU toolchain now places appropriate branding information 
+into ELF binaries automatically, so you should hopefully be doing 
+this step increasingly rarely in the future.
+
 <sect1><heading>Configuring the host name resolver</heading>
 
 <p>If DNS does not work or you get the messages
@@ -425,8 +445,8 @@
 
 <p>Lastly, those who run 2.1-STABLE need to set an the
 RESOLV_HOST_CONF environment variable so that applications will know
-how to search the host tables.  If you run FreeBSD 2.2-RELEASE, you can
-skip this.  For the /bin/csh shell use:
+how to search the host tables.  If you run FreeBSD 2.2-RELEASE or later, 
+you can skip this.  For the /bin/csh shell use:
 <tscreen>
 <verb>
 setenv RESOLV_HOST_CONF /compat/linux/etc/host.conf

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805280935.CAA21371>