This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold, strip] Question about the changed offset when stripping
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Alexander Ivchenko <aivchenk at gmail dot com>, binutils <binutils at sourceware dot org>
- Date: Thu, 12 Dec 2013 05:54:00 -0800
- 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> <CACysShi4sKtg_R6RAhGmgKs0qRuvbsU3fLpC-Hz27YMy-sGtrA at mail dot gmail dot com> <20131203112323 dot GC3306 at bubble dot grove dot modra dot org> <CACysShiAr=iLP2Ju2dWsubV5USXxDhQitmydvRfC2=b07Fp7hA at mail dot gmail dot com> <CACysShiCkBdFOx233aBu02esXboe0dBTgf92grxUoEWRbNgUDQ at mail dot gmail dot com> <CAKOQZ8z9yGYXmdL3ieAFp_OpQcca7vNC4Db3VuA-PV+Sku_o=Q at mail dot gmail dot com> <CAMe9rOpNnPH+mz4NiuuFVL1U+YOQhkxrUk7q_Lo4pp7o0p1jeg at mail dot gmail dot com> <CAHACq4rq4eZK4UMrA_xAwB1VV_7wGcqOF_wbfQHaFCnQVt0+8w at mail dot gmail dot com> <CAMe9rOqoG6Chdp+485oLCTnYR-_vCRPX4MWMZBRC4u4Pk_QuqQ at mail dot gmail dot com>
On Wed, Dec 11, 2013 at 2:28 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Dec 11, 2013 at 2:04 PM, Cary Coutant <ccoutant@google.com> wrote:
>>> I did some investigation. I think gold is wrong. I
>>> opened:
>>>
>>> https://www.sourceware.org/bugzilla/show_bug.cgi?id=16321
>>> https://www.sourceware.org/bugzilla/show_bug.cgi?id=16320
>>
>> If, by "wrong", you mean "different from Gnu ld", then sure. But I
>> don't think it's doing anything wrong in either case. The file offset
>> for a BSS section is completely meaningless, so whether we plug in the
>> next available value before or after aligning it is irrelevant. For
>
> That is true. It makes no difference if 0 or -1 is used.
>
>> the TLS segment, including the padding in memsz but not in filesz is
>> also irrelevant, and should be harmless, although I'll admit that it
>
> It may be harmless, but it is waste of address space.
>
>> might be worth fixing that just for consistency's sake.
>>
>> In my opinion, the real problems are: (a) strip basically re-draws the
>> file, and since it uses the same underlying framework as Gnu ld, it
>> produces the same output that Gnu ld would have produced; and (b) GDB
>
> Not always. I personally fixed a couple strip bugs :-(.
I opened:
https://sourceware.org/bugzilla/show_bug.cgi?id=16323
strip changes PL_LOAD segment generated by gold.
--
H.J.
- References:
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping
- Re: [gold, strip] Question about the changed offset when stripping