This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Help .
- To: octavp at isratech dot ro
- Subject: Re: Help .
- From: Nick Clifton <nickc at redhat dot com>
- Date: Sat, 13 Jan 2001 12:08:04 -0800
- CC: binutils at sources dot redhat dot com
Hi Nicu,
: I need to know how ld and assembler does an object file ( an ELF one ).
: What I need to know is the exact steps that are needed in order to
: build an object file. I want to know how are build the symbol table and
: etc...
This sounds like you need a good book that explains what an assembler
is, how it works, etc. Check with any number of book-selling web sites
to find a whole range of books on this topic.
Here is a quick overview of the answer to your question:
ld does not create object files. It processes object files and
turns them into executables.
The assembler creates object files. It takes as its input a text
files which contain assembly language commands and it turns it into
an object file. The object file will contain sections. These
sections have different contents. The symbol table will be one of
these sections, the program's code will be another and so on.
If you need to know the details of *how* the assembler turns a text
file into an object file, there is no better tutor than examining the
source code yourself and playing with it.
Cheers
Nick