aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-11-21 18:04:42 +0000
committerIan Lance Taylor <ian@airs.com>1995-11-21 18:04:42 +0000
commit31a52a51453d7828dadb31c854041390ae1945b3 (patch)
tree63abea060311b7b03dfa8c34491c46bbfa6807f7 /bfd
parentc3ccc15e438cee28ad8bd4d8803688298ff86f22 (diff)
downloadfsf-binutils-gdb-31a52a51453d7828dadb31c854041390ae1945b3.zip
fsf-binutils-gdb-31a52a51453d7828dadb31c854041390ae1945b3.tar.gz
fsf-binutils-gdb-31a52a51453d7828dadb31c854041390ae1945b3.tar.bz2
* coffcode.h (coff_compute_section_file_positions): Only pad the
previous section to force file alignment when creating an executable. PR 8325.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/coffcode.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 8e6b08e..6eb7a12 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -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