* coffcode.h (coff_compute_section_file_positions): Only pad the
authorIan Lance Taylor <ian@airs.com>
Tue, 21 Nov 1995 18:04:42 +0000 (18:04 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 21 Nov 1995 18:04:42 +0000 (18:04 +0000)
previous section to force file alignment when creating an
executable.
PR 8325.

bfd/coffcode.h

index 8e6b08ed4be3eba4bbdf57765825fd5a50d90280..6eb7a12d9666443950cf8c5594cb4c47dc5b2418 100644 (file)
@@ -1947,17 +1947,18 @@ coff_compute_section_file_positions (abfd)
         do this (FIXME) so we can stay in sync with Intel.  960
         doesn't yet page from files... */
 #ifndef I960
-      {
-       /* make sure this section is aligned on the right boundary - by
-          padding the previous section up if necessary */
+      if ((abfd->flags & EXEC_P) != 0)
+       {
+         /* make sure this section is aligned on the right boundary - by
+            padding the previous section up if necessary */
 
-       old_sofar = sofar;
-       sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
-       if (previous != (asection *) NULL)
-         {
-           previous->_raw_size += sofar - old_sofar;
-         }
-      }
+         old_sofar = sofar;
+         sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+         if (previous != (asection *) NULL)
+           {
+             previous->_raw_size += sofar - old_sofar;
+           }
+       }
 
 #endif