ELF files...

Nick Clifton nickc@cygnus.com
Thu Jun 29 15:56:00 GMT 2000

Hi Robert,

:   Maybe you can help ( hell, I hope you're still there at all!!! ).
:  I need to break out an ELF file - ***including***  the data TYPES stored in
: same.
:  I went through the ELF spec and wrote a parser that breaks out the ELF header,
: program header,
:  sections (with their associated strings), the symbols (with their associated
: section names), and
:  relocation info.  What I CAN'T see, are the references - links, pointers,
: indexes - anything - to the
:  stored type-names - which I can plainly see in my hex editor.
:  I guess the spec may have this - but I don't see it!

I think that you might be confusing the ELF spec with the DWARF2 spec
here.  The ELF spec does not really have anything to say about types
(at least not those used by high level langauges), whereas the DWARF2
spec does.  Since ELF files typically use DWARF2 to hold their debug
information, it is probably this information that you are seeing in
your hex dumps.

Yopu may like to take a look at the sources for the READELF program
which is available as part of the GNU Binutils release.  this program
can displayt he contents of an ELF format file, including any DWARF2
format information inside it.  You can find the sources for readelf



More information about the Binutils mailing list