daily update
[deliverable/binutils-gdb.git] / bfd / stabs.c
index eb610872330a7da333c45bc4823e23c47cc12395..4f48e8e8effc2206232f6c0ab8ca9042cd85d482 100644 (file)
@@ -1,6 +1,6 @@
 /* Stabs in sections linking support.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-   Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+   2006 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -187,6 +187,8 @@ _bfd_link_section_stabs (bfd *abfd,
 
   if (sinfo->stabstr == NULL)
     {
+      flagword flags;
+
       /* Initialize the stabs information we need to keep track of.  */
       first = TRUE;
       sinfo->strings = _bfd_stringtab_init ();
@@ -194,15 +196,16 @@ _bfd_link_section_stabs (bfd *abfd,
        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,
-                                  stab_link_includes_newfunc,
-                                  251))
+      if (! bfd_hash_table_init (&sinfo->includes,
+                                stab_link_includes_newfunc,
+                                sizeof (struct stab_link_includes_entry)))
        goto error_return;
-      sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
+      flags = (SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING
+              | SEC_LINKER_CREATED);
+      sinfo->stabstr = bfd_make_section_anyway_with_flags (abfd, ".stabstr",
+                                                          flags);
       if (sinfo->stabstr == NULL)
        goto error_return;
-      sinfo->stabstr->flags |= (SEC_HAS_CONTENTS | SEC_READONLY
-                               | SEC_DEBUGGING | SEC_LINKER_CREATED);
     }
 
   /* Initialize the information we are going to store for this .stab
This page took 0.029544 seconds and 4 git commands to generate.