Fix file-alignment for objcopy for pe-coff

2014-08-22  Kai Tietz  <ktietz@redhat.com>

	PR binutils/11822
	* coffcode.h (coff_compute_section_file_positions): Keep
	FileAlignment valid as set.
This commit is contained in:
Kai Tietz 2014-08-20 17:39:21 +02:00
parent 7c343b48b2
commit a4a027b7f4
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-08-22 Kai Tietz <ktietz@redhat.com>
PR binutils/11822
* coffcode.h (coff_compute_section_file_positions): Keep
FileAlignment valid as set.
2014-08-22 Alan Modra <amodra@gmail.com>
* elf-eh-frame.c (struct cie): Delete "output_sec" field.

View File

@ -3134,7 +3134,8 @@ coff_compute_section_file_positions (bfd * abfd)
#ifdef COFF_IMAGE_WITH_PE
int page_size;
if (coff_data (abfd)->link_info)
if (coff_data (abfd)->link_info
|| (pe_data (abfd) && pe_data (abfd)->pe_opthdr.FileAlignment))
{
page_size = pe_data (abfd)->pe_opthdr.FileAlignment;