*BSD News Article 53211


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!News.Uni-Marburg.DE!news.th-darmstadt.de!fauern!lrz-muenchen.de!uni-regensburg.de!faui0n.informatik.uni-erlangen.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Will FreeBSD ever support ELF?
Date: 17 Oct 1995 00:19:07 +0100
Organization: Private FreeBSD site, Dresden.
Lines: 43
Message-ID: <45up9b$r0f@uriah.heep.sax.de>
References: <oenwlx9v8.fsf@vapor.Franz.COM> <45hbnd$9ln@uriah.heep.sax.de> <45lu9a$408@news.rrz.uni-koeln.de> <45pktl$7c9@news.bridge.net>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Rey Bango <rba@bridge.net> wrote:

>Could you point me to an FAQ that adequately explains what a.out & ELF 
>are?  I'm new to the UNIX game and I'm trying to understand the many 
>concepts of this rich OS.  I've also installed Slackware Linux and will 
>be installing FreeBSD very soon, so that I can have the hands on 
>experience.  If they're aren't any FAQs, perhaps you could explain it to 
>me.

All of them are object file formats.  Unlike with other systems, Unix
systems use a rather similar object file format for intermediate
(relocatable) objects (.o files) and executables.  Object libraries
(.a) and shared objects (.so) are in the same boat.

The oldest object file format is a.out.  The name is derived from the
default output file name of the linker.  Get access to some BSD system
and ask "man a.out" to see a description of the format.

AT&T system V (perhaps System III?) has been replacing a.out by
something more flexible (more sections have been allowed); they called
it COFF (Common Object File Format).  COFF experienced its design
deficiencies when it came to support shared libraries.  I think SCO
has it done with COFF, and i seem to remember that there's been at
least one other version of SVR3.2 using COFF shared libs, but the
design wasn't really up to that.  So they invented yet another object
file format, called ELF (executable and linking format; there seems to
be yet another translation of the acronym around).  ELF is the logical
generalization of COFF, from what i'm understanding.

ELF does also support the design of "generic" debugging information.
(I.e., the exact format of the debugging information is not included
in the standard.)  There seems to be a default debugging information
environment (Dwarf), but not all vendors follow it, and some vendors
decided to design their own very proprietary debugging information
system, e.g. Data General's DG/UX.  This leads to the rather curious
situation that there's a rather well-defined object file format with a
bunch of incompatible debugging formats.  IMHO, this is perverting the
whole idea of ELF.  (But we wouldn't necessarily suffer from this.)
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)