Re: [PATCH] Fix Gold/strip discrepancies for PR 11786

Cary Coutant
2013-11-04T22:38:47Z

>> while elfutils strip left Program Headers intact. So reviewed the patch below
>> and I am fine with it that way but I do not think it is the right solution to
>> your problem.
>
> What would be the right solution? [keeping in mind that I need this to
> work with existing tools]
> I can imagine multiple "solutions" are in fact needed.

I agree. In general, I think producers should be strict, and consumers
should be lenient. That means that strip should leave the segment
attributes the same as they were in the input, but it also means that
GDB shouldn't care about fields that make no difference in whether two
binaries are in fact equivalent. As far as strip goes, it's nice to
hear that eu-strip does it right, but binutils strip, being BFD based,
may not be so easy to fix.

-cary