This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- From: Cary Coutant <ccoutant at google dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 4 Nov 2013 14:38:37 -0800
- Subject: Re: [PATCH] Fix Gold/strip discrepancies for PR 11786
- Authentication-results: sourceware.org; auth=none
- References: <yjt24n85x78h dot fsf at ruffy dot mtv dot corp dot google dot com> <20131031154957 dot GA11260 at host2 dot jankratochvil dot net> <CADPb22QKBpYpmmZzeKJy7JWukpfkTQcYZDm+KeEkr6K_92LJ2A at mail dot gmail dot com>
>> 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.