The PE abi does not require them for binaries.
Signed-off-by: Marcus Meissner meissner@suse.de
From: Marcus Meissner meissner@suse.de
The PE abi does not require them for binaries.
Signed-off-by: Marcus Meissner meissner@suse.de --- tools/winegcc/winegcc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index fb759063da9..6de0cf85a44 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -403,7 +403,11 @@ static struct strarray get_link_args( struct options *opts, const char *output_n strarray_add( &flags, "-shared" ); strarray_add( &flags, "-Wl,--kill-at" ); } - else strarray_add( &flags, opts->gui_app ? "-mwindows" : "-mconsole" ); + else + { + strarray_add( &flags, opts->gui_app ? "-mwindows" : "-mconsole" ); + strarray_add( &flags, "-Wl,--no-insert-timestamp" ); + }
if (opts->unicode_app) strarray_add( &flags, "-municode" ); if (opts->nodefaultlibs || opts->use_msvcrt) strarray_add( &flags, "-nodefaultlibs" );
Hi Marcus
the drawback of having a zero timestamp is that is will likely generate collisions when storing PE modules in a symbol store (the keys used for storing are: filename, file size (rounded to page size IIRC), and timestamp))
for repro build, we should either: - pass the timestamp as an external item and let winegcc handles it (setting SOURCE_DATE_EPOCH env var should do, or option --insert-timestamp) - implement in binutils/ld what MS linker does for repro builds: the PE timestamp is set to a hash of generated file
I believe binutils 2.42 now honors SOURCE_DATE_EPOCH for the PE timestamp, if you want reproducible builds you would likely be building with that already.
It would be nice if binutils used a hash by default, the MS linker and LLVM lld already do this.
IIRC there also were some DRMs which don't like zero timestamp field.
This merge request was closed by Marcus Meissner.
then lets close and see if binutils does it.
mingw64-cross-binutils-utils-2.39 is currently used in openSUSE.
I think we will get there when its updated.