At this point in the proceedings, you can, if you like, stop. You have installed everything necessary to compile and run ELF programs.
You may wish to rebuild programs in ELF, either for purposes of `neatness' or to minimise memory usage. For most end-user applications, this is pretty simple; some packages however do assume too much about the systems they run on, and may fail due to one or more of:
_prefixed to them; in an ELF executable, they don't. This makes no difference until you start integrating hand-written assembler: all the labels of the form
_foomust be translated to
foo, or (if you want to be portable about it) to
EXTERNALis some macro which returns either its argument (if
__ELF__is defined) or
_concatenated with its argument if not.
Anyway, here are two lists: the first is of programs that needed changing for ELF where the changes have been made (i.e. that you will need new versions of to compile as ELF), and the second is of programs that still need third-party patches of some kind.
src/s/linux.hin the emacs distribution to add the line
#define TERMINFOsomewhere near the top. This is not necessary for 19.31, but is for XEmacs 19.13. Apparently it will be fixed in 19.14.
when you run
Kernel support for ELF binaries (CONFIG_BINFMT_ELF) [Y/m/n/?] Compile kernel as ELF - if your GCC is ELF-GCC (CONFIG_KERNEL_ELF) [Y/n/?]
make config(this is also the case for most of the 1.3 series). If you are using 1.2 still, see the `patch' list below.
calprogram in util-linux 2.2 doesn't work. Upgrade to version 2.5 or later.
libXpm.so.4.5. The simple fix is to edit it carefully with emacs or another editor that copes with binary files. Find the occurence of the string
ˆ@is a NUL --- ASCII zero --- character), delete the
.5and add two more characters after the NUL to aviod changing the file length.
make-3.74--- either get the source code from a GNU site and apply the patch that comes with the libc-5.3.12 release notes, or get the binary
tsx-11. There is a bug in GNU make which only manifests with new ELF libc versions --- it's actually a dependency on a bug in old versions of the GNU libc, which was also present in Linux libc until recently. If you keep your old a.out
makeprogram it will continue to work, but if you want an ELF one you need the patch. The GNU Make developers know about the bug, and one day will release a fixed version.
cd /usr/src/linux/, cut the following patch out, and feed it into
patch -p1. Or just edit the Makefile manually using this as a guide; it's clear enough (delete the lines marked with a
-and add the ones with a
diff -u linux-1.2.13/Makefile.orig linux/Makefile --- linux-1.2.13/Makefile.orig Wed Aug 16 20:53:26 1995 +++ linux/Makefile Fri Dec 8 16:19:49 1995 @@ -12,9 +12,9 @@ TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) -AS =as -LD =ld -HOSTCC =gcc -I$(TOPDIR)/include -CC =gcc -D__KERNEL__ -I$(TOPDIR)/include +AS =/usr/i486-linuxaout/bin/as +LD =ld -m i386linux +HOSTCC =gcc -b i486-linuxaout -I$(TOPDIR)/include +CC =gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include MAKE =make CPP =$(CC) -E AR =ar
asm/io.hwhich is only detected by gcc 2.7.2. You will need the patch ftp://ftp.uk.linux.org/pub/Linux/libc/misc/io.h.