[gold, strip] Question about the changed offset when stripping

Cary Coutant ccoutant@google.com
Mon Dec 2 22:10:00 GMT 2013


>>  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
here. While it would be nice for it to preserve as much as possible
from the input file (cf. the recent discussion about the PF_W flag on
PF_GNU_RELRO segments), I suspect the structure of BFD strip would
make it difficult in this case.

-cary



More information about the Binutils mailing list