This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Object file formats, compilers and linkers
- To: JB <jamesb at northnet dot com dot au>
- Subject: Re: Object file formats, compilers and linkers
- From: Bo Thorsen <bo at suse dot de>
- Date: Tue, 9 Jan 2001 17:13:00 +0100 (CET)
- Cc: gcc at gcc dot gnu dot org
On Wed, 10 Jan 2001, JB wrote:
> Hi GCC people,
>
> I'm interested in how a compiler writes a relocatable object file, and
> how a linker messes with these to produce an executable file.
>
> Is there some kind of easy to read (i.e. plain English) documentation
> on various object and executable file formats, for the novice?
> Supposing I wanted to write a linker, is there a textbook teaching how
> to write the bare bytes necessary to achieve some kind of executable
> file? Like for example, magic numbers if any, headers, and blah blah.
> Is there a resource on the net which describes any kind of relocatable
> object file and some executable format?
You might want to take a look at John R. Levine's book "Linkers &
loaders" - ISBN 1-55860-496-0 - Morgan-Kaufmann. This is pretty good at
explaining all these topics.
Bo.
--
Bo Thorsen | Lahnsgade 31, st.
Free software developer | 5000 Odense C
SuSE Labs | Denmark