mold
mold copied to clipboard
Mold: A Modern Linker 🦠
### Steps to reproduce 1. `git clone https://github.com/mozilla/gecko-dev.git` 2. Install Rust (Version used: rustc 1.62.0-nightly (4dd8b420c 2022-05-01)) 3. Put the following in `mozconfig` ``` ac_add_options --enable-release --disable-cargo-incremental export RUSTC_OPT_LEVEL=2 mk_add_options...
I'm not sure how much important it is, but it would be nice to support RV32. For memory-constrained small systems, I believe there's a reason to compile programs to RV32...
Identical Code Folding (ICF) is a powerful optimization to reduce the size of a linker output. It merges functions that happen to be compiled to the identical machine code that...
Currently, mold fails if compiled with MemorySanitizer. This needs fixing. ``` $ make -j`nproc` CXX=clang++-14 CXXFLAGS='-fsanitize=memory -g -Og -fno-omit-frame-pointer' LDFLAGS='-fsanitize=memory -fuse-ld=lld' USE_MIMALLOC=0 test ... SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/fs_path.h:1262:14 in std::filesystem::__cxx11::path::filename()...
https://llvm.org/docs/GoldPlugin.html states that the LLVM LTO plugin must be distributed under GPLv3 because it uses a header file that is distributed as a part of GNU binutils. Currently, FreeBSD does...
We want to support the macOS/iOS target by mold 2.0.
`lld` did some nice "innovation" in the error reporting some time ago that I find quite helpful. Perhaps mold can adapt that? ``` ld: error: undefined symbol: std::basic_ostringstream::basic_ostringstream() >>> referenced...
I noticed that LTO is not run for partial linking: ``` $ cat partial.C class Container { public: virtual ~Container (); }; class List : public Container { }; static...
Thanks for creating mold and making it so easy to use with rust and cargo. I have been running it on my personal machine and can report anecdata about the...
Issue is from trying to rebuild python2 with clang 14.0.1 and mold 1.2.1 on ChromeOS `conftest.c` ``` /* confdefs.h */ #define _GNU_SOURCE 1 #define _NETBSD_SOURCE 1 #define __BSD_VISIBLE 1 #define...