1 http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
2 --- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
3 +++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
8 +/* Find any dynamic relocs that apply to read-only sections. */
11 +elf32_arm_readonly_dynrelocs (h, inf)
12 + struct elf_link_hash_entry *h;
15 + struct elf32_arm_link_hash_entry *eh;
16 + struct elf32_arm_relocs_copied *p;
18 + if (h->root.type == bfd_link_hash_warning)
19 + h = (struct elf_link_hash_entry *) h->root.u.i.link;
21 + eh = (struct elf32_arm_link_hash_entry *) h;
22 + for (p = eh->relocs_copied; p != NULL; p = p->next)
24 + asection *s = p->section;
26 + if (s != NULL && (s->flags & SEC_READONLY) != 0)
28 + struct bfd_link_info *info = (struct bfd_link_info *) inf;
30 + info->flags |= DF_TEXTREL;
32 + /* Not an error, just cut short the traversal. */
39 /* Set the sizes of the dynamic sections. */
42 @@ -3740,6 +3773,12 @@
46 + /* If any dynamic relocs apply to a read-only section,
47 + then we need a DT_TEXTREL entry. */
48 + if ((info->flags & DF_TEXTREL) == 0)
49 + elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
52 if ((info->flags & DF_TEXTREL) != 0)
54 if (!add_dynamic_entry (DT_TEXTREL, 0))