diff -rubN binutils-2.8.1-mips1/bfd/ChangeLog binutils-2.8.1-mips2/bfd/ChangeLog
--- binutils-2.8.1-mips1/bfd/ChangeLog	Mon May 26 10:33:56 1997
+++ binutils-2.8.1-mips2/bfd/ChangeLog	Sat Dec  9 08:49:09 2000
@@ -1,3 +1,8 @@
+2000-11-30  Ralf Baechle  <ralf@gnu.org>
+
+	* elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
+	BFDs containing no sections to be merged, regardless of their flags.
+
 Fri May 16 12:10:52 1997  Ian Lance Taylor  <ian@cygnus.com>
 
 	* elflink.h (elf_link_add_object_symbols): Don't decrease the
diff -rubN binutils-2.8.1-mips1/bfd/elf32-mips.c binutils-2.8.1-mips2/bfd/elf32-mips.c
--- binutils-2.8.1-mips1/bfd/elf32-mips.c	Sat Dec  9 08:50:25 2000
+++ binutils-2.8.1-mips2/bfd/elf32-mips.c	Sat Dec  9 08:49:09 2000
@@ -1964,6 +1964,8 @@
   flagword old_flags;
   flagword new_flags;
   boolean ok;
+  boolean null_input_bfd = true;
+  asection *sec;
 
   /* Check if we have the same endianess */
   if (ibfd->xvec->byteorder != obfd->xvec->byteorder
@@ -2009,6 +2011,27 @@
   old_flags &= ~EF_MIPS_NOREORDER;
 
   if (new_flags == old_flags)
+    return true;
+
+  /* Check to see if the input BFD actually contains any sections.
+     If not, its flags may not have been initialised either, but it cannot
+     actually cause any incompatibility.  */
+  for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+    {
+      /* Ignore synthetic sections and empty .text, .data and .bss sections
+	  which are automatically generated by gas.  */
+      if (strcmp (sec->name, ".reginfo")
+	  && strcmp (sec->name, ".mdebug")
+	  && ((!strcmp (sec->name, ".text")
+	       || !strcmp (sec->name, ".data")
+	       || !strcmp (sec->name, ".bss"))
+	      && sec->_raw_size != 0))
+	{
+	  null_input_bfd = false;
+	  break;
+	}
+    }
+  if (null_input_bfd)
     return true;
 
   ok = true;
