aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-12-01 18:46:21 +0000
committerNick Clifton <nickc@redhat.com>2003-12-01 18:46:21 +0000
commit771e446b94abe4b0e9285ee22141d5ee2a6b08e7 (patch)
tree7992beb0995c10f62a4774ed7ff76b0f027e88b9 /bfd/coffcode.h
parent5994185b335ef8e91f62822170300808dd0ccc29 (diff)
downloadgdb-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.h5
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;