Re: Reading material on C++ executable and object file format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aseem Rastogi wrote:

> I need some detailed reading material on the format of C++ object files,
> how are they generated by compiler and their format. I tried googling
> but could not find anything good.

First, realize that the compiler does not generate anything but input to
the assembler, and this is just a plain text file.  The assembler is
what actually produces an object file, and this is not part of gcc (it's
part of binutils if using the GNU assembler, but it is also possible to
use the native system's assembler.) 

Second, gcc runs on dozens of various platforms and there are equally as
many variations of object files, so you need to be much more specific
about exactly what you are seeking, as currently your question is
entirely too vague.

If you're talking about linux then you probably want to read about the
ELF spec (a google for "elf file format" has all the necessary
information.)  If you're talking about MS Windows then google for
"pe/coff file format".

If you are actually asking about how the C++ ABI is implemented then
google for "c++ abi" and read the documents on codesourcery.com's site,
which explains how gcc versions 3.x/4.x implements this.  (Don't let the
fact that it is called the Itanium C++ ABI dissuade you, this is what is
used for all g++ targets.)

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux