diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 18 | ||||
-rw-r--r-- | bfd/aoutx.h | 2 | ||||
-rw-r--r-- | bfd/elf32-arc.c | 12 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 6 | ||||
-rw-r--r-- | bfd/elf32-nds32.c | 2 | ||||
-rw-r--r-- | bfd/elf32-or1k.c | 4 | ||||
-rw-r--r-- | bfd/elf32-rx.c | 4 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 2 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 2 | ||||
-rw-r--r-- | bfd/mach-o.c | 2 | ||||
-rw-r--r-- | bfd/targets.c | 3 |
11 files changed, 37 insertions, 20 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fbfc4db..6d361d5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,23 @@ 2021-03-29 Alan Modra <amodra@gmail.com> + * aoutx.h (aout_link_write_symbols): Don't cast boolean expression + to bfd_boolean. + * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans + against FALSE. + * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE. + (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE". + (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise. + (is_reloc_for_PLT, is_reloc_for_TLS): Likewise. + * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise. + * elf32-nds32.c (insert_nds32_elf_blank): Likewise. + * elf32-rx.c (rx_set_section_contents): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise. + * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise. + * mach-o.c (bfd_mach_o_read_command): Likewise. + * targets.c (bfd_get_target_info): Likewise. + +2021-03-29 Alan Modra <amodra@gmail.com> + * coff-z80.c (z80_is_local_label_name): Return bfd_boolean. * elf32-z80.c (z80_is_local_label_name): Likewise. * elf32-spu.c (spu_elf_modify_headers): Likewise. diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 8025b8c..8761a6a 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -5209,7 +5209,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) /* If we have already included a header file with the same value, then replace this one with an N_EXCL symbol. */ - copy = (bfd_boolean) (! flaginfo->info->keep_memory); + copy = !flaginfo->info->keep_memory; incl_entry = aout_link_includes_lookup (&flaginfo->includes, name, TRUE, copy); if (incl_entry == NULL) diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index 32096fe..c796104 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -55,7 +55,7 @@ name_for_global_symbol (struct elf_link_hash_entry *h) Elf_Internal_Rela _rel; \ bfd_byte * _loc; \ \ - if (_htab->dynamic_sections_created == TRUE) \ + if (_htab->dynamic_sections_created) \ { \ BFD_ASSERT (_htab->srel##SECTION &&_htab->srel##SECTION->contents); \ _loc = _htab->srel##SECTION->contents \ @@ -128,13 +128,13 @@ bfd_put_32_me (bfd *abfd, bfd_vma value,unsigned char *data) static ATTRIBUTE_UNUSED bfd_boolean is_reloc_PC_relative (reloc_howto_type *howto) { - return (strstr (howto->name, "PC") != NULL) ? TRUE : FALSE; + return strstr (howto->name, "PC") != NULL; } static bfd_boolean is_reloc_SDA_relative (reloc_howto_type *howto) { - return (strstr (howto->name, "SDA") != NULL) ? TRUE : FALSE; + return strstr (howto->name, "SDA") != NULL; } static bfd_boolean @@ -142,19 +142,19 @@ is_reloc_for_GOT (reloc_howto_type * howto) { if (strstr (howto->name, "TLS") != NULL) return FALSE; - return (strstr (howto->name, "GOT") != NULL) ? TRUE : FALSE; + return strstr (howto->name, "GOT") != NULL; } static bfd_boolean is_reloc_for_PLT (reloc_howto_type * howto) { - return (strstr (howto->name, "PLT") != NULL) ? TRUE : FALSE; + return strstr (howto->name, "PLT") != NULL; } static bfd_boolean is_reloc_for_TLS (reloc_howto_type *howto) { - return (strstr (howto->name, "TLS") != NULL) ? TRUE : FALSE; + return strstr (howto->name, "TLS") != NULL; } struct arc_relocation_data diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index d70529d..7d7c3ed 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8796,9 +8796,9 @@ stm32l4xx_need_create_replacing_stub (const insn32 insn, /* DEFAULT mode accounts for the real bug condition situation, ALL mode inserts stubs for each LDM/VLDM instruction (testing). */ - return - (stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_DEFAULT) ? nb_words > 8 : - (stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_ALL) ? TRUE : FALSE; + return (stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_DEFAULT + ? nb_words > 8 + : stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_ALL); } /* Look for potentially-troublesome code sequences which might trigger diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index f6a89a7..61a52af 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -9038,7 +9038,7 @@ insert_nds32_elf_blank (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) if (!*blank_p) { *blank_p = create_nds32_elf_blank (addr, len); - return *blank_p ? TRUE : FALSE; + return *blank_p != NULL; } blank_t = search_nds32_elf_blank (*blank_p, addr); diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 5f9d26c..1804854 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -2698,7 +2698,7 @@ or1k_set_got_and_rela_sizes (const unsigned char tls_type, is_tls_entry = TRUE; } - if (is_tls_entry == FALSE) + if (!is_tls_entry) *got_size += 4; if (dynamic) @@ -2709,7 +2709,7 @@ or1k_set_got_and_rela_sizes (const unsigned char tls_type, if ((tls_type & TLS_IE) != 0) *rela_size += sizeof (Elf32_External_Rela); - if (is_tls_entry == FALSE) + if (!is_tls_entry) *rela_size += sizeof (Elf32_External_Rela); } } diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index 7b6cf9a..cd0bc00 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -3541,8 +3541,8 @@ rx_set_section_contents (bfd * abfd, file_ptr offset, bfd_size_type count) { - bfd_boolean exec = (abfd->flags & EXEC_P) ? TRUE : FALSE; - bfd_boolean s_code = (section->flags & SEC_CODE) ? TRUE : FALSE; + bfd_boolean exec = (abfd->flags & EXEC_P) != 0; + bfd_boolean s_code = (section->flags & SEC_CODE) != 0; bfd_boolean rv; char * swapped_data = NULL; bfd_size_type i; diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 3ec0983..86130b4 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -5769,7 +5769,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, relocate the text and data segments independently, so the symbol does not matter. */ symbol = 0; - relocate = globals->no_apply_dynamic_relocs ? FALSE : TRUE; + relocate = !globals->no_apply_dynamic_relocs; outrel.r_info = ELFNN_R_INFO (symbol, AARCH64_R (RELATIVE)); outrel.r_addend += value; } diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 07a233f..bd4140c 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -16395,7 +16395,7 @@ _bfd_mips_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, bfd_boolean _bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *h) { - return ELF_MIPS_IS_OPTIONAL (h->other) ? TRUE : FALSE; + return ELF_MIPS_IS_OPTIONAL (h->other) != 0; } bfd_boolean diff --git a/bfd/mach-o.c b/bfd/mach-o.c index f853783..695b158 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -4930,7 +4930,7 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, cmd = bfd_h_get_32 (abfd, raw.cmd); command->type = cmd & ~BFD_MACH_O_LC_REQ_DYLD; - command->type_required = cmd & BFD_MACH_O_LC_REQ_DYLD ? TRUE : FALSE; + command->type_required = (cmd & BFD_MACH_O_LC_REQ_DYLD) != 0; command->len = bfd_h_get_32 (abfd, raw.cmdsize); if (command->len < 8 || command->len % 4 != 0) return FALSE; diff --git a/bfd/targets.c b/bfd/targets.c index dcd4263..372a9c3 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1654,8 +1654,7 @@ bfd_get_target_info (const char *target_name, bfd *abfd, if (! target_vec) return NULL; if (is_bigendian) - *is_bigendian = ((target_vec->byteorder == BFD_ENDIAN_BIG) ? TRUE - : FALSE); + *is_bigendian = target_vec->byteorder == BFD_ENDIAN_BIG; if (underscoring) *underscoring = ((int) target_vec->symbol_leading_char) & 0xff; |