mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Set page_size to 1 instead of 0 in the case file alignment value is zero.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user