github rui314/mold v1.3.0
mold 1.3.0

latest releases: v2.31.0, v2.30.0, v2.4.1...
23 months ago

mold 1.3.0 is a new release of the high-speed linker. This release contains a few new features and general stability/compatibility improvements as shown below.

Note for those who create mold binary packages: if you are building mold for binary distribution, please link the bundled libtbb statically (which is default) or rebuild your distro's libtbb package with my patch so that mold's Link-Time Optimization (LTO) works reliably under a heavy load.

Bug fixes and compatibility improvements

  • The --icf=safe option has been supported. This option enables a feature to find and deduplicate identical code that can be merged safely. For C++ programs, it typically reduces the output binary size by a few percent. --icf=safe needs to be used with a compiler that supports .llvm_addrsig section; if a compiler does not support it, --icf=safe doesn't do any harm but cannot optimize a given program at all. That section is supported by LLVM/Clang at the moment, and we are working on adding it to GCC. (#484, 27908af)
  • LTO now works reliably under a heavy load. mold used to abort occasionally under such condition on Linux due to a spurious failure of pthread_create(2). (d8a8877)
  • mold now prints out undefined symbol errors in a format similar to LLVM lld. (13816a1)
  • mold now prints out a better error message for the disk full situation. (5969260)
  • mold can now build GCC 12 with LTO. (708ad63)
  • Fixed an LTO issue on 32-bits hosts such as i686. (920266b)
  • mold is now AddressSanitizer and UndefinedSanitizer clean. (fafb75b, 3499ee6)
  • mold used to create broken debug info on 32-bits hosts (#490). The bug has been fixed. (0abd0a4)
  • mold used to accept not only a single dash but also double dashes for single-letter options. For example, --S was accidentally accepted as an alias for-S. This is unconventional, and such options are no longer accepted. (232dafa)
  • --color-diagnostics is now an alias for --color-diagnostics=auto instead of --color-diagnostics=always for compatibility with LLVM lld.
  • pkg-config is no longer needed to build mold.
  • The --package-metadata option is supported. (#505, e9f6715)

Removed features

  • An experimental --preload flag has been removed. (a85b1f5)

Acknowledgements

mold is an open-source project, and we accept donations via GitHub Sponsors and OpenCollective. We thank you to everybody who sponsors our project. In particular, we'd like to acknowledge the following organizations and people who have sponsored $32/mo or more during this release cycle:

We'd also like to thank HPC Engineering at AWS to donate $5,000 AWS credits to us.

Don't miss a new mold release

NewReleases is sending notifications on new releases.