diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-04-27 13:59:43 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-04-27 13:59:43 +0000 |
commit | 325c681d94281b21b30dc18dd604a54e418df607 (patch) | |
tree | 9d1a23e038a82d3e57094def34d1df5924f04d86 /binutils/objcopy.c | |
parent | 945a118de0fdc7934635cfe263d14444ebbdd403 (diff) | |
download | fsf-binutils-gdb-325c681d94281b21b30dc18dd604a54e418df607.zip fsf-binutils-gdb-325c681d94281b21b30dc18dd604a54e418df607.tar.gz fsf-binutils-gdb-325c681d94281b21b30dc18dd604a54e418df607.tar.bz2 |
bfd/
2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
copy pe_opthdr.
binutils/
2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
* objcopy.c (copy_object): Copy pe_opthdr before changing PE
parameters.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 3fe8741..7ef95c5 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1491,6 +1491,11 @@ copy_object (bfd *ibfd, bfd *obfd) /* Set up PE parameters. */ pe_data_type *pe = pe_data (obfd); + /* Copy PE parameters before changing them. */ + if (ibfd->xvec->flavour == bfd_target_coff_flavour + && bfd_pei_p (ibfd)) + pe->pe_opthdr = pe_data (ibfd)->pe_opthdr; + if (pe_file_alignment != (bfd_vma) -1) pe->pe_opthdr.FileAlignment = pe_file_alignment; else |