Skip to content

Commit 7014ed0

Browse files
wip: fix up timestamp in pdb, but mvids still out of sequence
1 parent 2fe2fe5 commit 7014ed0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/absil/ilwrite.fs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,10 +3873,11 @@ let writeBinaryAndReportMappings (outfile,
38733873
// Update MVID guid in metadata
38743874
Array.blit final 0 metadata guidStart 16
38753875

3876-
// Use last 4 bytes for timestamp
3877-
writeBytes os [| final.[16] ||| 128uy ; final.[17]; final.[18]; final.[19] |] // High bit set, to stop tool chains becoming confused
3878-
// Update pdbData with new guid
3879-
{ pdbData with ModuleID = final.[0..15] }
3876+
// Use last 4 bytes for timestamp - High bit set, to stop tool chains becoming confused
3877+
let timestamp = int final.[16] ||| (int final.[17] <<< 8) ||| (int final.[18] <<< 16) ||| (int (final.[19] ||| 128uy) <<< 24)
3878+
writeInt32 os timestamp
3879+
// Update pdbData with new guid and timestamp. // TOOD: this may need to be moved earlier, or MVID in pdb also fixed up (but difficult if compressed)
3880+
{ pdbData with ModuleID = final.[0..15] ; Timestamp = timestamp }
38803881
else
38813882
writeInt32 os timestamp // date since 1970
38823883
pdbData

0 commit comments

Comments
 (0)