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 | |
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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/coffcode.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7d33bd8..b1caa54 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru> + + * coffcode.h (coff_compute_section_file_positions): Set page_size + to 1 instead of 0 in the case file alignment value is zero. + 2003-12-01 Kazu Hirata <kazu@cs.umass.edu> * coff-rs6000.c: Remove ARGSUSED and VARARGS. 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; |