aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pep.em
diff options
context:
space:
mode:
authorLinda Zhang <lindasc@qq.com>2014-06-26 12:18:39 +0100
committerNick Clifton <nickc@redhat.com>2014-06-26 12:18:39 +0100
commiteeb14e5a5b378450ca2ed139e76f317f491f4613 (patch)
treed6765b98ed47c169caf41c6efc41020eb285ec1e /ld/emultempl/pep.em
parentdf565f326e62eacf41fb880f1acc65b9fdb5052c (diff)
downloadgdb-eeb14e5a5b378450ca2ed139e76f317f491f4613.zip
gdb-eeb14e5a5b378450ca2ed139e76f317f491f4613.tar.gz
gdb-eeb14e5a5b378450ca2ed139e76f317f491f4613.tar.bz2
Change the default behaviour of the PE targeted linker so that timestamps are
inserted. This is for compatibility with other, non-GNU tools. Deterministic binaries can still be created by using the new --no-insert-timestamp command line option. * emultempl/pe.em: Initialise insert_timestamp to true. Add a --no-insert-timestamp command line option. * emultempl/pep.em: Likewise. * ld.texinfo: Document that --insert-timestamp is enabled by default and that it now has an inverse command line option. * NEWS: Mention the new behaviour.
Diffstat (limited to 'ld/emultempl/pep.em')
-rw-r--r--ld/emultempl/pep.em9
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 6e3ecd8..916a786 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -147,7 +147,7 @@ static flagword real_flags = IMAGE_FILE_LARGE_ADDRESS_AWARE;
static int support_old_code = 0;
static lang_assignment_statement_type *image_base_statement = 0;
static unsigned short pe_dll_characteristics = 0;
-static bfd_boolean insert_timestamp = FALSE;
+static bfd_boolean insert_timestamp = TRUE;
static const char *emit_build_id;
#ifdef DLL_SUPPORT
@@ -245,6 +245,7 @@ enum options
OPTION_NO_BIND,
OPTION_WDM_DRIVER,
OPTION_INSERT_TIMESTAMP,
+ OPTION_NO_INSERT_TIMESTAMP,
OPTION_TERMINAL_SERVER_AWARE,
OPTION_BUILD_ID
};
@@ -322,6 +323,7 @@ gld${EMULATION_NAME}_add_options
{"wdmdriver", no_argument, NULL, OPTION_WDM_DRIVER},
{"tsaware", no_argument, NULL, OPTION_TERMINAL_SERVER_AWARE},
{"insert-timestamp", no_argument, NULL, OPTION_INSERT_TIMESTAMP},
+ {"no-insert-timestamp", no_argument, NULL, OPTION_NO_INSERT_TIMESTAMP},
{"build-id", optional_argument, NULL, OPTION_BUILD_ID},
{NULL, no_argument, NULL, 0}
};
@@ -409,7 +411,7 @@ gld_${EMULATION_NAME}_list_options (FILE *file)
fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
fprintf (file, _(" --support-old-code Support interworking with old code\n"));
fprintf (file, _(" --[no-]leading-underscore Set explicit symbol underscore prefix mode\n"));
- fprintf (file, _(" --insert-timestamp Use a real timestamp rather than zero.\n"));
+ fprintf (file, _(" --[no-]insert-timestamp Use a real timestamp rather than zero. (default)\n"));
fprintf (file, _(" This makes binaries non-deterministic\n"));
#ifdef DLL_SUPPORT
fprintf (file, _(" --add-stdcall-alias Export symbols with and without @nn\n"));
@@ -721,6 +723,9 @@ gld${EMULATION_NAME}_handle_option (int optc)
case OPTION_INSERT_TIMESTAMP:
insert_timestamp = TRUE;
break;
+ case OPTION_NO_INSERT_TIMESTAMP:
+ insert_timestamp = FALSE;
+ break;
#ifdef DLL_SUPPORT
case OPTION_OUT_DEF:
pep_out_def_filename = xstrdup (optarg);