mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Fix apelink reproducible deterministic build bug
Thank you @dinosaure for reporting this issue and doing all the analysis that made this simple and easy to fix. Be sure to check out his projects like: https://github.com/dinosaure/esperanto, which lets you build OCaml programs as Actually Portable Executables using cosmocc. See https://github.com/jart/cosmopolitan/discussions/1265
This commit is contained in:
parent
1e9902af8b
commit
41fc76c2b8
1 changed files with 2 additions and 0 deletions
|
@ -679,6 +679,8 @@ static void LoadSymbols(Elf64_Ehdr *e, Elf64_Off size, const char *path) {
|
|||
struct SymbolTable *st = OpenSymbolTable(path);
|
||||
if (!st)
|
||||
Die(path, "could not load elf symbol table");
|
||||
st->names = 0; // make this deterministic
|
||||
st->name_base = 0; // ready for serialization
|
||||
size_t data_size;
|
||||
void *data = Deflate(st, st->size, &data_size);
|
||||
uint32_t crc = crc32_z(0, st, st->size);
|
||||
|
|
Loading…
Reference in a new issue