aboutsummaryrefslogtreecommitdiff
path: root/ld/pe-dll.c
diff options
context:
space:
mode:
authorCory Fields <cory@coryfields.com>2013-11-22 14:54:33 +0000
committerNick Clifton <nickc@redhat.com>2013-11-22 14:55:56 +0000
commit0cb112f7400187275da81a05a9ad0534f1430139 (patch)
treed5f66a797c7e83233320057c2ea9809266c3cffc /ld/pe-dll.c
parent194cca41192efa65f710967e3149bbc813c12b22 (diff)
downloadgdb-0cb112f7400187275da81a05a9ad0534f1430139.zip
gdb-0cb112f7400187275da81a05a9ad0534f1430139.tar.gz
gdb-0cb112f7400187275da81a05a9ad0534f1430139.tar.bz2
* windres.c (define_resource): Use zero for timestamp, making
output deterministic. time.h include is no longer needed. * resres.c (res_append_resource): Likewise. * pe-dll.c (fill_edata): Only use a real timestamp if --insert-timestamp was used. * emultempl/pe.em: Add the --insert-timestamp option. * emultempl/pep.em: Likewise for 64bit. * ld.texinfo: Document the --insert-timestamp option. * libcoff-in.h: Add insert_timestamp flag to the pe_data struct. * libcoff.h: Regenerate. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real timestamp if --insert-timestamp was used.
Diffstat (limited to 'ld/pe-dll.c')
-rw-r--r--ld/pe-dll.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 7d5f90d..8777efb 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1169,9 +1169,6 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
unsigned char *enameptrs;
unsigned char *eordinals;
char *enamestr;
- time_t now;
-
- time (&now);
edata_d = xmalloc (edata_sz);
@@ -1186,7 +1183,10 @@ fill_edata (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
+ edata_s->output_section->vma - image_base)
memset (edata_d, 0, edata_sz);
- bfd_put_32 (abfd, now, edata_d + 4);
+
+ if (pe_data (abfd)->insert_timestamp)
+ H_PUT_32 (abfd, time (0), edata_d + 4);
+
if (pe_def_file->version_major != -1)
{
bfd_put_16 (abfd, pe_def_file->version_major, edata_d + 8);