]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
authorAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 09:01:44 +0000 (09:01 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 09:01:44 +0000 (09:01 +0000)
ld/ChangeLog
ld/pe-dll.c

index 06c143532cd1143dc568306e4204b33585d1056c..30f40874e7aafb30ec96da092dd4814389f75a79 100644 (file)
@@ -1,5 +1,7 @@
 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
 
+       * pe-dll.c (make_import_fixup_mark): Avoid type-punned pointer.
+
        * ldgram.y (memory_spec): Provide empty action.
        (section <NAME>): Likewise.
 
index fd70c781b55e4ced87fc996568995e565eec400a..648556789ca1ef8638e880e38477365c110fb14b 100644 (file)
@@ -1974,7 +1974,7 @@ make_import_fixup_mark (rel)
   struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
 
   bfd *abfd = bfd_asymbol_bfd (sym);
-  struct coff_link_hash_entry *myh = NULL;
+  struct bfd_link_hash_entry *bh;
 
   if (!fixup_name)
     {
@@ -1996,15 +1996,20 @@ make_import_fixup_mark (rel)
 
   sprintf (fixup_name, "__fu%d_%s", counter++, sym->name);
 
+  bh = NULL;
   bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
                                current_sec, /* sym->section, */
-                               rel->address, NULL, true, false,
-                               (struct bfd_link_hash_entry **) &myh);
+                               rel->address, NULL, true, false, &bh);
+
+  if (0)
+    {
+      struct coff_link_hash_entry *myh;
+
+      myh = (struct coff_link_hash_entry *) bh;
+      printf ("type:%d\n", myh->type);
+      printf ("%s\n", myh->root.u.def.section->name);
+    }
 
-#if 0
-  printf ("type:%d\n", myh->type);
-  printf ("%s\n", myh->root.u.def.section->name);
-#endif
   return fixup_name;
 }