@@ -305,16 +305,16 @@ final class LibElf : Library
305305 static assert (0 , " unsupported operating system" );
306306
307307 time_t file_time = 0 ;
308-
308+
309309 // Use deterministic timestamp instead of current time
310310 import dmd.root.hash : calcHash;
311311 // Create a hash from the object module content
312312 if (om.base && om.length > 0 )
313313 file_time = calcHash(om.base[0 .. om.length]);
314-
314+
315315 // Add fixed value to make the hash recognizable (start from 1970s)
316316 file_time = (file_time & 0x7FFFFFFF ) | 0x40000000 ;
317-
317+
318318 om.file_time = cast (long )file_time;
319319 om.file_mode = (1 << 15 ) | (6 << 6 ) | (4 << 3 ) | (4 << 0 ); // 0100644
320320 }
@@ -443,31 +443,31 @@ private:
443443 om.length = cast (uint )(hoffset - (8 + ElfLibHeader.sizeof));
444444 om.offset = 8 ;
445445 om.name = " " ;
446-
446+
447447 // Use deterministic timestamp instead of current time
448448 // Calculate a hash based on library contents
449449 import dmd.root.hash : calcHash;
450-
450+
451451 // Collect all symbol and module data in a buffer
452452 OutBuffer hashBuf;
453453 foreach (os; objsymbols)
454454 {
455455 // Add symbol names to the buffer
456456 hashBuf.writestring(os.name);
457-
457+
458458 // Add module content to the buffer if available
459459 if (os.om && os.om.base && os.om.length > 0 )
460460 hashBuf.write(os.om.base[0 .. os.om.length]);
461461 }
462-
462+
463463 // Calculate the hash from the buffer
464464 om.file_time = 0 ;
465465 if (hashBuf.length > 0 )
466466 om.file_time = calcHash(hashBuf.buf[0 .. hashBuf.length]);
467-
467+
468468 // Add fixed value to make the hash recognizable (start from 1970s)
469469 om.file_time = (om.file_time & 0x7FFFFFFF ) | 0x40000000 ;
470-
470+
471471 om.user_id = 0 ;
472472 om.group_id = 0 ;
473473 om.file_mode = 0 ;
0 commit comments