* config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
authorIan Lance Taylor <ian@airs.com>
Wed, 7 Aug 1996 17:17:33 +0000 (17:17 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 7 Aug 1996 17:17:33 +0000 (17:17 +0000)
not to more than a 16 byte boundary.

gas/ChangeLog
gas/config/tc-mips.c

index 9cb014d185dc01d0796ccee5e633642fef8f9833..2fe618d64591b057b46154c259df46c4651ed0d9 100644 (file)
@@ -1,5 +1,8 @@
 Wed Aug  7 11:50:26 1996  Ian Lance Taylor  <ian@cygnus.com>
 
+       * config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
+       not to more than a 16 byte boundary.
+
        * config/tc-i386.c (tc_gen_reloc): Accept all relocs; remove
        #ifndef OBJ_ELF lines.  From Eric Valette <valette@crf.canon.fr>.
        (tc_gen_reloc): If out of memory call as_fatal rather than
index f9b6045b0165c0cabe1140979e2296dd41f1992b..38bcebc5dc467f66c9d8d9e87c013d778e180b3d 100644 (file)
@@ -7393,13 +7393,17 @@ md_section_align (seg, addr)
      asection *seg;
      valueT addr;
 {
-#ifndef OBJ_ELF
   int align = bfd_get_section_alignment (stdoutput, seg);
 
-  return ((addr + (1 << align) - 1) & (-1 << align));
-#else
-  return addr;
+#ifdef OBJ_ELF
+  /* We don't need to align ELF sections to the full alignment.
+     However, Irix 5 may prefer that we align them at least to a 16
+     byte boundary.  */
+  if (align > 16)
+    align = 16;
 #endif
+
+  return ((addr + (1 << align) - 1) & (-1 << align));
 }
 
 /* Utility routine, called from above as well.  If called while the