aboutsummaryrefslogtreecommitdiff
path: root/bfd/peXXigen.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-09-27 12:08:19 +0100
committerNick Clifton <nickc@redhat.com>2016-09-27 12:08:19 +0100
commit1c5f704fc035bc705dee887418f42cb8bca24b5d (patch)
treeea2d16c7ed1a557ba3294b3b53a0455124b996c0 /bfd/peXXigen.c
parentca90e76046d302a730629ecf39b425a8aaa590c2 (diff)
downloadgdb-1c5f704fc035bc705dee887418f42cb8bca24b5d.zip
gdb-1c5f704fc035bc705dee887418f42cb8bca24b5d.tar.gz
gdb-1c5f704fc035bc705dee887418f42cb8bca24b5d.tar.bz2
Ensure that the timestamp in PE/COFF headers is always initialised.
PR ld/20634 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Put 0 in the timestamp field if real time values are not being stored.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r--bfd/peXXigen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index c92c1ea..d713d96 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -879,6 +879,8 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out)
/* Only use a real timestamp if the option was chosen. */
if ((pe_data (abfd)->insert_timestamp))
H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
+ else
+ H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
filehdr_out->f_symptr);