2004-02-07 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / gdb / objfiles.c
index 6102091a0fd625cf2186ec90b1f46e9d8efa1c3e..1500c19725498c5613ba5235f8f2a1e4da364e8f 100644 (file)
@@ -167,9 +167,6 @@ allocate_objfile (bfd *abfd, int flags)
       objfile->macro_cache = bcache_xmalloc ();
       obstack_specify_allocation (&objfile->objfile_obstack, 0, 0, xmalloc,
                                  xfree);
-      obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
-                                 xfree);
-
       terminate_minimal_symbol_table (objfile);
     }
 
@@ -236,14 +233,14 @@ allocate_objfile (bfd *abfd, int flags)
 
 /* Create the terminating entry of OBJFILE's minimal symbol table.
    If OBJFILE->msymbols is zero, allocate a single entry from
-   OBJFILE->symbol_obstack; otherwise, just initialize
+   OBJFILE->objfile_obstack; otherwise, just initialize
    OBJFILE->msymbols[OBJFILE->minimal_symbol_count].  */
 void
 terminate_minimal_symbol_table (struct objfile *objfile)
 {
   if (! objfile->msymbols)
     objfile->msymbols = ((struct minimal_symbol *)
-                         obstack_alloc (&objfile->symbol_obstack,
+                         obstack_alloc (&objfile->objfile_obstack,
                                         sizeof (objfile->msymbols[0])));
 
   {
@@ -339,8 +336,8 @@ unlink_objfile (struct objfile *objfile)
 
 
 /* Destroy an objfile and all the symtabs and psymtabs under it.  Note
-   that as much as possible is allocated on the symbol_obstack and
-   objfile_obstack, so that the memory can be efficiently freed.
+   that as much as possible is allocated on the objfile_obstack 
+   so that the memory can be efficiently freed.
 
    Things which we do NOT free because they are not in malloc'd memory
    or not in memory specific to the objfile include:
@@ -430,8 +427,6 @@ free_objfile (struct objfile *objfile)
   if (objfile->demangled_names_hash)
     htab_delete (objfile->demangled_names_hash);
   obstack_free (&objfile->objfile_obstack, 0);
-  obstack_free (&objfile->symbol_obstack, 0);
-
   xmfree (objfile->md, objfile);
   objfile = NULL;
 }
This page took 0.026965 seconds and 4 git commands to generate.