This is the mail archive of the binutils@sourceware.org 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: [PATCH] objcopy --only-keep-debug vs SHT_NOTE


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



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