* libaout.h (struct aout_link_hash_entry): New field written.
authorIan Lance Taylor <ian@airs.com>
Mon, 6 Jun 1994 18:42:38 +0000 (18:42 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 6 Jun 1994 18:42:38 +0000 (18:42 +0000)
* aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
(aout_link_write_symbols): Use written, not root.written.
(aout_link_write_other_symbol): Likewise.
* sunos.c (sunos_scan_dynamic_symbol): Likewise.
* libecoff.h (struct ecoff_link_hash_entry): New field written.
* ecoff.c (ecoff_link_hash_newfunc): Initialize written.
(ecoff_link_write_external): use written, not root.written.
* genlink.h (struct generic_link_hash_entry): New field written.
* linker.c (_bfd_link_hash_newfunc): Don't initialize written.
(generic_link_hash_newfunc): Initialize written.
(_bfd_generic_link_output_symbols): Use written, not root.written.
(_bfd_generic_link_write_global_symbol): Likewise.
(_bfd_generic_reloc_link_order): Likewise.

bfd/ChangeLog
bfd/aoutx.h
bfd/linker.c

index f5eb440b40f4ed01c1e87ba558a956245795041e..2086cf02e190c121ca47932e6fc5043dadca8b5f 100644 (file)
@@ -1,5 +1,20 @@
 Mon Jun  6 10:57:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * libaout.h (struct aout_link_hash_entry): New field written.
+       * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
+       (aout_link_write_symbols): Use written, not root.written.
+       (aout_link_write_other_symbol): Likewise.
+       * sunos.c (sunos_scan_dynamic_symbol): Likewise.
+       * libecoff.h (struct ecoff_link_hash_entry): New field written.
+       * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
+       (ecoff_link_write_external): use written, not root.written.
+       * genlink.h (struct generic_link_hash_entry): New field written.
+       * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
+       (generic_link_hash_newfunc): Initialize written.
+       (_bfd_generic_link_output_symbols): Use written, not root.written.
+       (_bfd_generic_link_write_global_symbol): Likewise.
+       (_bfd_generic_reloc_link_order): Likewise.
+
        * libecoff.h (ecoff_data_type): Add linker field.
        * ecoff.c (ecoff_write_object_contents): Check new tdata linker
        field, rather than outsymbols being non-NULL, to decide whether to
index 36008293bb829f499fadd2997591ac9224371150..2af2d1962336a00e041a357f7ec7b9741e591d6c 100644 (file)
@@ -2854,8 +2854,11 @@ NAME(aout,link_hash_newfunc) (entry, table, string)
         _bfd_link_hash_newfunc ((struct bfd_hash_entry *) ret,
                                 table, string));
   if (ret)
-    /* Set local fields.  */
-    ret->indx = -1;
+    {
+      /* Set local fields.  */
+      ret->written = false;
+      ret->indx = -1;
+    }
 
   return (struct bfd_hash_entry *) ret;
 }
@@ -3726,7 +3729,7 @@ aout_link_write_symbols (finfo, input_bfd, symbol_map)
          /* If the symbol has already been written out, skip it.  */
          if (h != (struct aout_link_hash_entry *) NULL
              && h->root.type != bfd_link_hash_warning
-             && h->root.written)
+             && h->written)
            {
              if ((type & N_TYPE) == N_INDR)
                skip_indirect = true;
@@ -3756,7 +3759,7 @@ aout_link_write_symbols (finfo, input_bfd, symbol_map)
          if (skip)
            {
              if (h != (struct aout_link_hash_entry *) NULL)
-               h->root.written = true;
+               h->written = true;
              continue;
            }
 
@@ -3855,7 +3858,7 @@ aout_link_write_symbols (finfo, input_bfd, symbol_map)
             it is a local symbol see if we should discard it.  */
          if (h != (struct aout_link_hash_entry *) NULL)
            {
-             h->root.written = true;
+             h->written = true;
              h->indx = obj_aout_external_sym_count (output_bfd);
            }
          else
@@ -3965,10 +3968,10 @@ aout_link_write_other_symbol (h, data)
        }
     }
 
-  if (h->root.written)
+  if (h->written)
     return true;
 
-  h->root.written = true;
+  h->written = true;
 
   if (finfo->info->strip == strip_all
       || (finfo->info->strip == strip_some
index 2c6754b596254ce5555e44b31e663d501e43dfb1..7d5e4edfacfe05c123222f25f8e57cd9afa9c5ec 100644 (file)
@@ -469,7 +469,6 @@ _bfd_link_hash_newfunc (entry, table, string)
     {
       /* Initialize the local fields.  */
       ret->type = bfd_link_hash_new;
-      ret->written = false;
       ret->next = NULL;
     }
 
@@ -583,6 +582,7 @@ generic_link_hash_newfunc (entry, table, string)
   if (ret)
     {
       /* Set local fields.  */
+      ret->written = false;
       ret->sym = NULL;
     }
 
@@ -1930,7 +1930,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
          if (! generic_add_output_symbol (output_bfd, psymalloc, sym))
            return false;
          if (h != (struct generic_link_hash_entry *) NULL)
-           h->root.written = true;
+           h->written = true;
        }
     }
 
@@ -1949,10 +1949,10 @@ _bfd_generic_link_write_global_symbol (h, data)
     (struct generic_write_global_symbol_info *) data;
   asymbol *sym;
 
-  if (h->root.written)
+  if (h->written)
     return true;
 
-  h->root.written = true;
+  h->written = true;
 
   if (wginfo->info->strip == strip_all
       || (wginfo->info->strip == strip_some
@@ -2061,7 +2061,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
                                         link_order->u.reloc.p->u.name,
                                         false, false, true);
       if (h == (struct generic_link_hash_entry *) NULL
-         || ! h->root.written)
+         || ! h->written)
        {
          if (! ((*info->callbacks->unattached_reloc)
                 (info, link_order->u.reloc.p->u.name,