It's not a problem of striping files or not (the debug section is not
involved here). But anyway, i've just did this :
gcc -g -O2 -o pi pi.c
then, I run the sigcheck tool. Here is the output :
$ /sigcheck.exe ./pi.exe
Sigcheck v2.50 - File version and signature viewer
Copyright (C) 2004-2016 Mark Russinovich
Sysinternals - www.sysinternals.com
E:\Documents\MSYS2\home\vtorri\code\pi.exe:
Verified: Unsigned
Link date: 19:12 01/01/1970
Publisher: n/a
Company: n/a
Description: n/a
Product: n/a
Prod version: n/a
File version: n/a
MachineType: 64-bit
When I parse myself the TimeDateStamp field in the IMAGE_FILE_HEADER
structure, i obtain the same value.
My code (the relevant part) in Examine :
--------------------
{
FILETIME ft;
FILETIME lft;
ULARGE_INTEGER uli;
#define EXM_WINDOWS_TICK 10000000
#define EXM_SEC_TO_UNIX_EPOCH 11644473600ULL
uli.QuadPart = ((unsigned long
long)exm_pe_nt_header_get(pe)->FileHeader.TimeDateStamp +
EXM_SEC_TO_UNIX_EPOCH) * EXM_WINDOWS_TICK;
ft.dwLowDateTime = uli.LowPart;
ft.dwHighDateTime = uli.HighPart;
FileTimeToLocalFileTime(&ft, &lft);
if (!FileTimeToSystemTime(&lft, &st))
{
st.wHour = 0;
st.wMinute = 0;
st.wDay = 1;
st.wMonth = 1;
st.wYear = 1970;
}
}
printf("%02d:%02d %02d/%02d/%04d\n",
st.wHour,
st.wMinute,
st.wDay,
st.wMonth,
st.wYear);
--------------------
Vincent Torri
On Sun, Feb 7, 2016 at 10:56 AM, Nakai Yuta <[email protected]> wrote:
> I cannot reproduce that.
> maybe, you strip output binaries?
>
> ________________________________________
> From: Vincent Torri <[email protected]>
> Sent: Sunday, February 7, 2016 17:34
> To: [email protected]
> Subject: [Mingw-w64-public] does linker correctly set the creation date of a
> PE file ?
>
> Hello
>
> with my little Examine tool, or with the 'sigcheck' tool from
> sysinternal, it seems that the TimeDateStamp field of the
> IMAGE_FILE_HEADER structure, which is "the date and time the image was
> created by the linker" (see
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms680313%28v=vs.85%29.aspx
> ) is not correctly set. It returns 01/01/1970 as date (the local time
> vary from file to file)
>
> Can someone confirm that ? If yes, is it possible to fix this ?
>
> thank you
>
> Vincent Torri
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public