Release of Mold 1.1 builder developed by LLVM lld

A release of the Mold linker has been published, which can be used as a faster transparent replacement for the GNU linker on Linux systems. The project is developed by the author of the linker LLVM lld. A key feature of Mold is the very high speed of linking object files, which is noticeably ahead of the GNU gold and LLVM lld linkers (linking in Mold is only twice as fast as simply copying files with the cp utility). The code is written in C++ (C++20) and distributed under the AGPLv3 license.

In the new version:

  • Added support for optimization at the linking stage (LTO, Link Time Optimization). LTO optimizations differ by taking into account the state of all files involved in the build process, while traditional optimization modes optimize each file individually and do not take into account the conditions for calling functions defined in other files. Previously, when GCC or LLVM intermediate code (IR) files were found, the appropriate linkers ld.bfd or ld.lld were called, but now Mold handles IR files on its own and uses the Linker Plugin API, also used in the GNU ld and GNU gold linkers. The speed when LTO is enabled is only marginally faster than other linkers, as most of the time is spent doing code optimizations, not linking.
  • Added support for RISC-V (RV64) architecture on the host side and target platforms.
  • Added "--emit-relocs" option to enable copying of address relocation sections (relocation) from input files to final files for subsequent application of optimizations at the post-binding stage.
  • Added "--shuffle-sections" option to randomize the order of sections before fixing their addresses in the virtual address space.
  • Added "--print-dependencies" and "--print-dependencies=full" options to output in CSV format information about dependencies between input files, which, for example, can be used to analyze connection reasons when linking certain object files or when doing minification work dependencies between files.
  • Added "--warn-once" and "--warn-textrel" options.
  • Removed dependency on libxxhash.

Source: opennet.ru

Add a comment