mold 2.40.1 is a maintenance release of the high-speed linker. Although there are no new features in this release, it includes a few performance improvements as below.
Performance improvements
- We've eliminated unnecessary memory zero-initialization for the
--compress-debug-sections
option to make debug section compression faster. With this change, mold sometimes runs faster with--compress-debug-sections
than without it due to reduced file I/O. (d59c559) - Previously, mold used an exponential pattern-matching algorithm for glob matching, which could significantly slow down version scripts or dynamic list processing for certain glob patterns. Now, we use a linear-time algorithm that is guaranteed to run efficiently for any glob pattern. (dac20fa)
Bug Fixes and Compatibility Improvements
- mold now reports an error if the output
.dynsym
refers to a section whose section index is β₯65280, since such a dynamic symbol is not representable in ELF. Previously, mold crashed with an assertion failure. (0d8334e)