/* Handle shared libraries for GDB, the GNU Debugger.
- Copyright (C) 1990-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-2020 Free Software Foundation, Inc.
This file is part of GDB.
/* Unless the user loaded it explicitly, free SO's objfile. */
if (gdb->objfile && ! (gdb->objfile->flags & OBJF_USERLOADED)
&& !solib_used (gdb))
- delete gdb->objfile;
+ gdb->objfile->unlink ();
/* Some targets' section tables might be referring to
sections from so->abfd; remove them. */
{
if (so->objfile && ! (so->objfile->flags & OBJF_USERLOADED)
&& !solib_used (so))
- delete so->objfile;
+ so->objfile->unlink ();
remove_target_sections (so);
clear_so (so);
}