aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
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;