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]
Other format: [Raw text]

Re: Readelf vs objdump


Stan Shebs <shebs@apple.com> writes:

> Hmm, I was hoping there was a stronger rationale; readelf has different
> functionality, so it's not like you can diff its output with objdump to
> confirm correctness.

That wouldn't be desirable in general.  objdump by design displays
generic information which is more or less meaningful for arbitrary
object file formats.  readelf by design displays information which is
specific to ELF.

It would be possible to add options to readelf to make it dump
information in the same format as objdump.  I don't think that would
be all that useful, though, and so far nobody has bothered to write
such code.

I do agree that it is odd that readelf has DWARF dumping code while
objdump does not.  Conversely, objdump has stabs dumping code while
readelf does not.  To me it would make more sense to have the DWARF
dumping code in objdump.  At least it should be possible to share the
DWARF dumping code between the two programs.

Ian


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