hash table iterator callback functions int vs. bfd_boolean
[deliverable/binutils-gdb.git] / bfd / elfnn-ia64.c
index 87a86e938f69a244fe129434e1f12416a26f344f..04bf7d7f25ad4588977c635dbe170e63a572b09b 100644 (file)
@@ -893,9 +893,9 @@ is_unwind_section_name (bfd *abfd, const char *name)
       && !strcmp (name, ELF_STRING_ia64_unwind_hdr))
     return FALSE;
 
-  return ((CONST_STRNEQ (name, ELF_STRING_ia64_unwind)
-          && ! CONST_STRNEQ (name, ELF_STRING_ia64_unwind_info))
-         || CONST_STRNEQ (name, ELF_STRING_ia64_unwind_once));
+  return ((startswith (name, ELF_STRING_ia64_unwind)
+          && ! startswith (name, ELF_STRING_ia64_unwind_info))
+         || startswith (name, ELF_STRING_ia64_unwind_once));
 }
 
 /* Handle an IA-64 specific section when reading an object file.  This
@@ -1408,7 +1408,7 @@ elfNN_ia64_global_dyn_info_free (void **xentry,
 
 /* Free the local elfNN_ia64_dyn_sym_info array.  */
 
-static bfd_boolean
+static int
 elfNN_ia64_local_dyn_info_free (void **slot,
                                void * unused ATTRIBUTE_UNUSED)
 {
@@ -1507,7 +1507,7 @@ elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry,
   return TRUE;
 }
 
-static bfd_boolean
+static int
 elfNN_ia64_local_dyn_sym_thunk (void **slot, void * xdata)
 {
   struct elfNN_ia64_local_hash_entry *entry
@@ -2200,9 +2200,6 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
       else
        h = NULL;
 
-      if (h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
-       continue;
-
       /* We can only get preliminary data on whether a symbol is
         locally or externally defined, as not all of the input files
         have yet been processed.  Do something with what we know, as
@@ -2377,9 +2374,6 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
       else
        h = NULL;
 
-      if (h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
-       continue;
-
       /* We can only get preliminary data on whether a symbol is
         locally or externally defined, as not all of the input files
         have yet been processed.  Do something with what we know, as
@@ -2732,8 +2726,7 @@ allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data)
 
       if (!bfd_link_executable (x->info)
          && (!h
-             || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-                 && !UNDEFWEAK_NO_DYNAMIC_RELOC (x->info, h))
+             || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
              || (h->root.type != bfd_link_hash_undefweak
                  && h->root.type != bfd_link_hash_undefined)))
        {
@@ -2862,8 +2855,8 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i,
 
   shared = bfd_link_pic (x->info);
   resolved_zero = (dyn_i->h
-                  && UNDEFWEAK_NO_DYNAMIC_RELOC (x->info,
-                                                      dyn_i->h));
+                  && ELF_ST_VISIBILITY (dyn_i->h->other)
+                  && dyn_i->h->root.type == bfd_link_hash_undefweak);
 
   /* Take care of the GOT and PLT relocations.  */
 
@@ -3168,7 +3161,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
          if (strcmp (name, ".got.plt") == 0)
            strip = FALSE;
-         else if (CONST_STRNEQ (name, ".rel"))
+         else if (startswith (name, ".rel"))
            {
              if (!strip)
                {
@@ -3307,8 +3300,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info,
       /* Install a dynamic relocation if needed.  */
       if (((bfd_link_pic (info)
            && (!dyn_i->h
-               || (ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
-                   && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, dyn_i->h))
+               || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
                || dyn_i->h->root.type != bfd_link_hash_undefweak)
            && dyn_r_type != R_IA64_DTPREL32LSB
            && dyn_r_type != R_IA64_DTPREL64LSB)
@@ -3472,8 +3464,7 @@ set_pltoff_entry (bfd *abfd, struct bfd_link_info *info,
       if (!is_plt
          && bfd_link_pic (info)
          && (!dyn_i->h
-             || (ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
-                 && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, dyn_i->h))
+             || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
              || dyn_i->h->root.type != bfd_link_hash_undefweak))
        {
          unsigned int dyn_r_type;
@@ -3766,7 +3757,7 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info)
   return TRUE;
 }
 
-static bfd_boolean
+static int
 elfNN_ia64_relocate_section (bfd *output_bfd,
                             struct bfd_link_info *info,
                             bfd *input_bfd,
@@ -3940,7 +3931,6 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
        case R_IA64_DIR64LSB:
          /* Install a dynamic relocation for this reloc.  */
          if ((dynamic_symbol_p || bfd_link_pic (info))
-             && !(h && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
              && r_symndx != STN_UNDEF
              && (input_section->flags & SEC_ALLOC) != 0)
            {
@@ -4869,7 +4859,7 @@ elfNN_ia64_object_p (bfd *abfd)
       if (elf_sec_group (sec) == NULL
          && ((sec->flags & (SEC_LINK_ONCE | SEC_CODE | SEC_GROUP))
              == (SEC_LINK_ONCE | SEC_CODE))
-         && CONST_STRNEQ (sec->name, ".gnu.linkonce.t."))
+         && startswith (sec->name, ".gnu.linkonce.t."))
        {
          name = sec->name + 16;
 
This page took 0.024686 seconds and 4 git commands to generate.