]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix objcopy's --preserve-dates command line option so that it will work with PE forma...
authorNick Clifton <nickc@redhat.com>
Mon, 30 Mar 2020 15:30:02 +0000 (16:30 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 30 Mar 2020 15:30:02 +0000 (16:30 +0100)
commit00386881a3d0f7ac89fcc5cc912da8cd69c04324
tree49d19d14cdb49b7bf0c6fb7f292be780eb385ca3
parent227c0bf4b3dd0cf65dceb58e729e9da81b38b5a7
Fix objcopy's --preserve-dates command line option so that it will work with PE format files.

PR binutils/pr25662
bfd * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
field to timestamp and make it an integer.
* libcoff.h: Regenerate.
* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
field in the pe_data structure rather than the insert_timestamp
field.

binutils* objcopy.c (copy_object): When copying PE format files set the
timestamp field in the pe_data structure if the preserve_dates
flag is set.
* testsuite/binutils-all/objcopy.exp (objcopy_test) Use
--preserve-dates in place of the -p option, in order to make its
effect more obvious.

ld * emultempl/pe.em (after_open): Replace initialisation of the
insert_timestamp field in the pe_data structure with an
initialisation of the timestamp field.
* emultemp/pep.em: Likewise.
* pe-dll.c (fill_edata): Use the timestamp field in the pe_data
structure instead of the insert_timestamp field.
bfd/ChangeLog
bfd/libcoff-in.h
bfd/libcoff.h
bfd/peXXigen.c
binutils/ChangeLog
binutils/objcopy.c
binutils/testsuite/binutils-all/objcopy.exp
ld/ChangeLog
ld/emultempl/pe.em
ld/emultempl/pep.em
ld/pe-dll.c