From cd6faa73f8e3b888ee8b73a733382a5587aca202 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 9 Apr 2015 10:56:28 -0700 Subject: Properly check --compress-debug-sections=XXX We can't check if input is ELF in copy_file since some targets may only set xvec after bfd_check_format_matches is called. This patch moves this check to copy_object. bfd/ * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to object_flags. (TARGET_LITTLE_SYM): Likewise. binutils/ * objcopy.c (do_debug_sections): Use bit patterns. (copy_object): Return FALSE for compress_zlib, compress_gnu_zlib and compress_gabi_zlib on non-ELF input. (copy_file): Don't check non-ELF input here. --- bfd/ChangeLog | 6 ++++++ bfd/elfxx-target.h | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9e91490..47e5024 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2015-04-09 H.J. Lu + + * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to + object_flags. + (TARGET_LITTLE_SYM): Likewise. + 2015-04-09 Max Filippov * elf32-xtensa.c (splay-tree.h): include header. diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index 5623662..0085d6c 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -835,7 +835,8 @@ const bfd_target TARGET_BIG_SYM = /* object_flags: mask of all file flags */ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS - | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS), + | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS + | BFD_COMPRESS_GABI), /* section_flags: mask of all section flags */ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY @@ -933,7 +934,8 @@ const bfd_target TARGET_LITTLE_SYM = /* object_flags: mask of all file flags */ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS - | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS), + | DYNAMIC | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS + | BFD_COMPRESS_GABI), /* section_flags: mask of all section flags */ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY -- cgit v1.1