This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] objcopy --only-keep-debug vs SHT_NOTE
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Roland McGrath <roland at redhat dot com>
- Date: Sun, 20 May 2007 00:49:39 +0100
- Subject: Re: [PATCH] objcopy --only-keep-debug vs SHT_NOTE
- References: <20070519232441.4302D1F850B@magilla.localdomain>
On Sunday 20 May 2007, Roland McGrath wrote:
> This patch changes objcopy --only-keep-debug in two ways. First, it
> preserves the sh_type of saved sections not being otherwise molested.
> This, for example, makes unallocated note sections preserved in .debug
> files keep their SHT_NOTE type instead of being reset to SHT_PROGBITS.
>
> Second, it does not discard allocated SHT_NOTE sections. (I am also
> making this change in elfutils strip.) The idea here is that some
> SHT_NOTE sections might be used to embed identifying information in
> stripped binaries, and by copying these sections into the .debug file
> as well, they can be compared and used for matching things up. (This
> is part of a particular nascent plan using notes, but it seems like a
> straightforward and harmless change regardless.)
>
> Ok to commit?
You also need to update the documentation to make it clear that this option no
longer does what it says on the tin.
Paul