peXXigen.patch 945 B

123456789101112131415161718192021222324252627282930
  1. From f8e8f1daf12e30d3197b25d6bd10c03d1f932e20 Mon Sep 17 00:00:00 2001
  2. From: Nick Clifton <nickc@redhat.com>
  3. Date: Tue, 27 Sep 2016 12:08:19 +0100
  4. Subject: [PATCH] Ensure that the timestamp in PE/COFF headers is always
  5. initialised.
  6. PR ld/20634
  7. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Put 0 in the
  8. timestamp field if real time values are not being stored.
  9. ---
  10. bfd/peXXigen.c | 2 ++
  11. 1 file changed, 2 insertions(+)
  12. diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
  13. index c92c1ea..d713d96 100644
  14. --- a/bfd/peXXigen.c
  15. +++ b/bfd/peXXigen.c
  16. @@ -879,6 +879,8 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out)
  17. /* Only use a real timestamp if the option was chosen. */
  18. if ((pe_data (abfd)->insert_timestamp))
  19. H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
  20. + else
  21. + H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
  22. PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
  23. filehdr_out->f_symptr);
  24. --
  25. 2.1.4