gdb_flush (gdb_stdout);
}
- gdb_bfd_ref_ptr abfd (gdb_bfd_open (name.c_str (), gnutarget, -1));
+ gdb_bfd_ref_ptr abfd (gdb_bfd_open (name.c_str (), gnutarget));
if (abfd == NULL)
{
}
/* Open the file for loading. */
- gdb_bfd_ref_ptr loadfile_bfd (gdb_bfd_open (filename.get (), gnutarget, -1));
+ gdb_bfd_ref_ptr loadfile_bfd (gdb_bfd_open (filename.get (), gnutarget));
if (loadfile_bfd == NULL)
perror_with_name (filename.get ());
a `shared library' on AIX is also an archive), then you should
stat on the archive name, not member name. */
if (objfile->obfd->my_archive)
- res = stat (objfile->obfd->my_archive->filename, &new_statbuf);
+ res = stat (bfd_get_filename (objfile->obfd->my_archive), &new_statbuf);
else
res = stat (objfile_name (objfile), &new_statbuf);
if (res != 0)
obfd_filename = bfd_get_filename (objfile->obfd);
/* Open the new BFD before freeing the old one, so that
the filename remains live. */
- gdb_bfd_ref_ptr temp (gdb_bfd_open (obfd_filename, gnutarget, -1));
+ gdb_bfd_ref_ptr temp (gdb_bfd_open (obfd_filename, gnutarget));
objfile->obfd = temp.release ();
if (objfile->obfd == NULL)
error (_("Can't open %s to read symbols."), obfd_filename);
will need to be called (see discussion below). */
obstack_free (&objfile->objfile_obstack, 0);
objfile->sections = NULL;
+ objfile->section_offsets.clear ();
+ objfile->sect_index_bss = -1;
+ objfile->sect_index_data = -1;
+ objfile->sect_index_rodata = -1;
+ objfile->sect_index_text = -1;
objfile->compunit_symtabs = NULL;
objfile->template_symbols = NULL;
objfile->static_links.reset (nullptr);
objfiles_changed ();
+ /* Recompute section offsets and section indices. */
+ objfile->sf->sym_offsets (objfile, {});
+
read_symbols (objfile, 0);
if (!objfile_has_symbols (objfile))
static void
simple_free_overlay_table (void)
{
- if (cache_ovly_table)
- xfree (cache_ovly_table);
+ xfree (cache_ovly_table);
cache_novlys = 0;
cache_ovly_table = NULL;
cache_ovly_table_base = 0;