PATCH: Add archive support to ELF
Ian Lance Taylor
ian@airs.com
Sat Aug 9 06:16:00 GMT 2003
"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
More information about the Binutils
mailing list