Wild 0.10


On August 4, the release took place Wild 0.10 - of a free linker written in Rust, primarily designed for fast program compilation on Linux. The linker performs the final stage of building: it combines object files and libraries into a ready-to-use executable file or shared library. Wild can be used as a replacement for GNU ld, LLD, and Mold, although the developers' ultimate goal — incremental linking — has not yet been implemented.

 

One of the main innovations is the support for the parameters --gdb-index and --no-gdb-index. When this feature is enabled, Wild creates a .gdb_index section in the output file with a debug information index. This allows GDB to find necessary symbols more quickly in large programs without generating an index separately after compilation. The implementation supports the ninth version of the GDB Index format; scanning, merging, and writing index operations have been parallelized.

 

The handling of linker scripts has been significantly expanded. Added support for:

  • the /DISCARD/ section to exclude unnecessary input sections;
  • user-defined program PHDRS headers;
  • the SIZEOF_HEADERS, DEFINED, and SEGMENT_START functions;
  • the AT keyword and the LOADADDR function;
  • conditional expressions with the ternary operator;
  • the SORT, SORT_BY_NAME, and SORT_BY_ALIGNMENT commands;
  • the __bss_start symbol;
  • output section filling patterns;
  • the OUTPUT_FORMAT and OUTPUT_ARCH commands;
  • multiple relative counters for the current address.

 

Full compatibility with GNU ld has not yet been achieved. For example, some capabilities of the MEMORY command, OVERLAY sections, and certain methods of section placement remain unfinished. The developers are separately maintaining a table of capabilities needed for linking the Linux kernel.

 

Improved performance when placing build results on Btrfs and VFAT. Wild now automatically uses the --no-mmap-output-file mode and does not map the output file into memory via mmap. In a test conducted by the developer with Zed linking on Btrfs, the time decreased from approximately 2.6-2.8 seconds to 1.5-1.8 seconds. However, the author of the change warns that even after optimization, Btrfs in this scenario remains significantly slower than tmpfs; for Ext4 and XFS, using mmap turned out to be more beneficial.

The transfer of Wild to other formats and platforms continues. The experimental version for WebAssembly is already capable of linking a number of programs, while the Mach-O port supports basic executable files. Work has begun on 32-bit target platforms, which should simplify the use of Wild in the development of embedded systems. Additionally, initial processing of PowerPC64 ELFv2 object files has been added, and support for Mach-O continues to be developed, including universal object files and direct linking with dynamic libraries. These ports should not yet be considered ready for everyday use.

The library version of the linker, libwild, can now take input files and save the result directly in memory. This allows other programs to embed Wild without the need to create intermediate files on disk. Furthermore, the library no longer overrides the global thread pool of Rayon, and support for Zstandard compression can be disabled during the build.

The release includes numerous fixes for x86-64, AArch64, RISC-V, and LoongArch64. Errors in handling TLS, PLT, LTO, compressed debug info, large alignments, and relocations in PIE and shared objects have been resolved. Potential crashes while parsing linker scripts and issues with the creation of .tbss, .strtab, and .eh_frame sections have been corrected.

 

Wild supports Linux on the x86-64, AArch64, and RISC-V architectures; support for LoongArch64 and PowerPC64LE is currently designated as initial. The linker can be installed from pre-built archives, via cargo-binstall, Homebrew, Nix, or with the command cargo install --locked wild-linker. The source code is distributed at the user's choice under the Apache 2.0 or MIT licenses.

 

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster