From a4a027b7f43b1d9e62a6a540cd7857a334d37b12 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 20 Aug 2014 17:39:21 +0200 Subject: 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. --- bfd/coffcode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bfd/coffcode.h') 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; -- cgit v1.2.1