- 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. */
-
- objfile->sect_index_text = -1;
- objfile->sect_index_data = -1;
- objfile->sect_index_bss = -1;
- objfile->sect_index_rodata = -1;
-
- /* Add this file onto the tail of the linked list of other such files. */
-
- objfile->next = NULL;
- if (object_files == NULL)
- object_files = objfile;
- else
- {
- struct objfile *last_one;
-
- for (last_one = object_files;
- last_one->next;
- last_one = last_one->next);
- last_one->next = objfile;
- }
-
- /* Save passed in flag bits. */
- objfile->flags |= flags;
-
- /* Rebuild section map next time we need it. */
- get_objfile_pspace_data (objfile->pspace)->new_objfiles_available = 1;
-
- return objfile;
-}
-
-/* Retrieve the gdbarch associated with OBJFILE. */
-
-struct gdbarch *
-get_objfile_arch (const struct objfile *objfile)
-{
- return objfile->per_bfd->gdbarch;