+2021-03-20  Tom Tromey  <tom@tromey.com>
+
+       * symfile.c (syms_from_objfile_1): Call reset_psymtabs.
+       (reread_symbols): Move reset_psymtabs call later.
+       * objfiles.c (objfile::objfile): Don't initialize
+       partial_symtabs.
+
 2021-03-20  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/read.c (dwarf2_build_psymtabs): Call
 
 objfile::objfile (bfd *abfd, const char *name, objfile_flags flags_)
   : flags (flags_),
     pspace (current_program_space),
-    partial_symtabs (new psymtab_storage ()),
     obfd (abfd)
 {
   const char *expanded_name;
 
   const int mainline = add_flags & SYMFILE_MAINLINE;
 
   objfile_set_sym_fns (objfile, find_sym_fns (objfile->obfd));
+  objfile->reset_psymtabs ();
   objfile->qf = make_psymbol_functions (objfile->partial_symtabs);
 
   if (objfile->sf == NULL)
            error (_("Can't read symbols from %s: %s."), objfile_name (objfile),
                   bfd_errmsg (bfd_get_error ()));
 
-         objfile->reset_psymtabs ();
-
          /* NB: after this call to obstack_free, objfiles_changed
             will need to be called (see discussion below).  */
          obstack_free (&objfile->objfile_obstack, 0);
             based on whether .gdb_index is present, and we need it to
             start over.  PR symtab/15885  */
          objfile_set_sym_fns (objfile, find_sym_fns (objfile->obfd));
+         objfile->reset_psymtabs ();
          objfile->qf = make_psymbol_functions (objfile->partial_symtabs);
 
          build_objfile_section_table (objfile);