This is the mail archive of the
mailing list for the binutils project.
Re: RFC [PATCH] Use .strtab section for section name strings
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 30 Jun 2015 18:14:48 -0700
- Subject: Re: RFC [PATCH] Use .strtab section for section name strings
- Authentication-results: sourceware.org; auth=none
- References: <20150628000035 dot GA30222 at intel dot com> <20150629042319 dot GE1723 at bubble dot grove dot modra dot org> <CAJimCsFCjv+K7z7nJhVgXkDA_C7XqYotFPbj_t_71VPL=sOaJg at mail dot gmail dot com> <20150701005440 dot GI1723 at bubble dot grove dot modra dot org>
On Tue, Jun 30, 2015 at 5:54 PM, Alan Modra <email@example.com> wrote:
> On Mon, Jun 29, 2015 at 11:26:24PM -0700, Cary Coutant wrote:
>> >> Here is a patch to use .strtab section for section name strings if
>> >> there are symbols, otherwise use .shstrtab section.
>> > I think this is a bad idea.
>> > ...
>> > The great majority of object files won't see as much benefit. I
>> > reckon shared libraries and executables will only show very small
>> > decreases, at the cost of violating the ELF gABI.
>> To be fair, I don't think this would violate the spirit of the ELF
> You may be correct, but how will this play with utilities that modify
> binaries, eg. objcopy/strip? Particularly if someone uses an older
> objcopy/strip with one of these newfangled binaries. I guess
> objcopy/strip might just happen to work due to BFD hiding away details
> like .strtab and .shstrtab, but I'm not sure. elfutils ought to be
> checked too.
I consider it is a bug if an ELF tool can't handle it: