This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help .


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]