Set page_size to 1 instead of 0 in the case file alignment value is zero.
This commit is contained in:
parent
5994185b33
commit
771e446b94
2 changed files with 10 additions and 0 deletions
|
@ -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>
|
2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
* coff-rs6000.c: Remove ARGSUSED and VARARGS.
|
* coff-rs6000.c: Remove ARGSUSED and VARARGS.
|
||||||
|
|
|
@ -3014,6 +3014,11 @@ coff_compute_section_file_positions (abfd)
|
||||||
if (coff_data (abfd)->link_info)
|
if (coff_data (abfd)->link_info)
|
||||||
{
|
{
|
||||||
page_size = pe_data (abfd)->pe_opthdr.FileAlignment;
|
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
|
else
|
||||||
page_size = PE_DEF_FILE_ALIGNMENT;
|
page_size = PE_DEF_FILE_ALIGNMENT;
|
||||||
|
|
Loading…
Reference in a new issue