patches/binutils/2.15/140-arm-textrel.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 17 12:47:53 2008 +0000 (2008-10-17)
changeset 943 1cca90ce0481
parent 1 eeea35fbf182
permissions -rw-r--r--
Update the kconfig stuff to match the one in the linux-2.6.27 version.

/trunk/kconfig/zconf.hash.c | 225 110 115 0 +++----
/trunk/kconfig/lkc_proto.h | 4 3 1 0 +
/trunk/kconfig/mconf.c | 217 110 107 0 +++---
/trunk/kconfig/menu.c | 86 60 26 0 ++-
/trunk/kconfig/symbol.c | 212 156 56 0 ++++--
/trunk/kconfig/kconfig.mk | 24 9 15 0 -
/trunk/kconfig/lex.zconf.c | 97 80 17 0 ++-
/trunk/kconfig/util.c | 38 30 8 0 +
/trunk/kconfig/lkc.h | 22 18 4 0 +
/trunk/kconfig/expr.c | 32 19 13 0 +
/trunk/kconfig/confdata.c | 254 172 82 0 +++++---
/trunk/kconfig/lxdialog/dialog.h | 12 9 3 0 +
/trunk/kconfig/lxdialog/inputbox.c | 6 3 3 0
/trunk/kconfig/lxdialog/checklist.c | 4 2 2 0
/trunk/kconfig/lxdialog/menubox.c | 6 3 3 0
/trunk/kconfig/lxdialog/textbox.c | 2 1 1 0
/trunk/kconfig/lxdialog/util.c | 47 30 17 0 +
/trunk/kconfig/lxdialog/yesno.c | 4 2 2 0
/trunk/kconfig/expr.h | 20 10 10 0
/trunk/kconfig/zconf.tab.c | 1441 793 648 0 ++++++++++++++++++++++++-------------------
/trunk/kconfig/conf.c | 276 124 152 0 ++++----
/trunk/kconfig/check-gettext.sh | 14 14 0 0 +
/trunk/ct-ng.in | 2 1 1 0
23 files changed, 1759 insertions(+), 1286 deletions(-)
     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
     4 @@ -87,6 +87,8 @@
     5  #endif
     6  static bfd_boolean allocate_dynrelocs 
     7    PARAMS ((struct elf_link_hash_entry *h, PTR inf));
     8 +static bfd_boolean elf32_arm_readonly_dynrelocs
     9 +  PARAMS ((struct elf_link_hash_entry *, PTR));
    10  static bfd_boolean create_got_section 
    11    PARAMS ((bfd * dynobj, struct bfd_link_info * info));
    12  static bfd_boolean elf32_arm_create_dynamic_sections 
    13 @@ -3531,6 +3533,37 @@
    14    return TRUE;
    15  }
    16  
    17 +/* Find any dynamic relocs that apply to read-only sections.  */
    18 +
    19 +static bfd_boolean
    20 +elf32_arm_readonly_dynrelocs (h, inf)
    21 +     struct elf_link_hash_entry *h;
    22 +     PTR inf;
    23 +{
    24 +  struct elf32_arm_link_hash_entry *eh;
    25 +  struct elf32_arm_relocs_copied *p;
    26 +
    27 +  if (h->root.type == bfd_link_hash_warning)
    28 +    h = (struct elf_link_hash_entry *) h->root.u.i.link;
    29 +
    30 +  eh = (struct elf32_arm_link_hash_entry *) h;
    31 +  for (p = eh->relocs_copied; p != NULL; p = p->next)
    32 +    {
    33 +      asection *s = p->section;
    34 +
    35 +      if (s != NULL && (s->flags & SEC_READONLY) != 0)
    36 +       {
    37 +         struct bfd_link_info *info = (struct bfd_link_info *) inf;
    38 +
    39 +         info->flags |= DF_TEXTREL;
    40 +
    41 +         /* Not an error, just cut short the traversal.  */
    42 +         return FALSE;
    43 +       }
    44 +    }
    45 +  return TRUE;
    46 +}
    47 +
    48  /* Set the sizes of the dynamic sections.  */
    49  
    50  static bfd_boolean
    51 @@ -3740,6 +3773,12 @@
    52  	    return FALSE;
    53  	}
    54  
    55 +      /* If any dynamic relocs apply to a read-only section,
    56 +         then we need a DT_TEXTREL entry.  */
    57 +      if ((info->flags & DF_TEXTREL) == 0)
    58 +        elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
    59 +                                (PTR) info);
    60 +
    61        if ((info->flags & DF_TEXTREL) != 0)
    62  	{
    63  	  if (!add_dynamic_entry (DT_TEXTREL, 0))