ELF: Consolidate readonly_dynrelocs
[deliverable/binutils-gdb.git] / bfd / elflink.c
index f87927f0bd8f7b71d41ff23c517d49d8895728ad..0d659c20257a663e38511d8126157509cbcd4413 100644 (file)
@@ -14793,3 +14793,20 @@ bfd_elf_define_start_stop (struct bfd_link_info *info,
     }
   return NULL;
 }
+
+/* Find dynamic relocs for H that apply to read-only sections.  */
+
+asection *
+_bfd_elf_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;
+}
This page took 0.024379 seconds and 4 git commands to generate.