From 771e446b94abe4b0e9285ee22141d5ee2a6b08e7 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 1 Dec 2003 18:46:21 +0000 Subject: Set page_size to 1 instead of 0 in the case file alignment value is zero. --- bfd/coffcode.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bfd/coffcode.h') diff --git a/bfd/coffcode.h b/bfd/coffcode.h index e2c27f051a5..ccac05bcaec 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; -- cgit v1.2.3