Fix numerous occurrences of
[deliverable/binutils-gdb.git] / bfd / elf32-m32r.c
index a2e9e0baafe38c380b20ae422ac8b9244a4fb9a6..8adb1e2f61103da7854764f2a649820d7c92382c 100644 (file)
@@ -847,6 +847,7 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
         section already exists a new one is created that follows it which
         screws of _SDA_BASE_ address calcs because output_offset != 0.  */
       struct elf_link_hash_entry *h;
+      struct bfd_link_hash_entry *bh;
       asection *s = bfd_get_section_by_name (abfd, ".sdata");
 
       /* The following code was cobbled from elf32-ppc.c and elflink.c.  */
@@ -863,10 +864,10 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
          bfd_set_section_alignment (abfd, s, 2);
        }
 
-      h = (struct elf_link_hash_entry *)
-       bfd_link_hash_lookup (info->hash, "_SDA_BASE_", false, false, false);
+      bh = bfd_link_hash_lookup (info->hash, "_SDA_BASE_",
+                                false, false, false);
 
-      if ((h == NULL || h->root.type == bfd_link_hash_undefined)
+      if ((bh == NULL || bh->type == bfd_link_hash_undefined)
          && !(_bfd_generic_link_add_one_symbol (info,
                                                 abfd,
                                                 "_SDA_BASE_",
@@ -876,8 +877,9 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
                                                 (const char *) NULL,
                                                 false,
                                                 get_elf_backend_data (abfd)->collect,
-                                                (struct bfd_link_hash_entry **) &h)))
+                                                &bh)))
        return false;
+      h = (struct elf_link_hash_entry *) bh;
       h->type = STT_OBJECT;
     }
 
This page took 0.02437 seconds and 4 git commands to generate.