PATCH: Add archive support to ELF

Jakub Jelinek jakub@redhat.com
Sun Aug 10 16:37:00 GMT 2003


On Sat, Aug 09, 2003 at 07:09:10AM -0700, Ian Lance Taylor wrote:
> 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.

See Ulrich's elfutils, where readelf (built on top of libelf) handles
archives since the beginning.

	Jakub



More information about the Binutils mailing list