aboutsummaryrefslogtreecommitdiffstats
path: root/packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
downloadopenembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.gz
openembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.bz2
openembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.zip
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch')
-rw-r--r--packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch b/packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch
index e69de29bb2..1ccfd3a38c 100644
--- a/packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch
+++ b/packages/binutils/binutils-2.14.90.0.7/600-arm-textrel.patch
@@ -0,0 +1,67 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- binutils-2.14.90.0.7/bfd/elf32-arm.h~600-arm-textrel 2004-09-08 12:55:41.000000000 -0500
++++ binutils-2.14.90.0.7/bfd/elf32-arm.h 2004-09-08 12:57:37.000000000 -0500
+@@ -54,6 +54,8 @@
+ static int elf32_thumb_to_arm_stub
+ PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *,
+ bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma));
++static bfd_boolean elf32_arm_readonly_dynrelocs
++ PARAMS ((struct elf_link_hash_entry *, PTR));
+ static bfd_boolean elf32_arm_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+@@ -3139,6 +3141,37 @@
+ return TRUE;
+ }
+
++/* Find any dynamic relocs that apply to read-only sections. */
++
++static bfd_boolean
++elf32_arm_readonly_dynrelocs (h, inf)
++ struct elf_link_hash_entry *h;
++ PTR inf;
++{
++ struct elf32_arm_link_hash_entry *eh;
++ struct elf32_arm_relocs_copied *p;
++
++ if (h->root.type == bfd_link_hash_warning)
++ h = (struct elf_link_hash_entry *) h->root.u.i.link;
++
++ eh = (struct elf32_arm_link_hash_entry *) h;
++ for (p = eh->relocs_copied; p != NULL; p = p->next)
++ {
++ asection *s = p->section;
++
++ if (s != NULL && (s->flags & SEC_READONLY) != 0)
++ {
++ struct bfd_link_info *info = (struct bfd_link_info *) inf;
++
++ info->flags |= DF_TEXTREL;
++
++ /* Not an error, just cut short the traversal. */
++ return FALSE;
++ }
++ }
++ return TRUE;
++}
++
+ /* Set the sizes of the dynamic sections. */
+
+ static bfd_boolean
+@@ -3297,6 +3330,12 @@
+ return FALSE;
+ }
+
++ /* If any dynamic relocs apply to a read-only section,
++ then we need a DT_TEXTREL entry. */
++ if ((info->flags & DF_TEXTREL) == 0)
++ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
++ (PTR) info);
++
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))