diff options
Diffstat (limited to 'bfd/elf64-hppa.c')
-rw-r--r-- | bfd/elf64-hppa.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 7fcc94f..4ff7e6a 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -517,12 +517,12 @@ get_reloc_section (abfd, hppa_info, sec) if (srel_name == NULL) return FALSE; - BFD_ASSERT ((strncmp (srel_name, ".rela", 5) == 0 + BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela") && strcmp (bfd_get_section_name (abfd, sec), - srel_name+5) == 0) - || (strncmp (srel_name, ".rel", 4) == 0 + srel_name + 5) == 0) + || (CONST_STRNEQ (srel_name, ".rel") && strcmp (bfd_get_section_name (abfd, sec), - srel_name+4) == 0)); + srel_name + 4) == 0)); dynobj = hppa_info->root.dynobj; if (!dynobj) @@ -1713,13 +1713,13 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) plt = s->size != 0; } else if (strcmp (name, ".opd") == 0 - || strncmp (name, ".dlt", 4) == 0 + || CONST_STRNEQ (name, ".dlt") || strcmp (name, ".stub") == 0 || strcmp (name, ".got") == 0) { /* Strip this section if we don't need it; see the comment below. */ } - else if (strncmp (name, ".rela", 5) == 0) + else if (CONST_STRNEQ (name, ".rela")) { if (s->size != 0) { @@ -2752,14 +2752,14 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index, static const struct bfd_elf_special_section elf64_hppa_special_sections[] = { - { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, - { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, - { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, - { ".dlt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, - { ".sdata", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, - { ".sbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, - { ".tbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_HP_TLS }, - { NULL, 0, 0, 0, 0 } + { STRING_COMMA_LEN (".fini"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { STRING_COMMA_LEN (".init"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, + { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, + { STRING_COMMA_LEN (".dlt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, + { STRING_COMMA_LEN (".sdata"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, + { STRING_COMMA_LEN (".sbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT }, + { STRING_COMMA_LEN (".tbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_HP_TLS }, + { NULL, 0, 0, 0, 0 } }; /* The hash bucket size is the standard one, namely 4. */ |