This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch] readelf -c dump archive index like nm -s
- From: Shen Feng <shen at cn dot fujitsu dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 03 Sep 2007 13:04:43 +0800
- Subject: Re: [Patch] readelf -c dump archive index like nm -s
- References: <46D3AF8D.90206@cn.fujitsu.com> <46D80D76.8060504@redhat.com>
Hi Nick,
Thanks very much for submitting this patch. Do you have a binutils
copyright assignment on file with the FSF ? (I looked but did not find
one). Without one we unfortunately cannot accept the patch.
I sent the information to fsf-records@gnu.org. Is that right?
One question in particular comes to mind - why do you want this feature
in readelf ? Since it can already be done by "nm -s", as you have
pointed out, what purpose is served by adding this ability to readelf ?
nm uses BFD library but readelf doesn't.
I also found a FIXME about this when I read the readelf source code.
Thank you for your comments and I will fix it.
But I have one question.
* The format of the output is not particularly pretty. I agree
that it is the same format as provided by nm, but I am not sure
that is such a good idea. Maybe if the output was alpha sorted
(on object file and then symbol name) and indented to some degree
then it would be more useful. eg:
Index of archive foo.a:
Binary bar.o contains:
a_sym
b_sym
d_sym
Binary baz.o contains:
c_sym
e_sym
Now readelf rarely sorts any symbols. Does the archive index need to be sorted?
Maybe a text processing command such as sort can do it. So the format maybe
the same as you suggested, but without alpha sorted on object file and symbol
name. Do you think so?
Best Regards,
Shen Feng