Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2016-07-16 11:11:57 +0300
committerJb Evain <jb@evain.net>2016-07-16 11:11:57 +0300
commit504192a4f9b75a6252bef759a105f30df84ee713 (patch)
treedd064d72fbf5ffb1979afb0ab5647e07548b128d /Mono.Cecil.PE
parent630d1bb825c63a14b885e0982be0b885848d78f2 (diff)
Fix writing of timestamp in the pdb id
Diffstat (limited to 'Mono.Cecil.PE')
-rw-r--r--Mono.Cecil.PE/ImageWriter.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Mono.Cecil.PE/ImageWriter.cs b/Mono.Cecil.PE/ImageWriter.cs
index 905ea2b..f6a9286 100644
--- a/Mono.Cecil.PE/ImageWriter.cs
+++ b/Mono.Cecil.PE/ImageWriter.cs
@@ -43,7 +43,6 @@ namespace Mono.Cecil.PE {
readonly bool pe64;
readonly bool has_reloc;
- readonly internal uint time_stamp;
internal Section text;
internal Section rsrc;
@@ -67,7 +66,6 @@ namespace Mono.Cecil.PE {
this.GetWin32Resources ();
this.BuildTextMap ();
this.sections = (ushort) (has_reloc ? 2 : 1); // text + reloc?
- this.time_stamp = (uint) DateTime.UtcNow.Subtract (new DateTime (1970, 1, 1)).TotalSeconds;
}
void GetDebugHeader ()
@@ -195,7 +193,7 @@ namespace Mono.Cecil.PE {
WriteUInt32 (0x00004550); // Magic
WriteUInt16 (GetMachine ()); // Machine
WriteUInt16 (sections); // NumberOfSections
- WriteUInt32 (time_stamp);
+ WriteUInt32 (metadata.time_stamp);
WriteUInt32 (0); // PointerToSymbolTable
WriteUInt32 (0); // NumberOfSymbols
WriteUInt16 (SizeOfOptionalHeader ()); // SizeOfOptionalHeader
@@ -590,7 +588,7 @@ namespace Mono.Cecil.PE {
void WriteDebugDirectory ()
{
WriteInt32 (debug_directory.Characteristics);
- WriteUInt32 (time_stamp);
+ WriteUInt32 (metadata.time_stamp);
WriteInt16 (debug_directory.MajorVersion);
WriteInt16 (debug_directory.MinorVersion);
WriteInt32 (debug_directory.Type);