This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On Wed, Dec 11, 2013 at 2:04 PM, Cary Coutant <> wrote:
>> I did some investigation.  I think gold is wrong.  I
>> opened:
> 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 :-(.

> concludes that the stripped and unstripped files don't match just
> because of irrelevant differences caused by (a). I think it's
> impractical to insist that gold produce the same bits in all such
> cases (keeping in mind that I'm sure we haven't found the last of
> them).

I don't think gold should generate the same layout as ld.
But for TLS segment, it makes no sense to have memsize
> filesize when there is no .tbss section.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]