In a very few cases, it is necessary to use a.out binaries, either because the source code is not available or because it is not possible to build new ELF binaries from the source for some reason.
As it happens, ELF installations almost always have a complete set
of a.out libraries in the /usr/i486-linuxaout/lib
directory.
The numbering scheme for a.out libraries differs from that of ELF ones,
cleverly avoiding conflicts that could cause confusion. The a.out
binaries should therefore be able to find the correct libraries at
runtime, but this might not always be the case.
Note that the kernel needs to have a.out support built into it, either
directly or as a loadable module. It may be necessary to rebuild the
kernel to enable this. Moreover, some Linux distributions require
installation of a special compatibility package, such as Debian's
xcompat
for executing a.out X applications.
Jerry Smith wrote a very handy rolodex program some years back. It uses the Motif libraries, but fortunately is available as a statically linked binary in a.out format. Unfortunately, the source requires numerous tweaks to rebuild using the lesstif libraries. Even more unfortunately, the a.out binary bombs on an ELF system with the following error message.
xrolodex: can't load library '//lib/libX11.so.3'
No such library
As it happens, there is such a library, in
/usr/i486-linuxaout/lib
, but xrolodex is unable to locate it
at run time. The simple solution is to provide a symbolic link in the
/lib
directory:
ln -s /usr/i486-linuxaout/lib/X11.so.3.1.0 libX11.so.3
It turns out to be necessary to provide similar links for the libXt.so.3 and libc.so.4 libraries. This needs to be done as root, of course. Note that you should make absolutely certain you will not overwrite or cause version number conflicts with pre-existing libraries. Fortunately, the new ELF libraries have higher version numbers than the older a.out ones, to anticipate and forestall just such problems.
After creating the three links, xrolodex runs fine.
The xrolodex program may be obtained from Spectro.