This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Add --only-keep-debug-and-symbols option to objcopy
- From: Nick Clifton <nickc at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, drepper at redhat dot com
- Date: Mon, 12 Jan 2004 13:11:26 +0000
- Subject: Re: [PATCH] Add --only-keep-debug-and-symbols option to objcopy
- References: <20040109133731.GI6413@sunsite.ms.mff.cuni.cz>
Hi Jakub,
> 2004-01-09 Jakub Jelinek <jakub@redhat.com>
>
> * objcopy.c: Include elf-bfd.h.
> (enum strip_action): Add STRIP_NONDEBUGSYM.
> (enum command_line_switch): Add OPTION_ONLY_KEEP_DEBUG_SYMS.
> (strip_options, copy_options): Add --only-keep-debug-and-symbols
> option.
> (copy_usage, strip_usage): Likewise.
> (is_strip_section): Don't strip debugging sections if
> STRIP_NONDEBUGSYM.
> (copy_object): Handle STRIP_NONDEBUGSYM like STRIP_NONDEBUG.
> (setup_section): If STRIP_NONDEBUGSYM make SEC_ALLOC sections
> ~(SEC_LOAD | SEC_HAS_CONTENTS) and on ELF targets also SHT_NOBITS.
> Don't copy private data if STRIP_NONDEBUGSYM.
> (strip_main, copy_main): Handle OPTION_ONLY_KEEP_DEBUG_SYMS.
>
> * objcopy.c (copy_section): Free relpp if relcount == 0.
Approved - please apply - but please also add some documentation of
the new switch to binutils/doc/binutils.texi and a mention of the new
feature to the binutils/NEWS file.
Cheers
Nick