Wild 0.10


2

The graduation took place on August 4th Wild 0.10 — a free linker written in Rust and designed primarily for quickly building programs in LinuxThe linker performs the final stage of the build: combining object files and libraries into a final executable or shared library. Wild can be used as a replacement for GNU ld, LLD, and Mold, although the developers' stated ultimate goal is incremental linking. not yet implemented.

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

Composer scripting has been significantly expanded. Support has been added for:

  • /DISCARD/ sections to exclude unnecessary input sections;
  • PHDRS custom program titles;
  • functions SIZEOF_HEADERS, DEFINED and SEGMENT_START;
  • the AT keyword and the LOADADDR function;
  • conditional expressions with ternary operator;
  • SORT, SORT_BY_NAME and SORT_BY_ALIGNMENT commands;
  • symbol __bss_start;
  • templates for filling output sections;
  • OUTPUT_FORMAT and OUTPUT_ARCH commands;
  • several relative counters of the current address.

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

Performance has been improved when storing build results on Btrfs and VFAT. Wild now automatically uses the --no-mmap-output-file mode and does not mmap the output file into memory. In a developer-conducted test of Zed linking on Btrfs, the time was reduced from approximately 2,6–2,8 to 1,5–1,8 seconds. However, the author of the change warns that even after optimization, Btrfs remains significantly slower than tmpfs in this scenario; for Ext4 and XFS, using mmap, on the other hand, proved more advantageous.

Wild continues to be ported to other formats and platforms. An experimental version for WebAssembly can already link a range of programs, while a port for Mach-O can link basic executables. Work has begun on 32-bit target platforms, which should further simplify Wild's use in embedded systems development. Initial processing of PowerPC64 ELFv2 object files has also been added, and Mach-O support continues to develop, including universal object files and direct linking with dynamic libraries. These ports should not yet be considered ready for everyday use.

The libwild linker can now accept input files and store the output directly in memory. This allows other programs to embed Wild without necessarily creating intermediate files on disk. Furthermore, the library no longer overrides the global Rayon thread pool, and support for Zstandard compression can be disabled at build time.

This release includes numerous fixes for x86-64, AArch64, RISC-V, and LoongArch64. These fixes include errors handling TLS, PLT, LTO, compressed debug information, large alignments, and relocations in PIE and shared objects. Potential crashes during linker script parsing and errors generating .tbss, .strtab, and .eh_frame sections are also fixed.

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

Source: linux.org.ru

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