diff --git a/gdb/gdb.gdb b/gdb/gdb.gdb
index 437784102c1f..f107178c6353 100644
--- a/gdb/gdb.gdb
+++ b/gdb/gdb.gdb
@@ -2,11 +2,11 @@
 # structures.

 define list-objfiles
-  set $obj = object_files
+  set $obj = current_program_space->objfiles_head
   printf "objfile    bfd        msyms  name\n"
   while $obj != 0
     printf "0x%-8x 0x%-8x %6d %s\n", $obj, $obj->obfd, \
-      $obj->minimal_symbol_count, $obj->name
+      $obj->per_bfd->minimal_symbol_count, $obj->original_name
     set var $obj = $obj->next
   end
 end
diff --git a/gdb/maint.c b/gdb/maint.c
index 8fc660eb9394..c907dc806d45 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -483,7 +483,7 @@ maintenance_translate_address (const char *arg, int from_tty)
 	  gdb_assert (sect->objfile && objfile_name (sect->objfile));
 	  obj_name = objfile_name (sect->objfile);

-	  if (MULTI_OBJFILE_P ())
+	  if (multi_objfile_p ())
 	    printf_filtered (_("%s + %s in section %s of %s\n"),
 			     symbol_name, symbol_offset,
 			     section_name, obj_name);
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 1c95e068842a..d90164433a07 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -393,13 +393,13 @@ objfile::objfile (bfd *abfd, const char *name, objfile_flags flags_)

   /* Add this file onto the tail of the linked list of other such files.  */

-  if (object_files == NULL)
-    object_files = this;
+  if (current_program_space->objfiles_head == NULL)
+    current_program_space->objfiles_head = this;
   else
     {
       struct objfile *last_one;

-      for (last_one = object_files;
+      for (last_one = current_program_space->objfiles_head;
 	   last_one->next;
 	   last_one = last_one->next);
       last_one->next = this;
@@ -496,7 +496,8 @@ put_objfile_before (struct objfile *objfile, struct objfile *before_this)

   unlink_objfile (objfile);

-  for (objp = &object_files; *objp != NULL; objp = &((*objp)->next))
+  for (objp = &current_program_space->objfiles_head; *objp != NULL;
+       objp = &((*objp)->next))
     {
       if (*objp == before_this)
 	{
@@ -528,7 +529,8 @@ unlink_objfile (struct objfile *objfile)
 {
   struct objfile **objpp;

-  for (objpp = &object_files; *objpp != NULL; objpp = &((*objpp)->next))
+  for (objpp = &current_program_space->objfiles_head;
+       *objpp != NULL; objpp = &((*objpp)->next))
     {
       if (*objpp == objfile)
 	{
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 368d9f3abe25..8d26c039976b 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -398,8 +398,8 @@ struct objfile


   /* All struct objfile's are chained together by their next pointers.
-     The program space field "objfiles"  (frequently referenced via
-     the macro "object_files") points to the first link in this chain.  */
+     The program space field "objfiles_head" points to the first link in this
+     chain.  */

   struct objfile *next = nullptr;

@@ -679,9 +679,15 @@ extern void default_iterate_over_objfiles_in_search_order
    uninitialized section index.  */
 #define SECT_OFF_BSS(objfile) (objfile)->sect_index_bss

-/* Answer whether there is more than one object file loaded.  */
+/* Answer whether there is more than one object file loaded in the current
+   program space.  */

-#define MULTI_OBJFILE_P() (object_files && object_files->next)
+static inline
+bool multi_objfile_p ()
+{
+  return (current_program_space->objfiles_head != NULL
+	  && current_program_space->objfiles_head->next != NULL);
+}

 /* Reset the per-BFD storage area on OBJ.  */

diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9e84594fe687..46f0c3400ef7 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1319,7 +1319,7 @@ info_symbol_command (const char *arg, int from_tty)
 	    gdb_assert (osect->objfile && objfile_name (osect->objfile));
 	    obj_name = objfile_name (osect->objfile);

-	    if (MULTI_OBJFILE_P ())
+	    if (multi_objfile_p ())
 	      if (pc_in_unmapped_range (addr, osect))
 		if (section_is_overlay (osect))
 		  printf_filtered (_("%s in load address range of "
diff --git a/gdb/progspace.h b/gdb/progspace.h
index 039f55517305..e77e21fdda65 100644
--- a/gdb/progspace.h
+++ b/gdb/progspace.h
@@ -259,10 +259,6 @@ struct address_space

 #define symfile_objfile current_program_space->symfile_object_file

-/* All known objfiles are kept in a linked list.  This points to the
-   root of this list.  */
-#define object_files current_program_space->objfiles_head
-
 /* The set of target sections matching the sections mapped into the
    current program space.  */
 #define current_target_sections (&current_program_space->target_sections)
