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: PATCH: Add archive support to ELF


"H. J. Lu" <hjl@lucon.org> writes:

> On Fri, Aug 08, 2003 at 10:32:15PM -0700, Ian Lance Taylor wrote:
> > "H. J. Lu" <hjl@lucon.org> writes:
> > 
> > > This patch supports "readelf -s libfoo.a".
> > 
> > But the whole point of readelf is that it *doesn't* use the BFD
> > library.
> 
> Can you compile readelf without including "bfd.h"? Claiming readelf
> doesn't use BFD is misleading.

It uses bfd.h, but it doesn't call any routines from the BFD library.

It only uses bfd.h as a simple way to get 64-bit types when
available.

> But since readelf is the part of binutils, why do I have to reinvent
> the wheel?

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.

Note that you don't need to use readelf to read archives.  You can use
ar, objdump, or nm.

Ian


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