[PATCH] Add --only-keep-debug-and-symbols option to objcopy

Daniel Jacobowitz drow@mvista.com
Mon Jan 12 22:06:00 GMT 2004


On Mon, Jan 12, 2004 at 01:11:54PM +0000, Nick Clifton wrote:
> 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.

OK, but with this what use do you see for --only-keep-debug?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list