This is the mail archive of the
mailing list for the binutils project.
Re: [gold, strip] Question about the changed offset when stripping
- From: Alexander Ivchenko <aivchenk at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>, Alexander Ivchenko <aivchenk at gmail dot com>, binutils <binutils at sourceware dot org>, Ian Lance Taylor <iant at google dot com>
- Date: Tue, 3 Dec 2013 14:30:48 +0400
- Subject: Re: [gold, strip] Question about the changed offset when stripping
- Authentication-results: sourceware.org; auth=none
- References: <CACysShjNGcO=Y5ZU=QDLWetw31FRZUu7ZYbvo2DyJWZ+eOZZ2Q at mail dot gmail dot com> <20131129134722 dot GN9211 at bubble dot grove dot modra dot org> <CAHACq4qbwykqOcTjuQovsqoE0d2dC4FAAtfZOxr=0XrYsViJqw at mail dot gmail dot com> <20131203100957 dot GA3306 at bubble dot grove dot modra dot org>
If you think that it is ok, I'll take a deeper look at my problem with
debugging (bfd linked is ok, gold linked is not), may be it is a
Still, it looks a bit strange that strip did the job that it was not
asked for: erasing the padding between got.plt and bss.
I also do not understand the reasons behind gold inserting this
padding in the first place; if strip is allowed with no further
consequences to delete the padding, it looks like it is a good idea
for gold to just stop inserting it to save a few bits (and plus there
is the compatibility between bfd and gold, because it seems that bfd
does not insert it) .
2013/12/3 Alan Modra <firstname.lastname@example.org>:
> On Mon, Dec 02, 2013 at 02:09:53PM -0800, Cary Coutant wrote:
>> >> As you can see the offset of .bss is changed now (it is equal now to
>> >> the offset of got.plt+size of gol.plt).
>> >> Is it criminal? I don't see anything wrong with gold inserting a
>> >> padding between .got.plt and .bss, why strip do not honor it?
>> > strip should not be doing this. Please post the pre-stripped binary,
>> > so someone can take a look, or better, open a bug report.
>> It looks like only the file offset changed, and the file offset is
>> irrelevant for a BSS section. I don't think strip is doing any harm
> Oh right. I misread the readelf fields, for some reason thinking that
> offset came first.
> Alan Modra
> Australia Development Lab, IBM