This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Add split DWARF (Fission) support to objcopy/strip

On Fri, May 04, 2012 at 04:02:26PM -0700, Cary Coutant wrote:
> 	* doc/binutils.texi (objcopy): Add --strip-dwo, --extract-dwo options.
> 	(strip): Add --strip-dwo option.
> 	* objcopy.c (enum strip_action): Add STRIP_DWO, STRIP_NONDWO.
> 	(enum command_line_switch): Add OPTION_EXTRACT_DWO, OPTION_STRIP_DWO.
> 	(strip_options): Add --strip-dwo option.
> 	(copy_options): Add --extract-dwo, --strip-dwo options.
> 	(copy_usage): Likewise.
> 	(strip_usage): Add --strip-dwo option.
> 	(is_dwo_section): New function.
> 	(is_strip_section_1): Check for DWO sections.
> 	(copy_object): Check for --strip-dwo, --extract-dwo options.
> 	(copy_relocations_in_section): Discard relocations for DWO sections.
> 	Discard entire relocation section when no relocations.
> 	(strip_main): Add --strip-dwo option.
> 	(copy_main): Add --strip-dwo, --extract-dwo options.

OK, except

> -  /* Core files do not need to be relocated.  */
> -  if (bfd_get_format (obfd) == bfd_core)
> +  /* Core files and DWO files do not need to be relocated.  */
> +  if (bfd_get_format (obfd) == bfd_core || strip_symbols == STRIP_NONDWO)

Do DWO sections have relocs?  If not then this would seem to be
redundant given the changes to is_strip_section.

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]