|
|
|
|
|
by chisophugis
3409 days ago
|
|
Every incremental linking technique I'm aware of involves overwriting the output file and does not guarantee that identical input files and command line lead to identical (bit-exact) output files. Incremental linking is not so easy under that constraint, since the output depends on the previous output file (which may not even be there). (and considering the previous output file to be an "input file" follows the letter of the requirement but not the spirit; the idea is that the program invocation is a "pure function" of the inputs, which enables caching and eliminates a source of unpredictable behavior) We have had to reject certain parallelization strategies in LLD as well because even though the result would always be a semantically identical executable, it would not be bit-identical.
See e.g. the discussions surrounding parallel string merging:
https://reviews.llvm.org/D27146 <-- fastest technique, but non-deterministic output
https://reviews.llvm.org/D27152 <-- slower but deterministic technique
https://reviews.llvm.org/D27155 <-- really cool technique that relies on a linearly probed hash table (and sorting just runs of full buckets instead of the entire array) to guarantee deterministic output despite concurrent hash table insertion. |
|