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

Nick Clifton nickc@redhat.com
Mon Jan 12 13:11:00 GMT 2004


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
        



More information about the Binutils mailing list