PATCH: Add archive support to ELF

Ian Lance Taylor ian@airs.com
Sat Aug 9 14:09:00 GMT 2003


Andrew Cagney <ac131313@redhat.com> writes:

> >> Because the whole point of readelf is that it doesn't use the BFD
> >> library.  In a very real sense, the entire readelf program is a
> >> reinvention of the wheel.
> > I don't think so. readelf provides much more and detailed ELF
> > specific
> > information than objdump or nm.
> > What harm will readelf using libbfd do? Is someone planning to remove
> > libbfd one day and still want to keep readelf.
> 
> Something to note here is that GDB would like access to more detailed
> display functions found in readelf.  In particular the dwarf2 print
> code.  Perhaps what's needed is a library that can print detailed
> internals and then have both readelf and objdump use it.

The original point of BFD was to provide a generic interface to a
number of different object file formats.

As we move to an ELF-only world, I think it becomes appropriate to
write ELF-only tools.  readelf is an example of such a tool, not that
that is what it was intended to be.

I have no particular objection to a library along the lines of what
you suggest.  But I'm not sure how it fits into the BFD framework.

It might also be interesting to add support for DWARF to objdump
--debugging.

Ian



More information about the Binutils mailing list