2001-01-02 Kazu Hirata <kazu@hxi.com>
[binutils-gdb.git] / bfd / stabs.c
index ea4da8fccc961f3c55f858553d0f2f8fd6ea1595..eb9ce8a86788a5967aa2db406dcfc7ec6f593398 100644 (file)
@@ -108,7 +108,7 @@ struct stab_section_info
      as the input offsets, because no stabs have been deleted from
      this section.  Otherwise the i'th entry is the number of
      bytes of stabs that have been deleted prior to the i'th
-     stab. */
+     stab.  */
   bfd_size_type *cumulative_skips;
 
   /* This is an array of string indices.  For each stab symbol, we
@@ -230,6 +230,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
       sinfo->strings = _bfd_stringtab_init ();
       if (sinfo->strings == NULL)
        goto error_return;
+      /* Make sure the first byte is zero.  */
+      (void) _bfd_stringtab_add (sinfo->strings, "", true, true);
       if (! bfd_hash_table_init_n (&sinfo->includes.root,
                                   stab_link_includes_newfunc,
                                   251))
@@ -462,7 +464,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
   sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings);
 
   /* Calculate the `cumulative_skips' array now that stabs have been
-     deleted for this section. */
+     deleted for this section.  */
 
   if (skip != 0)
     {