/* We could use obstack_specify_allocation here instead, but
gdb_obstack.h specifies the alloc/dealloc functions. */
obstack_init (&objfile->objfile_obstack);
- terminate_minimal_symbol_table (objfile);
objfile_alloc_data (objfile);
objfile->per_bfd = get_objfile_bfd_data (objfile, abfd);
objfile->pspace = current_program_space;
+ terminate_minimal_symbol_table (objfile);
+
/* Initialize the section indexes for this objfile, so that we can
later detect if they are used w/o being properly assigned to. */
if (objfile->sf)
objfile->sf->qf->relocate (objfile, new_offsets, delta);
- {
- struct minimal_symbol *msym;
-
- ALL_OBJFILE_MSYMBOLS (objfile, msym)
- if (SYMBOL_SECTION (msym) >= 0)
- SYMBOL_VALUE_ADDRESS (msym) += ANOFFSET (delta, SYMBOL_SECTION (msym));
- }
- /* Relocating different sections by different amounts may cause the symbols
- to be out of order. */
- msymbols_sort (objfile);
-
{
int i;
obj_section_addr (s));
}
- /* Relocating probes. */
- if (objfile->sf && objfile->sf->sym_probe_fns)
- objfile->sf->sym_probe_fns->sym_relocate_probe (objfile,
- new_offsets, delta);
-
/* Data changed. */
return 1;
}
ALL_OBJFILES (ofp)
{
- if (ofp->minimal_symbol_count > 0)
+ if (ofp->per_bfd->minimal_symbol_count > 0)
{
return 1;
}