From: Kai Tietz Date: Wed, 20 Aug 2014 15:39:21 +0000 (+0200) Subject: Fix file-alignment for objcopy for pe-coff X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4a027b7f43b1d9e62a6a540cd7857a334d37b12;p=binutils-gdb.git Fix file-alignment for objcopy for pe-coff 2014-08-22 Kai Tietz PR binutils/11822 * coffcode.h (coff_compute_section_file_positions): Keep FileAlignment valid as set. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6c98ed34d57..04b44653f29 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2014-08-22 Kai Tietz + + PR binutils/11822 + * coffcode.h (coff_compute_section_file_positions): Keep + FileAlignment valid as set. + 2014-08-22 Alan Modra * elf-eh-frame.c (struct cie): Delete "output_sec" field. diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 89ca2346612..6678b88bbd5 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -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;