diff options
author | Cory Fields <cory@coryfields.com> | 2013-11-22 14:54:33 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2013-11-22 14:55:56 +0000 |
commit | 0cb112f7400187275da81a05a9ad0534f1430139 (patch) | |
tree | d5f66a797c7e83233320057c2ea9809266c3cffc /bfd | |
parent | 194cca41192efa65f710967e3149bbc813c12b22 (diff) | |
download | gdb-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 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/libcoff-in.h | 5 | ||||
-rw-r--r-- | bfd/libcoff.h | 5 | ||||
-rw-r--r-- | bfd/peXXigen.c | 8 |
4 files changed, 16 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 89a8f1b..d76b1b4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2013-11-22 Cory Fields <cory@coryfields.com> + + * 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. + 2013-11-19 Roland McGrath <mcgrathr@google.com> * elf-nacl.c (nacl_modify_segment_map): Calculate SIZEOF_HEADERS diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h index 6efbc52..49b5f10 100644 --- a/bfd/libcoff-in.h +++ b/bfd/libcoff-in.h @@ -1,7 +1,5 @@ /* BFD COFF object file private structure. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright 1990-2013 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -118,6 +116,7 @@ typedef struct pe_tdata int dll; int has_reloc_section; int dont_strip_reloc; + bfd_boolean insert_timestamp; bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; } pe_data_type; diff --git a/bfd/libcoff.h b/bfd/libcoff.h index 6270bab..19b6d9c 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -3,9 +3,7 @@ Run "make headers" in your build bfd/ to regenerate. */ /* BFD COFF object file private structure. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright 1990-2013 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -122,6 +120,7 @@ typedef struct pe_tdata int dll; int has_reloc_section; int dont_strip_reloc; + bfd_boolean insert_timestamp; bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; } pe_data_type; diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index d0f7a96..287e4a2 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -1,6 +1,5 @@ /* Support for the generic parts of PE/PEI; the common executable parts. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright 1995-2013 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -793,7 +792,10 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out) H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic); H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns); - H_PUT_32 (abfd, time (0), filehdr_out->f_timdat); + /* 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); + PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr); H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms); |