aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
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')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/coffcode.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6c98ed3..04b4465 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
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;