In article <11*********************@z14g2000cwz.googlegroups. com>,
curious <me********@yahoo.com> wrote:
It will be great if some one can explain in detail about structure of
process in memory...where is symbol table etc..located?
That can vary between two different versions of the same compiler
for the same system. There is no standard other than that which
might happen to be imposed by a particular operating system.
When symbol tables exist, they are usually not kept as part of the
process: they are usually kept as part of the file that stores the
executable. The structure of the files that store executables can
vary from version to version of the same operating system. There is
no one standard.
There are a some on-disk symbol table formats that OS developers tend
to implement so that they do not have to reinvent the functionality
and to make it easier to borrow debuggers such as 'gdb'. One of those
more common on-disk symbol table formats is known as "dwarf".
There are some on-disk executable image formats that OS developers
tend to implement so that they do not have to reinvent functionality
and to make it easier to borrow debuggers and compilers. Some of
the more common on-disk executable image formats are ELF and COFF.
The format of a symbol table on-disk or of an executable image on-disk
might be -very- different than the structure of an executing process.
The entire concept of "symbol table" and "executable image" on-disk
is outside of the C standard. For more information, you need to look
at the documentation for particular systems you are interested in.
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)