diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objcopy.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 0e2d554..75af8f1 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2009-04-27 H.J. Lu <hongjiu.lu@intel.com> + + * objcopy.c (copy_object): Copy pe_opthdr before changing PE + parameters. + 2009-04-24 Cary Coutant <ccoutant@google.com> * dwarf.c (process_extended_line_op): Add DW_LNE_set_discriminator. 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 |