---
title: "mold 3.0.0"
slug: mold-3-0-0
url: https://listedarticles.com/articles/mold-3-0-0
canonical_url: https://github.com/rui314/mold/releases/tag/v3.0.0
content_type: changelog
language: en
published_at: 2026-10-05T10:23:19.000Z
updated_at: 2026-10-06T02:18:11.403Z
author: "Rui Ueyama"
author_url: https://github.com/rui314
authored_by: human
publisher: "mold"
publisher_url: https://github.com/rui314/mold
topics: ["Rust", "Linkers", "Open Source", "Developer Tools"]
license: all-rights-reserved
word_count: 1254
reading_minutes: 5
citation: "Rui Ueyama, mold. \"mold 3.0.0.\" 5 Oct 2026. https://github.com/rui314/mold/releases/tag/v3.0.0 (all-rights-reserved)"
# The full text follows. The web page shows an extract and sends readers
# to the source above; quote the citation and link the canonical URL.
---

# mold 3.0.0

> mold 3.0.0 is the first release of the high-speed linker after its rewrite from C++ to Rust: a drop-in replacement for 2.42.1 with the same options, targets, and linking performance, bounds-checked reads on corrupted input, a Cargo-based build, and a long list of bug fixes and compatibility improvements across architectures.

# mold 3.0.0

mold 3.0.0 is a new major release of the high-speed linker. As we announced in the [2.42.1 release notes](https://github.com/rui314/mold/releases/tag/v2.42.1), we have rewritten mold from C++ to Rust, and this is the first release of the Rust version. 2.42.1 is the last release of the C++ version. The goal of mold 3.x is to close the remaining compatibility gaps with GNU ld, particularly in linker script support, and to pave the way for mold to be adopted as the default linker in Linux distributions.

mold 3.0 is meant to be a drop-in replacement for 2.42.1. It accepts the same command-line options, supports the same target architectures, and produces the same output except for the bug fixes listed below. Linking performance remains on par with 2.42.1. We verified compatibility by running the test suite on every supported target, comparing linker output across a broad range of real-world workloads and option combinations, and building all Gentoo packages. We found no regressions.

The move to Rust also makes mold safer with corrupted input files. The C++ version could read memory out of bounds on such input and crash with a segmentation fault. In mold 3.0, those reads are bounds-checked, so mold stops with a panic at the faulty access instead.

If you build mold yourself, note that the build system has changed. See "Build Changes" below.

## Build Changes

- mold is now built with Cargo instead of CMake. It requires Rust 1.95 or later and a C compiler. Run `cargo build --release` to build mold and `./install-mold.sh` to install it; the install script accepts `PREFIX` and `DESTDIR`. The CMake options have been removed.
- If you install mold's libraries into a directory other than `$PREFIX/lib`, such as `/usr/lib64`, set the `MOLD_LIBDIR` environment variable to that directory both when building and when installing mold, so that `mold -run` can find `mold-wrapper.so`.
- mold no longer depends on [oneTBB](https://github.com/uxlfoundation/onetbb). It statically links mimalloc 3.5.3 as before; build with `--features system-allocator` to use the system's malloc instead. mold links the system's zlib if available and includes zstd and BLAKE3; set `ZSTD_SYS_USE_PKG_CONFIG=1` to link the system's zstd. ([56ee0f8](https://github.com/rui314/mold/commit/56ee0f8c1b5d4b4b10fcb008b3805875b09a7b9a))
- The `MOLD_TARGETS` CMake variable has been replaced with Cargo features. As before, distributions should build mold for all targets.
- The test suite now runs with `cargo test` instead of `ctest`. `install-build-deps.sh` has been replaced with `install-test-deps.sh`, which you need only to run the tests.

## Bug Fixes and Compatibility Improvements

- Fixed a crash when creating a statically-linked executable with a version script or `--default-symver`. ([f10b0c4](https://github.com/rui314/mold/commit/f10b0c40c8635605459b8586ce49ed1cad1c26c3))
- Fixed a crash or a corrupted output when the output file is also an input file, as in `mold -r -o foo.o foo.o bar.o`. ([d2b88ab](https://github.com/rui314/mold/commit/d2b88ab395b6628fb8e3070dace599eaa399257c))
- `--gc-sections` no longer removes the functions given by `--init` and `--fini`. ([c9e4cc4](https://github.com/rui314/mold/commit/c9e4cc4b6ef308a101de43773e613ccaa93dffa6))
- Common symbols of the same name with different sizes now get the largest size and the strictest alignment, as in GNU ld and lld. ([d5781d5](https://github.com/rui314/mold/commit/d5781d582c94bc74af84dd4af9ce9f66763993d4))
- `--icf=safe` no longer folds functions exported from a shared library, and `--icf=all` no longer crashes with `--emit-relocs`. ([ceab12c](https://github.com/rui314/mold/commit/ceab12c56b0d9d4aab0e8ed6a0adf59aa9a11692), [3dcd1df](https://github.com/rui314/mold/commit/3dcd1df3826e4cc7b9fab91351d2d41972a7e2c8))
- A versioned reference such as `foo@VER` in a shared library no longer pulls in an archive member that defines an unversioned `foo`. ([#1657](https://github.com/rui314/mold/issues/1657)) ([44bfa2a](https://github.com/rui314/mold/commit/44bfa2a9b227729ecd6de1261c462b98ef709ed0))
- Fixed several cases of nondeterministic output, in `--dependency-file`, `--repro`, `-r` with many COMDAT groups of the same name, and some dynamic relocations. ([5164561](https://github.com/rui314/mold/commit/516456132edf40bdd96b035be1365d97683c8127), [6d33903](https://github.com/rui314/mold/commit/6d33903650b2b4e49594d12aacb8b83a4440c879), [51e23d4](https://github.com/rui314/mold/commit/51e23d44d7b3badd06dc1254e4ef4833de6f79f6), [696ed71](https://github.com/rui314/mold/commit/696ed717894a456910b42c7f062f663ebb01a762))
- Fixed several `-r` bugs: C++ exceptions broke in code from the second and later input files; `-x`, `-X` and `-s` removed symbols that relocations referred to; `--gc-sections` dropped data that relocations referred to; `sh_link` of `SHF_LINK_ORDER` sections such as `.ARM.exidx` was not set; and mold crashed with `--strip-debug` and DWARF type units. ([0e41bb9](https://github.com/rui314/mold/commit/0e41bb98e4f4a2caa9d50ec7f26fb976583e3822), [3717460](https://github.com/rui314/mold/commit/37174600279b0e371f857b4ef79873d4bebc3ec5), [b2c3d1d](https://github.com/rui314/mold/commit/b2c3d1dc67d8e38e9a49ec30e383fe686c6dfc45), [9aacb62](https://github.com/rui314/mold/commit/9aacb62c03ad2ac04823482b0bed8c5cb1d50c78), [a247ca2](https://github.com/rui314/mold/commit/a247ca27d33c90a6b246a7bd107c31835f1a1dc6), [e41ed90](https://github.com/rui314/mold/commit/e41ed90846f1aa675ea6b1ec0168a3ead21221ac))
- GOT-relative relocations such as `R_X86_64_GOTOFF64`, and `R_ARM_REL32`, against symbols defined in shared libraries silently got wrong addresses. They are now handled correctly or reported as errors. ([#1668](https://github.com/rui314/mold/issues/1668)) ([659780e](https://github.com/rui314/mold/commit/659780e6c4275348cd8c34cd9f8a7411662c4a47), [7fe68bf](https://github.com/rui314/mold/commit/7fe68bf1092bf280c043201e922b5d93a2776434))
- Errors for PC-relative relocations that can't be used in position-independent output now explain the cause and how to fix it. ([39e6a01](https://github.com/rui314/mold/commit/39e6a01e2565c437044cc87e6723667ac46c1dd9), [17b7b85](https://github.com/rui314/mold/commit/17b7b85a88df74d5a2b91b3f744cd325d1c8afa1))
- The following now cause errors instead of a broken output or a crash: `--defsym` aliasing a symbol defined in a shared library, an undefined non-weak hidden symbol in a shared library or with `--unresolved-symbols=ignore-all`, a `--defsym` value that doesn't fit in 64 bits, an allocated section that is also compressed, and `--strip-all` with `--emit-relocs`. ([56b862b](https://github.com/rui314/mold/commit/56b862b23c4eac4dc6f19437f0bd37e78636d81d), [b3566fa](https://github.com/rui314/mold/commit/b3566fac1ad60a6738afb96e6dd6ac223c6faba9), [e3a89f2](https://github.com/rui314/mold/commit/e3a89f222d5ecd7a44d03f7f2a3806ec28ecbce1), [a980054](https://github.com/rui314/mold/commit/a9800541d0e8956282c9e55a2fb4d4c4ae1b8c34), [8233a75](https://github.com/rui314/mold/commit/8233a75df11a161f6373fbdff9b592c3bc68d6a1))
- `--noinhibit-exec` no longer crashes on references to symbols in discarded COMDAT groups. ([8f17166](https://github.com/rui314/mold/commit/8f1716629741b423d401ae2e3b262af255af7d15), [80baa5d](https://github.com/rui314/mold/commit/80baa5dbacbf2514e71a2b2734f51f27f978aa6a))
- Options starting with a single dash are now read as GNU ld reads them. For example, `-entry=main` was read as `-e ntry=main`. ([#1671](https://github.com/rui314/mold/issues/1671), [#1670](https://github.com/rui314/mold/pull/1670)) ([830a860](https://github.com/rui314/mold/commit/830a8609aae795029b792391271fb0a8641a8a6c))
- `--dynamic-list-data`, `--lto-pseudo-probe-for-profiling` and `--thinlto-index-only` no longer consume the next argument, and `--no-color-diagnostics` is now accepted. ([2ca893e](https://github.com/rui314/mold/commit/2ca893e9abc8cffb131fc81c1871bac96aed8b93), [04b493e](https://github.com/rui314/mold/commit/04b493edf18bc62782e44730db7ecbb54610d407))
- If a version script lists a symbol in more than one version node, the first one now takes precedence, as in GNU ld and lld. ([b7048f5](https://github.com/rui314/mold/commit/b7048f555ad8c21d1f443b000938064f4357a5b4))
- Fixed relative paths with `-C`, `--chroot` and `--repro`. ([e3bc349](https://github.com/rui314/mold/commit/e3bc3490b72df8d3e4c2821ab66a56ca389d7e9b), [04e7dd8](https://github.com/rui314/mold/commit/04e7dd8f701a2071cf41c7be801028452f492da2), [a368d22](https://github.com/rui314/mold/commit/a368d2233d38ff7f423e17cab88a014451b679c9))
- mold no longer reserves 8 GiB of virtual address space at startup, so it works under `ulimit -v`. ([cc69390](https://github.com/rui314/mold/commit/cc6939014404509d092c577969c3ba4264803f9d), [b18be91](https://github.com/rui314/mold/commit/b18be913d56a88ca5d2c7ab7ed0ca450074f5b7d))
- `MOLD_JOBS` now works if `XDG_RUNTIME_DIR` is an empty string. ([8a360ff](https://github.com/rui314/mold/commit/8a360ff453c06f1de5c042ab3530c4bd82955ec1))
- Files created by `--separate-debug-file` no longer contain a `.gnu_debuglink` section. ([#1656](https://github.com/rui314/mold/issues/1656)) ([b56649e](https://github.com/rui314/mold/commit/b56649e972821ef84e001d2b6f05a16451687b06))
- mold no longer creates the meaningless `__start_EHDR`, `__stop_EHDR`, `__start_PHDR` and `__stop_PHDR` symbols. ([0ee71d3](https://github.com/rui314/mold/commit/0ee71d395c0cf1fd62a749f2d5a71f5e3f594733))
- [AArch64][PPC32][ARM32] Fixed calls to static functions in other sections through range extension thunks, which jumped to wrong addresses in large programs such as the ARM64 debug build of Chromium. ([4165d0e](https://github.com/rui314/mold/commit/4165d0e82e8a4bb581d7ca7e83f61a712038fe87), [9b91621](https://github.com/rui314/mold/commit/9b91621465530ceb146dde7dad7bf15fd22a1be2))
- [AArch64] Added support for more relocation types, such as `R_AARCH64_TSTBR14` and `R_AARCH64_GOT_LD_PREL19`. ([96d0282](https://github.com/rui314/mold/commit/96d02824eed0df3390e9430abd9358e92313a54f), [a4b64d8](https://github.com/rui314/mold/commit/a4b64d86b49869361a1d57c03d36ad098d479eff))
- [ARM32] Added support for more relocation types, such as `R_ARM_ALU_PC_G0` and `R_ARM_THM_PC12`, and fixed `-r` output for big-endian ARM. ([c0f9cd6](https://github.com/rui314/mold/commit/c0f9cd66654b0a56ca8448b8700768363387ce44), [4c9aad3](https://github.com/rui314/mold/commit/4c9aad3726cb7f18d81efd14558bf43d674143de), [4c26f16](https://github.com/rui314/mold/commit/4c26f1649befa3c4d5c3f059ed09b92f15c1ccdd))
- [ARM32][i386] `-r` no longer corrupts instructions referred to by some branch and TLS relocations. ([1b17bdf](https://github.com/rui314/mold/commit/1b17bdf0d28e4ce2bd6dd9761f0c86e6aed0fa17))
- [RISC-V][LoongArch] Fixed calls to functions folded by `--icf=all` when relaxation shrinks them, and `R_RISCV_64` and `R_LARCH_64` relocations in 32-bit objects. ([52febe9](https://github.com/rui314/mold/commit/52febe9faeba71c5f2cf7fdc38f6fd81ebc80231), [5b22233](https://github.com/rui314/mold/commit/5b2223301787a20d1e10922c28c01927bc74d265))
- [RISC-V] Fixed TLSDESC with object files created by Clang 18, `--emit-relocs` with TLSDESC relaxation, the `EF_RISCV_TSO` flag, `R_RISCV_ALIGN` in `-r` output, and overflow checks for 32-bit PC-relative relocations. ([fdf8422](https://github.com/rui314/mold/commit/fdf84222d852028b0c02fcd4cbceefcc110fe5b2), [7c8b805](https://github.com/rui314/mold/commit/7c8b80520ac945b11b8e512b11422979f381d32e), [6b60f75](https://github.com/rui314/mold/commit/6b60f7582146112d9f7fd344ce7aa7b9db6c97ce), [4ba7792](https://github.com/rui314/mold/commit/4ba7792e43d1a186b4124dfbd4a6e6bc75c0257c), [85d55f3](https://github.com/rui314/mold/commit/85d55f3fa4d8246ddb07ac880ef8c6384734dcf1))
- [LoongArch] Added support for TLSDESC in the extreme code model, and fixed wrong values of `*64_PC_HI12` relocations and spurious overflow errors for TLS relocations. ([a36a161](https://github.com/rui314/mold/commit/a36a1611e6aa2238dd3e1115c20d21d53d7a48d7), [8133938](https://github.com/rui314/mold/commit/81339386c92c714bdeaa8448da6f3dd8294de112), [13e6cc0](https://github.com/rui314/mold/commit/13e6cc0d597734d334362c7f391c326062ba391d))
- [PPC32][m68k] A GOT too large for the 16-bit offsets that `-fpic` code uses is now reported as an error instead of being silently truncated. ([acc8854](https://github.com/rui314/mold/commit/acc8854e931f44034d3270f41b3f098b0e56a518), [614e2a0](https://github.com/rui314/mold/commit/614e2a032614caffe5e98667b4b4b96742ec51f5))
- [PPC64] Fixed IFUNC calls in statically-linked executables and `@got` references in hand-written assembly, and mold now synthesizes the `_savegpr0_*` family of functions for PPC64V1 as well. ([d3b2a74](https://github.com/rui314/mold/commit/d3b2a74fa0222463b5dfedef59fb2bd4970db20b), [b34a308](https://github.com/rui314/mold/commit/b34a3082e19b5b3ba8f519f21ef57ee8ec7a61c6), [efda2fc](https://github.com/rui314/mold/commit/efda2fc1490dbf39efd396dbb8080a567da25dae))
- [SH4] Fixed a crash when calling a function that returns a structure through the PLT, and C++ exceptions in programs linked from `-r` output. ([d9cf1f0](https://github.com/rui314/mold/commit/d9cf1f099e8468da6700f119f65e0088553d67da), [92161dd](https://github.com/rui314/mold/commit/92161ddf08243cc5ecbccb7ebfebd5dcef02ddf4))
- [SPARC64] Fixed branch instructions using `R_SPARC_WDISP16`, and `R_SPARC_OLO10` in `-r` output. ([6df3fd2](https://github.com/rui314/mold/commit/6df3fd23bb0bcde345144d12b098d81e839cc32b), [269fbb9](https://github.com/rui314/mold/commit/269fbb959ca6023338a8c0b3f2547c861a79cd1e))

## Acknowledgements

mold is an open-source project, and we accept donations via [GitHub Sponsors](https://github.com/sponsors/rui314) and [OpenCollective](https://opencollective.com/mold-linker). We thank everyone who sponsors our project. In particular, we would like to acknowledge the following organizations and people who have sponsored $32/month or more during this release cycle:

- [Cybozu, Inc.](https://github.com/cybozu-sponsorship)
- [SAP](https://github.com/SAP)
- [Mercedes-Benz Group](https://github.com/mercedes-benz)
- [Signal Slot Inc.](https://github.com/signal-slot)
- [Mercury](https://github.com/MercuryTechnologiesSponsorships)
- [G-Research Open Source Software](https://github.com/G-Research-OSS)
- [Jinkyu Yi](https://github.com/jincreator)
- [kraptor23](https://github.com/kraptor23)
- [Ahrefs](https://github.com/ahrefs)
- [Pedro Navarro](https://github.com/pedronavf)
- [Wei Wu](https://github.com/lazyparser)
- [daquexian](https://github.com/daquexian)
- [CubeSoft, Inc.](https://github.com/cube-soft)
- [Josh Triplett](https://github.com/joshtriplett)
- [nomeaning](https://github.com/nomeaning777)
