[PATCH] objcopy --only-keep-debug vs SHT_NOTE
Nick Clifton
nickc@redhat.com
Mon May 21 17:06:00 GMT 2007
Hi Guys,
Frank Ch. Eigler wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
>
>> [...] This of course makes the situation worse, as far as
>> --only-keep-debug and --strip-debug ought to partition a file into
>> two distinct sets of sections. [...]
>
> With the collected experience actually using separate debug files, it
> may make more sense to relax this non-intersection rule rather than
> enforce it rigidly.
I agree. The intent of the --only-keep-debug option is to allow a
binary to be split into two parts, one containing all the debug
information and the other (after stripping), just containing the bits
necessary for execution. If splitting a binary in this way involves
putting more than just debug sections into the "only-debug" file, such
as note sections for comparison and synchronization purposes, then so be
it. As long as this behaviour is documented then I think that it would
be better to have objcopy behave this way. If the user truly does not
want the note sections in the debug-only file they can always strip them
out afterwards.
Cheers
Nick
More information about the Binutils
mailing list