[PATCH] objcopy --only-keep-debug vs SHT_NOTE
Paul Brook
paul@codesourcery.com
Sat May 19 23:49:00 GMT 2007
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
More information about the Binutils
mailing list