diff options
author | Nick Clifton <nickc@redhat.com> | 2003-12-01 18:46:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-12-01 18:46:21 +0000 |
commit | 771e446b94abe4b0e9285ee22141d5ee2a6b08e7 (patch) | |
tree | 7992beb0995c10f62a4774ed7ff76b0f027e88b9 /bfd/coffcode.h | |
parent | 5994185b335ef8e91f62822170300808dd0ccc29 (diff) | |
download | gdb-771e446b94abe4b0e9285ee22141d5ee2a6b08e7.zip gdb-771e446b94abe4b0e9285ee22141d5ee2a6b08e7.tar.gz gdb-771e446b94abe4b0e9285ee22141d5ee2a6b08e7.tar.bz2 |
Set page_size to 1 instead of 0 in the case file alignment value is zero.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index e2c27f0..ccac05b 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -3014,6 +3014,11 @@ coff_compute_section_file_positions (abfd) if (coff_data (abfd)->link_info) { page_size = pe_data (abfd)->pe_opthdr.FileAlignment; + + /* If no file alignment has been set, default to one. + This repairs 'ld -r' for arm-wince-pe target. */ + if (page_size == 0) + page_size = 1; } else page_size = PE_DEF_FILE_ALIGNMENT; |