ELF: Consolidate readonly_dynrelocs
[deliverable/binutils-gdb.git] / bfd / elf32-arm.c
index f31eb8c9c70ed09a06ba4783e80d89b04c79632f..69d3ba16eebb1d7f413452267e128c10ab399cea 100644 (file)
@@ -16089,23 +16089,6 @@ elf32_arm_find_inliner_info (bfd *         abfd,
   return found;
 }
 
-/* Find dynamic relocs for H that apply to read-only sections.  */
-
-static asection *
-readonly_dynrelocs (struct elf_link_hash_entry *h)
-{
-  struct elf_dyn_relocs *p;
-
-  for (p = h->dyn_relocs; p != NULL; p = p->next)
-    {
-      asection *s = p->sec->output_section;
-
-      if (s != NULL && (s->flags & SEC_READONLY) != 0)
-       return p->sec;
-    }
-  return NULL;
-}
-
 /* Adjust a symbol defined by a dynamic object and referenced by a
    regular object.  The current definition is in some section of the
    dynamic object, but we're not including those sections.  We have to
@@ -16730,7 +16713,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  sec = readonly_dynrelocs (h);
+  sec = _bfd_elf_readonly_dynrelocs (h);
   if (sec != NULL)
     {
       struct bfd_link_info *info = (struct bfd_link_info *) info_p;
This page took 0.026425 seconds and 4 git commands to generate.