Avoid setting or recording negative alignments when the target stores multiple octets...
[deliverable/binutils-gdb.git] / gas / write.c
index f9d5da9c19199b9f8d0409489900c37132abff8b..46d8d96ab6946f01ed741fa881373598132842e3 100644 (file)
@@ -355,12 +355,15 @@ record_alignment (/* Segment to which alignment pertains.  */
                  segT seg,
                  /* Alignment, as a power of 2 (e.g., 1 => 2-byte
                     boundary, 2 => 4-byte boundary, etc.)  */
-                 int align)
+                 unsigned int align)
 {
   if (seg == absolute_section)
     return;
 
-  if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
+  if (align <= OCTETS_PER_BYTE_POWER)
+    return;
+
+  if (align > bfd_get_section_alignment (stdoutput, seg))
     bfd_set_section_alignment (stdoutput, seg, align);
 }
 
This page took 0.029559 seconds and 4 git commands to generate.