diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8787765886e..47bd4d194c0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Sat Apr 19 22:52:03 1997  Jim Wilson  <wilson@cygnus.com>
+
+	* config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
+	for all undefined symbols.
+
 Fri Apr 18 13:37:35 1997  Ian Lance Taylor  <ian@cygnus.com>
 
 	* config/tc-ppc.c (ppc_fix_adjustable): Handle zero length csects
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 40c6d021b16..c861d544519 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -845,6 +845,16 @@ obj_elf_text (i)
 #endif
 }
 
+/* This can be called from the processor backends if they change
+   sections.  */
+
+void
+obj_elf_section_change_hook ()
+{
+  previous_section = now_seg;
+  previous_subsection = now_subseg;
+}
+
 void
 obj_elf_previous (ignore)
      int ignore;
@@ -1362,10 +1372,11 @@ elf_frob_symbol (symp, puntp)
     }
 
 #ifdef TC_MIPS
-  /* The Irix 5 assembler appears to set the type of any common symbol
-     to STT_OBJECT.  We try to be compatible, since the Irix 5 linker
-     apparently sometimes cares.  FIXME: What about Irix 6?  */
-  if (S_IS_COMMON (symp))
+  /* The Irix 5 and 6 assemblers set the type of any common symbol and
+     any undefined non-function symbol to STT_OBJECT.  We try to be compatible,
+     since newer Irix 5 and 6 linkers care.  */
+  if (S_IS_COMMON (symp)
+      || (! S_IS_DEFINED (symp) && ((symp->bsym->flags & BSF_FUNCTION) == 0)))
     symp->bsym->flags |= BSF_OBJECT;
 #endif