* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
authorAlan Modra <amodra@gmail.com>
Tue, 14 Jun 2011 04:03:23 +0000 (04:03 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 14 Jun 2011 04:03:23 +0000 (04:03 +0000)
(allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
Don't handle warning symbols here.
* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
(allocate_dynrelocs, readonly_dynrelocs): As above.

bfd/ChangeLog
bfd/elf32-tilepro.c
bfd/elfxx-tilegx.c

index 74e161939ad49432d499befd91e92932b8fe2b43..50ea6fd015461f2477038c8be2b1582017078fa7 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-14  Alan Modra  <amodra@gmail.com>
+
+       * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
+       (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
+       Don't handle warning symbols here.
+       * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
+       (allocate_dynrelocs, readonly_dynrelocs): As above.
+
 2011-06-14  Alan Modra  <amodra@gmail.com>
 
        PR ld/12851
index 154db7596e04c3d68ff2e9f4011fffcb35d9d299..f2aed9cf1e15af0bb8cac652cecd12079fc7980d 100644 (file)
@@ -1969,7 +1969,7 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
    dynamic relocs.  */
 
 static bfd_boolean
-allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct bfd_link_info *info;
   struct tilepro_elf_link_hash_table *htab;
@@ -1979,12 +1979,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = tilepro_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2170,14 +2164,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
 /* Find any dynamic relocs that apply to read-only sections.  */
 
 static bfd_boolean
-readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct tilepro_elf_link_hash_entry *eh;
   struct tilepro_elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct tilepro_elf_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
@@ -2313,7 +2304,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd,
 
   /* Allocate global sym .plt and .got entries, and space for global
      sym dynamic relocs.  */
-  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
 
   if (elf_hash_table (info)->dynamic_sections_created)
     {
@@ -2436,8 +2427,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd,
       /* 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->elf, readonly_dynrelocs,
-                               (PTR) info);
+       elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
 
       if (info->flags & DF_TEXTREL)
        {
index 3ec2d3fa0c589f2183c811f5267b828f6fd68636..c484562da922e8eac44fca3dadc13e697bb1e23d 100644 (file)
@@ -2290,7 +2290,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
    dynamic relocs.  */
 
 static bfd_boolean
-allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct bfd_link_info *info;
   struct tilegx_elf_link_hash_table *htab;
@@ -2300,12 +2300,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
   if (h->root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    /* When warning symbols are created, they **replace** the "real"
-       entry in the hash table, thus we never get to see the real
-       symbol in a hash traversal.  So look at it now.  */
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   info = (struct bfd_link_info *) inf;
   htab = tilegx_elf_hash_table (info);
   BFD_ASSERT (htab != NULL);
@@ -2490,14 +2484,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
 /* Find any dynamic relocs that apply to read-only sections.  */
 
 static bfd_boolean
-readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct tilegx_elf_link_hash_entry *eh;
   struct tilegx_elf_dyn_relocs *p;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
   eh = (struct tilegx_elf_link_hash_entry *) h;
   for (p = eh->dyn_relocs; p != NULL; p = p->next)
     {
@@ -2627,7 +2618,7 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 
   /* Allocate global sym .plt and .got entries, and space for global
      sym dynamic relocs.  */
-  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+  elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
 
   if (elf_hash_table (info)->dynamic_sections_created)
     {
@@ -2750,8 +2741,7 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
       /* 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->elf, readonly_dynrelocs,
-                               (PTR) info);
+       elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
 
       if (info->flags & DF_TEXTREL)
        {
This page took 0.031313 seconds and 4 git commands to generate.