From 6b6bc957dd8c070845cda722223573c6bc363a10 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 3 Nov 2010 02:31:02 +0000 Subject: [PATCH] Don't display bits only used for BFD in abfd->flags. bfd/ 2010-11-02 H.J. Lu * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New. * bfd-in2.h: Regenerated. binutils/ 2010-11-02 H.J. Lu * objdump.c (dump_bfd_header): Don't display BFD_FLAGS_FOR_BFD_USE_MASK bits in abfd->flags. --- bfd/ChangeLog | 5 +++++ bfd/bfd-in2.h | 5 +++++ bfd/bfd.c | 5 +++++ binutils/ChangeLog | 5 +++++ binutils/objdump.c | 2 +- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3538ef5..24d096b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-11-02 H.J. Lu + + * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New. + * bfd-in2.h: Regenerated. + 2010-11-02 Joseph Myers * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index aec5c24..c6a54b5 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -5081,6 +5081,11 @@ struct bfd #define BFD_FLAGS_SAVED \ (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS) + /* Flags bits which are for BFD use only. */ +#define BFD_FLAGS_FOR_BFD_USE_MASK \ + (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ + | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT) + /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of origin, with origin set to 0 for non archive files. */ diff --git a/bfd/bfd.c b/bfd/bfd.c index 3b29603..a9ce7cc 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -161,6 +161,11 @@ CODE_FRAGMENT .#define BFD_FLAGS_SAVED \ . (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS) . +. {* Flags bits which are for BFD use only. *} +.#define BFD_FLAGS_FOR_BFD_USE_MASK \ +. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ +. | BFD_TRADITIONAL_FORMAT | BFD_DETERMINISTIC_OUTPUT) +. . {* Currently my_archive is tested before adding origin to . anything. I believe that this can become always an add of . origin, with origin set to 0 for non archive files. *} diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8acf57e..3ecc5fb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2010-11-02 H.J. Lu + + * objdump.c (dump_bfd_header): Don't display + BFD_FLAGS_FOR_BFD_USE_MASK bits in abfd->flags. + 2010-11-02 Joseph Myers * readelf.c (display_tic6x_attribute): Handle more attributes. diff --git a/binutils/objdump.c b/binutils/objdump.c index 5f996e6..c672f15 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -2562,7 +2562,7 @@ dump_bfd_header (bfd *abfd) printf (_("architecture: %s, "), bfd_printable_arch_mach (bfd_get_arch (abfd), bfd_get_mach (abfd))); - printf (_("flags 0x%08x:\n"), abfd->flags); + printf (_("flags 0x%08x:\n"), abfd->flags & ~BFD_FLAGS_FOR_BFD_USE_MASK); #define PF(x, y) if (abfd->flags & x) {printf("%s%s", comma, y); comma=", ";} PF (HAS_RELOC, "HAS_RELOC"); -- 2.7.4