diff options
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r-- | bfd/elf32-sh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index a410901..19ee8b6 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -3042,7 +3042,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Strip this section if we don't need it; see the comment below. */ } - else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0) + else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela")) { if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2) relocs = TRUE; @@ -3585,7 +3585,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (name == NULL) return FALSE; - BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + BFD_ASSERT (CONST_STRNEQ (name, ".rela") && strcmp (bfd_get_section_name (input_bfd, input_section), name + 5) == 0); @@ -4311,7 +4311,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (name == NULL) return FALSE; - BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + BFD_ASSERT (CONST_STRNEQ (name, ".rela") && strcmp (bfd_get_section_name (input_bfd, input_section), name + 5) == 0); @@ -5200,7 +5200,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, if (name == NULL) return FALSE; - BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + BFD_ASSERT (CONST_STRNEQ (name, ".rela") && strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0); |