Elfkit-1.2 is now available
jdp at polstra.com
Fri Apr 12 16:25:29 PDT 1996
Elfkit version 1.2 is now available.
WHAT IS ELFKIT?
Elfkit is a collection of tools for compiling and executing ELF
programs under FreeBSD-2.1.0-RELEASE and later. It consists of:
* Patches for gcc-2.7.2, to make it support ELF under FreeBSD.
* Patches for binutils-22.214.171.124, to make it support ELF under FreeBSD.
* Patches for libc from FreeBSD-2.1.0-RELEASE, to support building it
as an ELF shared library.
* An ELF dynamic linker.
* A user-level test program that can invoke the dynamic linker to
load and execute ELF programs under FreeBSD.
The user-level test program is superfluous, if you are running
FreeBSD-current. That version of FreeBSD can directly execute ELF
WHAT CAN I DO WITH IT?
You can compile, link, and execute C and C++ programs. This depends
to some extent on what libraries they require. We include patches
for an ELF libc. Most other libraries (including all of the X11
libraries) can be built simply by typing "elf-make" in the appropriate
source directory. The exceptions are those libraries that include
some assembly language code. The math library "libm" is one such
library. Unfortunately, "libm" hasn't been converted yet.
The output of the linker is a standard, dynamically-linked ELF
executable or shared library.
WHAT HAS CHANGED SINCE THE LAST RELEASE?
We are now using binutils-126.96.36.199 from the Linux project. This
release has many ELF-related bug fixes. Also, we now hardly have to
patch the binutils release at all, because H.J. Lu was kind enough
to merge our FreeBSD/ELF changes into his release. Thanks and a tip
of the hat to H.J. Lu, Eric Youngdale, David Engel, Ian Lance Taylor,
and the Linux user community, for their hard work in finding and
fixing bugs in the binutils ELF support.
Note: There have been only very minor changes to gcc. If you
already have installed the version from elfkit-1.1, you don't need
to bother rebuilding gcc.
Major renovation of the "crt*.o" files. They should be functionally
The use of "gcc -shared" for building shared libraries is now
supported. In fact, that's the recommended method, because it
arranges to link in the proper "crt*.o" files in the right places.
C++ support! Static constructors and destructors work properly,
even in shared libraries.
Added instructions for building libg++-2.7.1. It's a little bit
No longer use GNU malloc, as it's going away in FreeBSD. (It's
being replaced by PHK malloc.)
Eliminated the "libc/elf" subdirectory. Its contents are no longer
necessary, and they interfered with the ELF merge into FreeBSD-current.
Fixed a couple of bugs in "libc". Most notable are the fixes to
"setjmp" and "sigsetjmp" for PIC code. These functions now work
properly, instead of dumping core.
Added support for dlopen() and friends. It has not been tested
very thoroughly yet.
Beefed up some dynamic linker error messages.
This is probably the last release based on FreeBSD-2.1.0. (I know,
you've heard that before.) We plan to track FreeBSD-current in the
WHO SHOULD USE ELFKIT?
The current release of elfkit is intended for people who want to
help develop ELF support under FreeBSD. If you simply want to run
ELF programs, and don't want to learn anything else about it, come
back in a few months.
Elfkit is a work-in-progress, not a finished product. If you use
it, you should be prepared to deal with some disruption when new
releases come out. For example, the installation procedure and
the directory structure could change in future releases. You should
also expect that some features won't work right. (Please report such
problems to "elfkit-bugs at polstra.com"!)
HOW WELL DOES IT WORK?
It works surprisingly well! For example, I recently tried "elf-make
World" from the top of the XFree86 source tree. It succeeded at
building all of the libraries and programs, failing only on the
programs that required missing libraries (mostly, "libm"). The
programs that built successfully, such as "xclock", seemed to
WHERE CAN I GET IT?
WHAT ELSE WILL I NEED?
* gcc-2.7.2.tar.gz, from any GNU site.
* binutils-188.8.131.52.tar.gz, available from
and other Linux mirror sites.
* The sources for libc, from FreeBSD-2.1.0-RELEASE.
* The /usr/include tree from FreeBSD-2.1.0-RELEASE.
If you want to use C++, you will also need:
* libg++-2.7.1, from
Also available from GNU mirror sites.
* GNU make (any reasonably recent version).
Available from the FreeBSD ports and packages collections, and
of course from any GNU mirror site.
If at all possible, you should get your "libc" and "include" sources
from one of the FreeBSD mirror sites, or from the FreeBSD-2.1.0
CD-ROM. If that's absolutely impossible for you, you can get them
Please try to avoid getting the "libc" and "include" sources from
ftp.polstra.com. Its network connection is only a 56K frame relay
link. Write to me, if you'd like to make a donation to the "T1 for
WHERE DO I SEND BUG REPORTS AND COMMENTS?
elfkit-bugs at polstra.com
WHAT??? You want to ... HELP?!
Send mail to "elfkit-bugs at polstra.com" if you'd like to help.
John Polstra jdp at polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Self-knowledge is always bad news." -- John Barth
More information about the freebsd-announce