aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorKai Tietz <ktietz70@googlemail.com>2014-08-20 17:39:21 +0200
committerKai Tietz <ktietz70@googlemail.com>2014-08-22 11:26:26 +0200
commita4a027b7f43b1d9e62a6a540cd7857a334d37b12 (patch)
tree0b29c16bb0ca9e888416c3e54d1200941cc24454 /bfd/coffcode.h
parent7c343b48b22f04616bd699779118ede2a6aac4b1 (diff)
downloadgdb-a4a027b7f43b1d9e62a6a540cd7857a334d37b12.zip
gdb-a4a027b7f43b1d9e62a6a540cd7857a334d37b12.tar.gz
gdb-a4a027b7f43b1d9e62a6a540cd7857a334d37b12.tar.bz2
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.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 89ca234..6678b88 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;