Copy disabled (too large)
Download .txt
Showing preview only (17,974K chars total). Download the full file to get everything.
Repository: rui314/mold
Branch: main
Commit: fc96c1b9efe6
Files: 2520
Total size: 25.6 MB
Directory structure:
gitextract_f0ho13on/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── build-all.yml
│ ├── build-native.yml
│ ├── ci.yml
│ ├── install-extras.sh
│ ├── release-assets.yml
│ ├── run-msan.sh
│ └── update-manpage.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── dist.sh
├── docs/
│ ├── bugs.md
│ ├── coding-guidelines.md
│ ├── design.md
│ ├── execstack.md
│ ├── glossary.md
│ ├── memory-sanitizer.md
│ ├── mold.1
│ └── mold.md
├── install-build-deps.sh
├── install-cross-tools.sh
├── lib/
│ ├── aho-corasick.cc
│ ├── atomics.h
│ ├── bitvector.h
│ ├── compress.cc
│ ├── config.h.in
│ ├── crc32.cc
│ ├── demangle.cc
│ ├── filepath.cc
│ ├── gentoo-test.sh
│ ├── glob.cc
│ ├── hyperloglog.cc
│ ├── integers.h
│ ├── lib.h
│ ├── perf.cc
│ ├── random.cc
│ ├── siphash.h
│ ├── tar.cc
│ └── update-git-hash.cmake
├── src/
│ ├── arch-arm32.cc
│ ├── arch-arm64.cc
│ ├── arch-i386.cc
│ ├── arch-loongarch.cc
│ ├── arch-m68k.cc
│ ├── arch-ppc32.cc
│ ├── arch-ppc64v1.cc
│ ├── arch-ppc64v2.cc
│ ├── arch-riscv.cc
│ ├── arch-s390x.cc
│ ├── arch-sh4.cc
│ ├── arch-sparc64.cc
│ ├── arch-x86-64.cc
│ ├── archive-file.cc
│ ├── cmdline.cc
│ ├── elf.cc
│ ├── elf.h
│ ├── entry.cc
│ ├── error.cc
│ ├── filetype.cc
│ ├── gc-sections.cc
│ ├── gdb-index.cc
│ ├── icf.cc
│ ├── input-files.cc
│ ├── input-sections.cc
│ ├── jobs-unix.cc
│ ├── jobs-win32.cc
│ ├── linker-script.cc
│ ├── lto-unix.cc
│ ├── lto-win32.cc
│ ├── lto.h
│ ├── main.cc
│ ├── mapfile.cc
│ ├── mapped-file-unix.cc
│ ├── mapped-file-win32.cc
│ ├── mold-wrapper.c
│ ├── mold.h
│ ├── output-chunks.cc
│ ├── output-file-unix.cc
│ ├── output-file-win32.cc
│ ├── passes.cc
│ ├── relocatable.cc
│ ├── shrink-sections.cc
│ ├── signal-unix.cc
│ ├── signal-win32.cc
│ ├── subprocess-unix.cc
│ ├── subprocess-win32.cc
│ ├── thunks.cc
│ └── tls.cc
├── test/
│ ├── CMakeLists.txt
│ ├── abs-error.sh
│ ├── absolute-symbols.sh
│ ├── allow-multiple-definition.sh
│ ├── ar-alignment.sh
│ ├── arch-aarch64-long-thunk.sh
│ ├── arch-aarch64-range-extension-thunk-disassembly.sh
│ ├── arch-aarch64-variant-pcs.sh
│ ├── arch-arm-abs-error.sh
│ ├── arch-arm-exidx-sentinel.sh
│ ├── arch-arm-range-extension-thunk-disassembly.sh
│ ├── arch-arm-range-extension-thunk.sh
│ ├── arch-arm-target1.sh
│ ├── arch-arm-thm-jump19.sh
│ ├── arch-arm-thm-jump8.sh
│ ├── arch-arm-thumb-interwork.sh
│ ├── arch-arm-tlsdesc.sh
│ ├── arch-armeb-be32.sh
│ ├── arch-i686-tls-module-base.sh
│ ├── arch-i686-tlsdesc.sh
│ ├── arch-loongarch64-mcmodel-extreme.sh
│ ├── arch-loongarch64-relax-call36.sh
│ ├── arch-loongarch64-relax-got-load.sh
│ ├── arch-loongarch64-relax-pcala-addi.sh
│ ├── arch-loongarch64-relax-tlsdesc.sh
│ ├── arch-ppc64le-save-restore-gprs.sh
│ ├── arch-riscv64-attributes.sh
│ ├── arch-riscv64-attributes2.sh
│ ├── arch-riscv64-global-pointer-dso.sh
│ ├── arch-riscv64-global-pointer.sh
│ ├── arch-riscv64-obj-compatible.sh
│ ├── arch-riscv64-relax-align.sh
│ ├── arch-riscv64-relax-got.sh
│ ├── arch-riscv64-relax-hi20.sh
│ ├── arch-riscv64-relax-j.sh
│ ├── arch-riscv64-reloc-overflow.sh
│ ├── arch-riscv64-symbol-size.sh
│ ├── arch-riscv64-variant-cc.sh
│ ├── arch-riscv64-weak-undef.sh
│ ├── arch-s390x-got.sh
│ ├── arch-x86_64-address-equality.sh
│ ├── arch-x86_64-apx-gotpcrelx.sh
│ ├── arch-x86_64-apx-gottpoff.sh
│ ├── arch-x86_64-apx-gottpoff2.sh
│ ├── arch-x86_64-apx-tlsdesc.sh
│ ├── arch-x86_64-empty-arg.sh
│ ├── arch-x86_64-empty-mergeable-section.sh
│ ├── arch-x86_64-emulation-deduction.sh
│ ├── arch-x86_64-exception-mcmodel-large.sh
│ ├── arch-x86_64-execstack-if-needed.sh
│ ├── arch-x86_64-function-multiversion.sh
│ ├── arch-x86_64-gnu-linkonce.sh
│ ├── arch-x86_64-gnu-retain.sh
│ ├── arch-x86_64-gotpcrelx.sh
│ ├── arch-x86_64-ifunc-alias.sh
│ ├── arch-x86_64-ifunc-export.sh
│ ├── arch-x86_64-incompatible-libs-linker-script.sh
│ ├── arch-x86_64-incompatible-libs-linker-script2.sh
│ ├── arch-x86_64-incompatible-libs.sh
│ ├── arch-x86_64-incompatible-libs2.sh
│ ├── arch-x86_64-incompatible-obj.sh
│ ├── arch-x86_64-init-array-readonly.sh
│ ├── arch-x86_64-init-array.sh
│ ├── arch-x86_64-isa-level.sh
│ ├── arch-x86_64-large-bss.sh
│ ├── arch-x86_64-mergeable-records.sh
│ ├── arch-x86_64-mergeable-strings-nonalloc.sh
│ ├── arch-x86_64-mergeable-strings.sh
│ ├── arch-x86_64-note-property.sh
│ ├── arch-x86_64-note-property2.sh
│ ├── arch-x86_64-note.sh
│ ├── arch-x86_64-note2.sh
│ ├── arch-x86_64-plt.sh
│ ├── arch-x86_64-preinit-array.sh
│ ├── arch-x86_64-relax.sh
│ ├── arch-x86_64-reloc-overflow.sh
│ ├── arch-x86_64-reloc-zero.sh
│ ├── arch-x86_64-reloc.sh
│ ├── arch-x86_64-section-alignment.sh
│ ├── arch-x86_64-section-name.sh
│ ├── arch-x86_64-tbss-only.sh
│ ├── arch-x86_64-tls-gd-mcmodel-large.sh
│ ├── arch-x86_64-tls-gd-to-ie.sh
│ ├── arch-x86_64-tls-large-tbss.sh
│ ├── arch-x86_64-tls-ld-mcmodel-large.sh
│ ├── arch-x86_64-tls-module-base.sh
│ ├── arch-x86_64-tlsdesc.sh
│ ├── arch-x86_64-unique.sh
│ ├── arch-x86_64-warn-execstack.sh
│ ├── arch-x86_64-warn-shared-textrel.sh
│ ├── arch-x86_64-warn-textrel.sh
│ ├── arch-x86_64-z-dynamic-undefined-weak.sh
│ ├── arch-x86_64-z-ibt.sh
│ ├── arch-x86_64-z-ibtplt.sh
│ ├── arch-x86_64-z-rewrite-endbr.sh
│ ├── arch-x86_64-z-rewrite-endbr2.sh
│ ├── arch-x86_64-z-rewrite-endbr3.sh
│ ├── arch-x86_64-z-shstk.sh
│ ├── arch-x86_64-z-text.sh
│ ├── as-needed-dso.sh
│ ├── as-needed-dso2.sh
│ ├── as-needed-weak.sh
│ ├── as-needed.sh
│ ├── audit.sh
│ ├── auxiliary.sh
│ ├── bno-symbolic.sh
│ ├── bsymbolic-functions.sh
│ ├── bsymbolic-non-weak-functions.sh
│ ├── bsymbolic-non-weak.sh
│ ├── bsymbolic.sh
│ ├── build-id.sh
│ ├── canonical-plt.sh
│ ├── cmdline.sh
│ ├── color-diagnostics.sh
│ ├── comment.sh
│ ├── common-archive.sh
│ ├── common-ref.sh
│ ├── common-symbols.sh
│ ├── common.inc
│ ├── compress-debug-sections-zstd.sh
│ ├── compress-debug-sections.sh
│ ├── compressed-debug-info.sh
│ ├── copyrel-alignment.sh
│ ├── copyrel-norelro.sh
│ ├── copyrel-protected.sh
│ ├── copyrel-relro.sh
│ ├── copyrel-relro2.sh
│ ├── copyrel.sh
│ ├── crel.sh
│ ├── ctors-in-init-array.sh
│ ├── dead-debug-sections.sh
│ ├── debug-macro-section.sh
│ ├── default-symver-version-script.sh
│ ├── default-symver.sh
│ ├── defsym-lto.sh
│ ├── defsym-missing-symbol.sh
│ ├── defsym.sh
│ ├── defsym2.sh
│ ├── demangle-cpp.sh
│ ├── demangle-rust.sh
│ ├── demangle.sh
│ ├── depaudit.sh
│ ├── depaudit2.sh
│ ├── dependency-file-lto.sh
│ ├── dependency-file-response-file.sh
│ ├── dependency-file.sh
│ ├── disable-new-dtags.sh
│ ├── discard-section.sh
│ ├── discard.sh
│ ├── dso-undef.sh
│ ├── dt-init.sh
│ ├── dt-needed.sh
│ ├── duplicate-error-archive.sh
│ ├── duplicate-error-gc-sections.sh
│ ├── duplicate-error-lto.sh
│ ├── duplicate-error.sh
│ ├── dynamic-dt-debug.sh
│ ├── dynamic-linker.sh
│ ├── dynamic-list-data.sh
│ ├── dynamic-list.sh
│ ├── dynamic-list2.sh
│ ├── dynamic-list3.sh
│ ├── dynamic-list4.sh
│ ├── dynamic.sh
│ ├── emit-relocs-cpp.sh
│ ├── emit-relocs-dead-sections.sh
│ ├── emit-relocs.sh
│ ├── empty-dso.sh
│ ├── empty-file.sh
│ ├── empty-input.sh
│ ├── empty-version.sh
│ ├── entry.sh
│ ├── exception-multiple-ehframe.sh
│ ├── exception.sh
│ ├── exclude-libs.sh
│ ├── exclude-libs2.sh
│ ├── exclude-libs3.sh
│ ├── execstack.sh
│ ├── execute-only.sh
│ ├── export-dynamic.sh
│ ├── export-from-exe.sh
│ ├── fatal-warnings.sh
│ ├── filler.sh
│ ├── filter.sh
│ ├── func-addr.sh
│ ├── gc-sections.sh
│ ├── gdb-index-compress-output.sh
│ ├── gdb-index-dwarf2.sh
│ ├── gdb-index-dwarf3.sh
│ ├── gdb-index-dwarf4.sh
│ ├── gdb-index-dwarf5.sh
│ ├── gdb-index-dwarf64.sh
│ ├── gdb-index-empty.sh
│ ├── gdb-index-split-dwarf.sh
│ ├── glibc-2.22-bug.sh
│ ├── global-offset-table.sh
│ ├── gnu-hash.sh
│ ├── gnu-property.sh
│ ├── gnu-retain.sh
│ ├── gnu-unique.sh
│ ├── gnu-warning.sh
│ ├── hash-style-sysv.sh
│ ├── hash-style.sh
│ ├── hello-dynamic.sh
│ ├── hello-static.sh
│ ├── help.sh
│ ├── hidden-archive.sh
│ ├── hidden-undef.sh
│ ├── hidden-weak-undef.sh
│ ├── icf-gcc-except-table.sh
│ ├── icf-safe.sh
│ ├── icf-small.sh
│ ├── icf.sh
│ ├── ifunc-address-equality-exported.sh
│ ├── ifunc-address-equality.sh
│ ├── ifunc-alias.sh
│ ├── ifunc-dlopen.sh
│ ├── ifunc-dso.sh
│ ├── ifunc-dynamic.sh
│ ├── ifunc-export.sh
│ ├── ifunc-funcptr.sh
│ ├── ifunc-noplt.sh
│ ├── ifunc-static-pie.sh
│ ├── ifunc-static.sh
│ ├── image-base.sh
│ ├── init-array-priorities.sh
│ ├── init-in-dso.sh
│ ├── init.sh
│ ├── initfirst.sh
│ ├── interpose.sh
│ ├── invalid-version-script.sh
│ ├── issue646.sh
│ ├── large-alignment-dso.sh
│ ├── large-alignment.sh
│ ├── large-max-page-size-strip.sh
│ ├── large-max-page-size.sh
│ ├── large-text.sh
│ ├── library.sh
│ ├── link-order.sh
│ ├── linker-script-defsym.sh
│ ├── linker-script-error.sh
│ ├── linker-script-relocatable.sh
│ ├── linker-script.sh
│ ├── linker-script2.sh
│ ├── linker-script3.sh
│ ├── linker-script4.sh
│ ├── linker-script5.sh
│ ├── linker-script6.sh
│ ├── lto-archive.sh
│ ├── lto-archive2.sh
│ ├── lto-archive3.sh
│ ├── lto-comdat.sh
│ ├── lto-dso.sh
│ ├── lto-gcc.sh
│ ├── lto-llvm.sh
│ ├── lto-llvm2.sh
│ ├── lto-no-plugin.sh
│ ├── lto-nostdlib.sh
│ ├── lto-version-script.sh
│ ├── main-in-dso.sh
│ ├── many-input-sections.sh
│ ├── many-input-sections2.sh
│ ├── many-output-sections.sh
│ ├── mcmodel-large.sh
│ ├── mergeable-strings.sh
│ ├── missing-but-ok.sh
│ ├── missing-error.sh
│ ├── mold-wrapper.sh
│ ├── mold-wrapper2.sh
│ ├── nmagic.sh
│ ├── no-allow-shlib-undefined-circular.sh
│ ├── no-allow-shlib-undefined.sh
│ ├── no-allow-shlib-undefined2.sh
│ ├── no-allow-shlib-undefined3.sh
│ ├── no-allow-shlib-undefined4.sh
│ ├── no-eh-frame-header.sh
│ ├── no-object-file.sh
│ ├── no-quick-exit.sh
│ ├── no-undefined-version.sh
│ ├── nocopyreloc.sh
│ ├── noinhibit-exec.sh
│ ├── non-canonical-plt.sh
│ ├── nostdlib.sh
│ ├── oformat-binary.sh
│ ├── omagic.sh
│ ├── package-metadata.sh
│ ├── physical-image-base.sh
│ ├── pie.sh
│ ├── plt-dso.sh
│ ├── plt-symbols.sh
│ ├── pltgot.sh
│ ├── preinit-array.sh
│ ├── print-dependencies.sh
│ ├── protected-dynsym.sh
│ ├── protected.sh
│ ├── push-pop-state.sh
│ ├── range-extension-thunk.sh
│ ├── range-extension-thunk2.sh
│ ├── range-extension-thunk3.sh
│ ├── range-extension-thunk4.sh
│ ├── relax-got-load.sh
│ ├── reloc-rodata.sh
│ ├── relocatable-archive.sh
│ ├── relocatable-c++.sh
│ ├── relocatable-compressed-debug-info.sh
│ ├── relocatable-debug-info.sh
│ ├── relocatable-exception.sh
│ ├── relocatable-many-sections.sh
│ ├── relocatable-merge-sections.sh
│ ├── relocatable-mergeable-sections.sh
│ ├── relocatable.sh
│ ├── relro-alignment.sh
│ ├── relro.sh
│ ├── repro.sh
│ ├── require-defined.sh
│ ├── response-file-quoting.sh
│ ├── response-file.sh
│ ├── response-file2.sh
│ ├── retain-symbols-file.sh
│ ├── reverse-sections.sh
│ ├── rodata-name.sh
│ ├── rosegment.sh
│ ├── rpath.sh
│ ├── run-clang.sh
│ ├── run.sh
│ ├── section-align.sh
│ ├── section-attributes.sh
│ ├── section-order.sh
│ ├── section-start.sh
│ ├── separate-debug-file-sort.sh
│ ├── separate-debug-file.sh
│ ├── shared-abs-sym.sh
│ ├── shared.sh
│ ├── shuffle-sections-seed.sh
│ ├── shuffle-sections.sh
│ ├── soname.sh
│ ├── sort-debug-info-compressed.sh
│ ├── sort-debug-info-merged.sh
│ ├── sort-debug-info.sh
│ ├── spare-program-headers.sh
│ ├── start-lib.sh
│ ├── start-stop-symbol.sh
│ ├── start-stop.sh
│ ├── static-archive.sh
│ ├── static-pie.sh
│ ├── stdout.sh
│ ├── strip-debug.sh
│ ├── strip.sh
│ ├── stt-common.sh
│ ├── symbol-rank.sh
│ ├── symbol-version-as-needed.sh
│ ├── symbol-version-lto.sh
│ ├── symbol-version-multi.sh
│ ├── symbol-version.sh
│ ├── symbol-version2.sh
│ ├── symbol-version3.sh
│ ├── symbol-version4.sh
│ ├── symbol-version5.sh
│ ├── symtab-dso.sh
│ ├── symtab-section-symbols.sh
│ ├── symtab.sh
│ ├── synthetic-symbols.sh
│ ├── sysroot-linker-script.sh
│ ├── sysroot.sh
│ ├── sysroot2.sh
│ ├── tail-call.sh
│ ├── tbss-only.sh
│ ├── textrel.sh
│ ├── textrel2.sh
│ ├── thin-archive.sh
│ ├── thread-count.sh
│ ├── tls-alignment-multi.sh
│ ├── tls-common.sh
│ ├── tls-df-static-tls.sh
│ ├── tls-dso.sh
│ ├── tls-gd-dlopen.sh
│ ├── tls-gd-noplt.sh
│ ├── tls-gd-to-ie.sh
│ ├── tls-gd.sh
│ ├── tls-ie.sh
│ ├── tls-irregular-start-addr.sh
│ ├── tls-large-alignment.sh
│ ├── tls-large-static-image.sh
│ ├── tls-ld-noplt.sh
│ ├── tls-ld.sh
│ ├── tls-le-error.sh
│ ├── tls-le.sh
│ ├── tls-nopic.sh
│ ├── tls-pic.sh
│ ├── tls-small-alignment.sh
│ ├── tlsdesc-dlopen.sh
│ ├── tlsdesc-import.sh
│ ├── tlsdesc-initial-exec.sh
│ ├── tlsdesc-local-dynamic.sh
│ ├── tlsdesc-static.sh
│ ├── tlsdesc.sh
│ ├── trace-symbol-symver.sh
│ ├── trace-symbol.sh
│ ├── trace.sh
│ ├── undefined-glob-gc-sections.sh
│ ├── undefined-glob.sh
│ ├── undefined.sh
│ ├── undefined2.sh
│ ├── unknown-section-type.sh
│ ├── unresolved-symbols.sh
│ ├── unresolved-symbols2.sh
│ ├── verbose.sh
│ ├── version-script-search-paths.sh
│ ├── version-script.sh
│ ├── version-script10.sh
│ ├── version-script11.sh
│ ├── version-script12.sh
│ ├── version-script13.sh
│ ├── version-script14.sh
│ ├── version-script15.sh
│ ├── version-script16.sh
│ ├── version-script17.sh
│ ├── version-script18.sh
│ ├── version-script19.sh
│ ├── version-script2.sh
│ ├── version-script20.sh
│ ├── version-script21.sh
│ ├── version-script22.sh
│ ├── version-script23.sh
│ ├── version-script3.sh
│ ├── version-script4.sh
│ ├── version-script5.sh
│ ├── version-script6.sh
│ ├── version-script7.sh
│ ├── version-script8.sh
│ ├── version-script9.sh
│ ├── version.sh
│ ├── versioned-undef.sh
│ ├── visibility.sh
│ ├── warn-common.sh
│ ├── warn-once.sh
│ ├── warn-symbol-type.sh
│ ├── warn-unresolved-symbols.sh
│ ├── weak-export-dso.sh
│ ├── weak-export-dso2.sh
│ ├── weak-export-exe.sh
│ ├── weak-undef-dso.sh
│ ├── weak-undef.sh
│ ├── weak-undef2.sh
│ ├── weak-undef4.sh
│ ├── weak-undef5.sh
│ ├── whole-archive.sh
│ ├── wrap-lto.sh
│ ├── wrap.sh
│ ├── z-cet-report.sh
│ ├── z-defs.sh
│ ├── z-dynamic-undefined-weak-exe.sh
│ ├── z-dynamic-undefined-weak.sh
│ ├── z-dynamic-undefined-weak2.sh
│ ├── z-max-page-size.sh
│ ├── z-nodefaultlib.sh
│ ├── z-nodump.sh
│ ├── z-now.sh
│ ├── z-origin.sh
│ ├── z-pack-relative-relocs.sh
│ ├── z-rodynamic.sh
│ ├── z-sectionheader.sh
│ ├── z-separate-code.sh
│ ├── z-stack-size.sh
│ ├── z-start-stop-visibility.sh
│ └── zero-to-bss.sh
└── third-party/
├── blake3/
│ ├── .cargo/
│ │ └── config.toml
│ ├── .git-blame-ignore-revs
│ ├── .github/
│ │ └── workflows/
│ │ ├── build_b3sum.py
│ │ ├── ci.yml
│ │ ├── tag.yml
│ │ └── upload_github_release_asset.py
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── LICENSE_A2
│ ├── LICENSE_A2LLVM
│ ├── LICENSE_CC0
│ ├── README.md
│ ├── b3sum/
│ │ ├── .gitignore
│ │ ├── Cargo.lock
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── main.rs
│ │ │ └── unit_tests.rs
│ │ ├── tests/
│ │ │ └── cli_tests.rs
│ │ └── what_does_check_do.md
│ ├── benches/
│ │ └── bench.rs
│ ├── build.rs
│ ├── reference_impl/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── reference_impl.rs
│ ├── src/
│ │ ├── ffi_avx2.rs
│ │ ├── ffi_avx512.rs
│ │ ├── ffi_neon.rs
│ │ ├── ffi_sse2.rs
│ │ ├── ffi_sse41.rs
│ │ ├── guts.rs
│ │ ├── hazmat.rs
│ │ ├── io.rs
│ │ ├── join.rs
│ │ ├── lib.rs
│ │ ├── platform.rs
│ │ ├── portable.rs
│ │ ├── rust_avx2.rs
│ │ ├── rust_sse2.rs
│ │ ├── rust_sse41.rs
│ │ ├── test.rs
│ │ ├── traits.rs
│ │ └── wasm32_simd.rs
│ ├── test_vectors/
│ │ ├── Cargo.toml
│ │ ├── cross_test.sh
│ │ ├── src/
│ │ │ ├── bin/
│ │ │ │ └── generate.rs
│ │ │ └── lib.rs
│ │ └── test_vectors.json
│ └── tools/
│ ├── compiler_version/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── main.rs
│ ├── instruction_set_support/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── release.md
├── mimalloc/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── SECURITY.md
│ ├── azure-pipelines.yml
│ ├── bin/
│ │ ├── mimalloc-redirect-arm64.lib
│ │ ├── mimalloc-redirect-arm64ec.lib
│ │ ├── mimalloc-redirect.lib
│ │ ├── mimalloc-redirect32.lib
│ │ └── readme.md
│ ├── cmake/
│ │ ├── JoinPaths.cmake
│ │ ├── mimalloc-config-version.cmake
│ │ └── mimalloc-config.cmake
│ ├── contrib/
│ │ ├── docker/
│ │ │ ├── alpine/
│ │ │ │ └── Dockerfile
│ │ │ ├── alpine-arm32v7/
│ │ │ │ └── Dockerfile
│ │ │ ├── manylinux-x64/
│ │ │ │ └── Dockerfile
│ │ │ └── readme.md
│ │ └── vcpkg/
│ │ ├── portfile.cmake
│ │ ├── readme.md
│ │ ├── usage
│ │ ├── vcpkg-cmake-wrapper.cmake
│ │ └── vcpkg.json
│ ├── doc/
│ │ ├── doxyfile
│ │ ├── mimalloc-doc.h
│ │ └── mimalloc-doxygen.css
│ ├── ide/
│ │ └── vs2022/
│ │ ├── mimalloc-lib.vcxproj
│ │ ├── mimalloc-lib.vcxproj.filters
│ │ ├── mimalloc-override-dll.vcxproj
│ │ ├── mimalloc-override-dll.vcxproj.filters
│ │ ├── mimalloc-override-test-dep.vcxproj
│ │ ├── mimalloc-override-test.vcxproj
│ │ ├── mimalloc-test-api.vcxproj
│ │ ├── mimalloc-test-stress.vcxproj
│ │ ├── mimalloc-test.vcxproj
│ │ └── mimalloc.sln
│ ├── include/
│ │ ├── mimalloc/
│ │ │ ├── atomic.h
│ │ │ ├── internal.h
│ │ │ ├── prim.h
│ │ │ ├── track.h
│ │ │ └── types.h
│ │ ├── mimalloc-new-delete.h
│ │ ├── mimalloc-override.h
│ │ ├── mimalloc-stats.h
│ │ └── mimalloc.h
│ ├── mimalloc.pc.in
│ ├── readme.md
│ ├── src/
│ │ ├── alloc-aligned.c
│ │ ├── alloc-override.c
│ │ ├── alloc-posix.c
│ │ ├── alloc.c
│ │ ├── arena-abandon.c
│ │ ├── arena.c
│ │ ├── bitmap.c
│ │ ├── bitmap.h
│ │ ├── free.c
│ │ ├── heap.c
│ │ ├── init.c
│ │ ├── libc.c
│ │ ├── options.c
│ │ ├── os.c
│ │ ├── page-queue.c
│ │ ├── page.c
│ │ ├── prim/
│ │ │ ├── emscripten/
│ │ │ │ └── prim.c
│ │ │ ├── osx/
│ │ │ │ ├── alloc-override-zone.c
│ │ │ │ └── prim.c
│ │ │ ├── prim.c
│ │ │ ├── readme.md
│ │ │ ├── unix/
│ │ │ │ └── prim.c
│ │ │ ├── wasi/
│ │ │ │ └── prim.c
│ │ │ └── windows/
│ │ │ ├── etw-mimalloc.wprp
│ │ │ ├── etw.h
│ │ │ ├── etw.man
│ │ │ ├── prim.c
│ │ │ └── readme.md
│ │ ├── random.c
│ │ ├── segment-map.c
│ │ ├── segment.c
│ │ ├── static.c
│ │ └── stats.c
│ └── test/
│ ├── CMakeLists.txt
│ ├── main-override-dep.cpp
│ ├── main-override-dep.h
│ ├── main-override-static.c
│ ├── main-override.c
│ ├── main-override.cpp
│ ├── main.c
│ ├── readme.md
│ ├── test-api-fill.c
│ ├── test-api.c
│ ├── test-stress.c
│ ├── test-wrong.c
│ └── testhelper.h
├── rust-demangle/
│ ├── .clang-format
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── LICENSE-APACHE
│ ├── LICENSE-MIT
│ ├── README.md
│ ├── rust-demangle.c
│ ├── rust-demangle.h
│ └── test-harness/
│ ├── Cargo.toml
│ ├── build.rs
│ ├── examples/
│ │ └── check-csv-dataset.rs
│ ├── src/
│ │ └── lib.rs
│ └── tests/
│ ├── legacy.rs
│ ├── top_level.rs
│ └── v0.rs
├── tbb/
│ ├── .bazelrc
│ ├── .bazelversion
│ ├── .gitattributes
│ ├── .github/
│ │ ├── CODEOWNERS
│ │ ├── ISSUE_TEMPLATE/
│ │ │ ├── 1_question.md
│ │ │ ├── 2_bug_report.md
│ │ │ ├── 3_feature_request.md
│ │ │ └── 4_documentation.md
│ │ ├── dependabot.yml
│ │ ├── issue_labeler.yml
│ │ ├── labeler.yml
│ │ ├── pull_request_template.md
│ │ ├── scripts/
│ │ │ └── codespell.sh
│ │ └── workflows/
│ │ ├── ci.yml
│ │ ├── codeql.yml
│ │ ├── coverity.yml
│ │ ├── issue_labeler.yml
│ │ ├── labeler.yml
│ │ └── ossf-scorecard.yml
│ ├── .gitignore
│ ├── BUILD.bazel
│ ├── Bazel.md
│ ├── CMakeLists.txt
│ ├── CODEOWNERS
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── INSTALL.md
│ ├── LICENSE.txt
│ ├── MAINTAINERS.md
│ ├── MODULE.bazel
│ ├── README.md
│ ├── RELEASE_NOTES.md
│ ├── SECURITY.md
│ ├── SUPPORT.md
│ ├── SYSTEM_REQUIREMENTS.md
│ ├── WASM_Support.md
│ ├── WORKSPACE.bazel
│ ├── cmake/
│ │ ├── README.md
│ │ ├── android/
│ │ │ ├── device_environment_cleanup.cmake
│ │ │ ├── environment.cmake
│ │ │ └── test_launcher.cmake
│ │ ├── compilers/
│ │ │ ├── AppleClang.cmake
│ │ │ ├── Clang.cmake
│ │ │ ├── GNU.cmake
│ │ │ ├── Intel.cmake
│ │ │ ├── IntelLLVM.cmake
│ │ │ ├── MSVC.cmake
│ │ │ └── QCC.cmake
│ │ ├── config_generation.cmake
│ │ ├── hwloc_detection.cmake
│ │ ├── memcheck.cmake
│ │ ├── packaging.cmake
│ │ ├── post_install/
│ │ │ └── CMakeLists.txt
│ │ ├── python/
│ │ │ └── test_launcher.cmake
│ │ ├── resumable_tasks.cmake
│ │ ├── sanitize.cmake
│ │ ├── scripts/
│ │ │ └── cmake_gen_github_configs.cmake
│ │ ├── suppressions/
│ │ │ ├── lsan.suppressions
│ │ │ └── tsan.suppressions
│ │ ├── templates/
│ │ │ ├── TBBConfig.cmake.in
│ │ │ └── TBBConfigVersion.cmake.in
│ │ ├── test_spec.cmake
│ │ ├── toolchains/
│ │ │ ├── mips.cmake
│ │ │ └── riscv64.cmake
│ │ ├── utils.cmake
│ │ └── vars_utils.cmake
│ ├── doc/
│ │ ├── Doxyfile.in
│ │ ├── DoxygenLayout.xml
│ │ ├── GSG/
│ │ │ ├── get_started.rst
│ │ │ ├── installation.rst
│ │ │ ├── integrate.rst
│ │ │ ├── intro_gsg.rst
│ │ │ ├── next_steps.rst
│ │ │ ├── samples.rst
│ │ │ └── system_requirements.rst
│ │ ├── README.md
│ │ ├── _static/
│ │ │ ├── custom.js
│ │ │ └── theme_overrides.css
│ │ ├── conf.py
│ │ ├── index/
│ │ │ ├── index_intro.rst
│ │ │ ├── toctree.rst
│ │ │ └── useful_topics.rst
│ │ ├── index.rst
│ │ ├── main/
│ │ │ ├── _templates/
│ │ │ │ └── layout.html
│ │ │ ├── examples_testing/
│ │ │ │ └── CMakeLists.txt
│ │ │ ├── intro/
│ │ │ │ ├── Benefits.rst
│ │ │ │ ├── help_support.rst
│ │ │ │ ├── intro_os.rst
│ │ │ │ ├── limitations.rst
│ │ │ │ ├── notation.rst
│ │ │ │ └── testing_approach.rst
│ │ │ ├── reference/
│ │ │ │ ├── blocked_nd_range_ctad.rst
│ │ │ │ ├── blocking_terminate.rst
│ │ │ │ ├── concurrent_lru_cache_cls.rst
│ │ │ │ ├── constraints_extensions.rst
│ │ │ │ ├── constructors_for_nodes.rst
│ │ │ │ ├── custom_mutex_chmap.rst
│ │ │ │ ├── examples/
│ │ │ │ │ ├── blocked_nd_range_ctad_example.cpp
│ │ │ │ │ ├── custom_mutex_chmap_example.cpp
│ │ │ │ │ ├── fixed_pool_example.cpp
│ │ │ │ │ ├── helpers_for_expressing_graphs_preview_api_example.cpp
│ │ │ │ │ ├── helpers_for_expressing_graphs_regular_api_example.cpp
│ │ │ │ │ ├── make_edges_function_example.cpp
│ │ │ │ │ ├── malloc_replacement_log_example.cpp
│ │ │ │ │ ├── memory_pool_allocator_example.cpp
│ │ │ │ │ ├── memory_pool_example.cpp
│ │ │ │ │ ├── parallel_phase_example.cpp
│ │ │ │ │ ├── parallel_sort_ranges_extension_example.cpp
│ │ │ │ │ ├── rvalue_reduce.cpp
│ │ │ │ │ └── try_put_and_wait_example.cpp
│ │ │ │ ├── follows_and_precedes_functions.rst
│ │ │ │ ├── helpers_for_expressing_graphs.rst
│ │ │ │ ├── heterogeneous_extensions_chmap.rst
│ │ │ │ ├── info_namespace.rst
│ │ │ │ ├── info_namespace_extensions.rst
│ │ │ │ ├── make_edges_function.rst
│ │ │ │ ├── make_node_set_function.rst
│ │ │ │ ├── mutex_cls.rst
│ │ │ │ ├── parallel_for_each_semantics.rst
│ │ │ │ ├── parallel_phase_for_task_arena.rst
│ │ │ │ ├── parallel_sort_ranges_extension.rst
│ │ │ │ ├── reference.rst
│ │ │ │ ├── rvalue_reduce.rst
│ │ │ │ ├── rw_mutex_cls.rst
│ │ │ │ ├── scalable_memory_pools/
│ │ │ │ │ ├── fixed_pool_cls.rst
│ │ │ │ │ ├── malloc_replacement_log.rst
│ │ │ │ │ ├── memory_pool_allocator_cls.rst
│ │ │ │ │ └── memory_pool_cls.rst
│ │ │ │ ├── scalable_memory_pools.rst
│ │ │ │ ├── task_group_extensions.rst
│ │ │ │ ├── try_put_and_wait.rst
│ │ │ │ └── type_specified_message_keys.rst
│ │ │ └── tbb_userguide/
│ │ │ ├── Advanced_Example.rst
│ │ │ ├── Advanced_Topic_Other_Kinds_of_Iteration_Spaces.rst
│ │ │ ├── Allocator_Configuration.rst
│ │ │ ├── Automatic_Chunking.rst
│ │ │ ├── Automically_Replacing_malloc.rst
│ │ │ ├── Bandwidth_and_Cache_Affinity_os.rst
│ │ │ ├── Basic_Flow_Graph_concepts.rst
│ │ │ ├── Cancellation_Without_An_Exception.rst
│ │ │ ├── Cancellation_and_Nested_Parallelism.rst
│ │ │ ├── Concurrent_Queue_Classes.rst
│ │ │ ├── Constraints.rst
│ │ │ ├── Containers.rst
│ │ │ ├── Controlling_Chunking_os.rst
│ │ │ ├── Cook_Until_Done_parallel_do.rst
│ │ │ ├── Data_Flow_Graph.rst
│ │ │ ├── Debug_Versus_Release_Libraries.rst
│ │ │ ├── Dependence_Graph.rst
│ │ │ ├── Edges.rst
│ │ │ ├── Exceptions_and_Cancellation.rst
│ │ │ ├── Floating_Point_Settings.rst
│ │ │ ├── Flow-Graph-exception-tips.rst
│ │ │ ├── Flow-Graph-waiting-tips.rst
│ │ │ ├── Flow_Graph.rst
│ │ │ ├── Flow_Graph_Buffering_in_Nodes.rst
│ │ │ ├── Flow_Graph_Message_Passing_Protocol.rst
│ │ │ ├── Flow_Graph_Reservation.rst
│ │ │ ├── Flow_Graph_Single_Vs_Broadcast.rst
│ │ │ ├── Flow_Graph_Tips.rst
│ │ │ ├── Flow_Graph_exception_tips.rst
│ │ │ ├── Flow_Graph_making_edges_tips.rst
│ │ │ ├── Flow_Graph_nested_parallelism_tips.rst
│ │ │ ├── Flow_Graph_resource_tips.rst
│ │ │ ├── Flow_Graph_waiting_tips.rst
│ │ │ ├── Graph_Main_Categories.rst
│ │ │ ├── Graph_Object.rst
│ │ │ ├── Guiding_Task_Scheduler_Execution.rst
│ │ │ ├── How_Task_Scheduler_Works.rst
│ │ │ ├── Initializing_and_Terminating_the_Library.rst
│ │ │ ├── Iterating_Over_a_Concurrent_Queue_for_Debugging.rst
│ │ │ ├── Lambda_Expressions.rst
│ │ │ ├── Linux_C_Dynamic_Memory_Interface_Replacement.rst
│ │ │ ├── Linux_OS.rst
│ │ │ ├── Lock_Pathologies.rst
│ │ │ ├── Mac_OS.rst
│ │ │ ├── Mapping_Nodes2Tasks.rst
│ │ │ ├── Memory_Allocation.rst
│ │ │ ├── Migration_Guide/
│ │ │ │ ├── Mixing_Two_Runtimes.rst
│ │ │ │ ├── Task_API.rst
│ │ │ │ └── Task_Scheduler_Init.rst
│ │ │ ├── Migration_Guide.rst
│ │ │ ├── More_on_HashCompare.rst
│ │ │ ├── Mutex_Flavors.rst
│ │ │ ├── Mutual_Exclusion.rst
│ │ │ ├── Nodes.rst
│ │ │ ├── Non-Linear_Pipelines.rst
│ │ │ ├── Package_Contents_os.rst
│ │ │ ├── Parallelizing_Complex_Loops.rst
│ │ │ ├── Parallelizing_Flow_Graph.rst
│ │ │ ├── Parallelizing_Simple_Loops_os.rst
│ │ │ ├── Parallelizing_Simple_Loops_toctree.rst
│ │ │ ├── Partitioner_Summary.rst
│ │ │ ├── Predefined_Node_Types.rst
│ │ │ ├── Reader_Writer_Mutexes.rst
│ │ │ ├── References.rst
│ │ │ ├── Scalable_Memory_Allocator.rst
│ │ │ ├── Summary_of_Containers.rst
│ │ │ ├── Summary_of_Loops_and_Pipelines.rst
│ │ │ ├── Task-Based_Programming.rst
│ │ │ ├── Task_Scheduler_Bypass.rst
│ │ │ ├── The_Task_Scheduler.rst
│ │ │ ├── Throughput_of_pipeline.rst
│ │ │ ├── Timing.rst
│ │ │ ├── UpgradeDowngrade.rst
│ │ │ ├── Using_Circular_Buffers.rst
│ │ │ ├── When_Not_to_Use_Queues.rst
│ │ │ ├── When_Task-Based_Programming_Is_Inappropriate.rst
│ │ │ ├── Which_Dynamic_Libraries_to_Use.rst
│ │ │ ├── Windows_C_Dynamic_Memory_Interface_Replacement.rst
│ │ │ ├── Windows_OS_ug.rst
│ │ │ ├── Working_on_the_Assembly_Line_pipeline.rst
│ │ │ ├── always_use_wait_for_all.rst
│ │ │ ├── appendix_A.rst
│ │ │ ├── appendix_B.rst
│ │ │ ├── attach_flow_graph_to_arena.rst
│ │ │ ├── automatically-replacing-malloc.rst
│ │ │ ├── avoid_dynamic_node_removal.rst
│ │ │ ├── avoiding_data_races.rst
│ │ │ ├── broadcast_or_send.rst
│ │ │ ├── cancel_a_graph.rst
│ │ │ ├── cancelling_nested_parallelism.rst
│ │ │ ├── catching_exceptions.rst
│ │ │ ├── communicate_with_nodes.rst
│ │ │ ├── concurrent_hash_map.rst
│ │ │ ├── concurrent_vector_ug.rst
│ │ │ ├── create_token_based_system.rst
│ │ │ ├── design_patterns/
│ │ │ │ ├── Agglomeration.rst
│ │ │ │ ├── Design_Patterns.rst
│ │ │ │ ├── Divide_and_Conquer.rst
│ │ │ │ ├── Elementwise.rst
│ │ │ │ ├── Fenced_Data_Transfer.rst
│ │ │ │ ├── GUI_Thread.rst
│ │ │ │ ├── General_References.rst
│ │ │ │ ├── Lazy_Initialization.rst
│ │ │ │ ├── Local_Serializer.rst
│ │ │ │ ├── Non-Preemptive_Priorities.rst
│ │ │ │ ├── Odd-Even_Communication.rst
│ │ │ │ ├── Reduction.rst
│ │ │ │ ├── Reference_Counting.rst
│ │ │ │ └── Wavefront.rst
│ │ │ ├── destroy_graphs_outside_main_thread.rst
│ │ │ ├── estimate_flow_graph_performance.rst
│ │ │ ├── examples/
│ │ │ │ ├── blocked_nd_range_example.cpp
│ │ │ │ ├── flow_graph_examples.cpp
│ │ │ │ ├── parallel_for_lambda_example_1.cpp
│ │ │ │ ├── parallel_for_lambda_example_2.cpp
│ │ │ │ └── parallel_for_os_example.cpp
│ │ │ ├── parallel_for_os.rst
│ │ │ ├── parallel_for_toctree.rst
│ │ │ ├── parallel_reduce.rst
│ │ │ ├── snippets/
│ │ │ │ ├── blocked_nd_range_example.cpp
│ │ │ │ ├── blocked_nd_range_example.h
│ │ │ │ └── flow_graph_examples.cpp
│ │ │ ├── std_invoke.rst
│ │ │ ├── title.rst
│ │ │ ├── use_concurrency_limits.rst
│ │ │ ├── use_graph_reset.rst
│ │ │ ├── use_input_node.rst
│ │ │ ├── use_limiter_node.rst
│ │ │ ├── use_make_edge.rst
│ │ │ ├── use_nested_algorithms.rst
│ │ │ ├── use_nested_flow_graphs.rst
│ │ │ └── work_isolation.rst
│ │ ├── make.bat
│ │ └── test_classification.dox
│ ├── examples/
│ │ ├── .clang-format
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── common/
│ │ │ ├── cmake/
│ │ │ │ ├── common.cmake
│ │ │ │ └── modules/
│ │ │ │ └── FindTBB.cmake
│ │ │ ├── gui/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── convideo.cpp
│ │ │ │ ├── d2dvideo.cpp
│ │ │ │ ├── gdivideo.cpp
│ │ │ │ ├── macvideo.cpp
│ │ │ │ ├── video.hpp
│ │ │ │ ├── winvideo.hpp
│ │ │ │ ├── xcode/
│ │ │ │ │ └── tbbExample/
│ │ │ │ │ ├── OpenGLView.h
│ │ │ │ │ ├── OpenGLView.m
│ │ │ │ │ ├── PkgInfo
│ │ │ │ │ ├── en.lproj/
│ │ │ │ │ │ ├── InfoPlist.strings
│ │ │ │ │ │ ├── MainMenu.nib
│ │ │ │ │ │ └── MainMenu.xib
│ │ │ │ │ ├── iOS.storyboard
│ │ │ │ │ ├── main.m
│ │ │ │ │ ├── tbbAppDelegate.h
│ │ │ │ │ ├── tbbAppDelegate.m
│ │ │ │ │ ├── tbbExample-Info.ios.plist
│ │ │ │ │ └── tbbExample-Info.plist
│ │ │ │ └── xvideo.cpp
│ │ │ └── utility/
│ │ │ ├── fast_random.hpp
│ │ │ ├── get_default_num_threads.hpp
│ │ │ └── utility.hpp
│ │ ├── concurrent_hash_map/
│ │ │ ├── README.md
│ │ │ └── count_strings/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ └── count_strings.cpp
│ │ ├── concurrent_priority_queue/
│ │ │ ├── README.md
│ │ │ └── shortpath/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ └── shortpath.cpp
│ │ ├── getting_started/
│ │ │ ├── README.md
│ │ │ └── sub_string_finder/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── sub_string_finder.cpp
│ │ │ ├── sub_string_finder_extended.cpp
│ │ │ └── sub_string_finder_pretty.cpp
│ │ ├── graph/
│ │ │ ├── README.md
│ │ │ ├── binpack/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ └── binpack.cpp
│ │ │ ├── cholesky/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── cholesky.cpp
│ │ │ │ └── init.cpp
│ │ │ ├── dining_philosophers/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ └── dining_philosophers.cpp
│ │ │ ├── fgbzip2/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── blocksort.cpp
│ │ │ │ ├── bzlib.cpp
│ │ │ │ ├── bzlib.hpp
│ │ │ │ ├── bzlib_private.hpp
│ │ │ │ ├── compress.cpp
│ │ │ │ ├── crctable.cpp
│ │ │ │ ├── decompress.cpp
│ │ │ │ ├── fgbzip2.cpp
│ │ │ │ ├── huffman.cpp
│ │ │ │ └── randtable.cpp
│ │ │ ├── logic_sim/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── D_latch.hpp
│ │ │ │ ├── README.md
│ │ │ │ ├── basics.hpp
│ │ │ │ ├── four_bit_adder.hpp
│ │ │ │ ├── one_bit_adder.hpp
│ │ │ │ ├── test_all.cpp
│ │ │ │ └── two_bit_adder.hpp
│ │ │ └── som/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── som.cpp
│ │ │ ├── som.hpp
│ │ │ └── som_graph.cpp
│ │ ├── migration/
│ │ │ ├── README.md
│ │ │ └── recursive_fibonacci/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── fibonacci.cpp
│ │ │ ├── fibonacci_single_task.h
│ │ │ ├── fibonacci_two_tasks.h
│ │ │ └── task_emulation_layer.h
│ │ ├── parallel_for/
│ │ │ ├── README.md
│ │ │ ├── game_of_life/
│ │ │ │ ├── Board.hpp
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Evolution.cpp
│ │ │ │ ├── Evolution.hpp
│ │ │ │ ├── Game_of_life.cpp
│ │ │ │ ├── README.md
│ │ │ │ └── Update_state.cpp
│ │ │ ├── polygon_overlay/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── gui/
│ │ │ │ │ ├── polygon_overlay.rc
│ │ │ │ │ └── resource.h
│ │ │ │ ├── polymain.cpp
│ │ │ │ ├── polymain.hpp
│ │ │ │ ├── polyover.cpp
│ │ │ │ ├── polyover.hpp
│ │ │ │ ├── pover_global.hpp
│ │ │ │ ├── pover_video.cpp
│ │ │ │ ├── pover_video.hpp
│ │ │ │ └── rpolygon.hpp
│ │ │ ├── seismic/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── gui/
│ │ │ │ │ ├── resource.h
│ │ │ │ │ └── seismic.rc
│ │ │ │ ├── main.cpp
│ │ │ │ ├── resource.hpp
│ │ │ │ ├── seismic_video.cpp
│ │ │ │ ├── seismic_video.hpp
│ │ │ │ ├── universe.cpp
│ │ │ │ └── universe.hpp
│ │ │ └── tachyon/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── gui/
│ │ │ │ ├── resource.h
│ │ │ │ └── tachyon.rc
│ │ │ └── src/
│ │ │ ├── api.cpp
│ │ │ ├── api.hpp
│ │ │ ├── apigeom.cpp
│ │ │ ├── apitrigeom.cpp
│ │ │ ├── apitrigeom.hpp
│ │ │ ├── bndbox.cpp
│ │ │ ├── bndbox.hpp
│ │ │ ├── box.cpp
│ │ │ ├── box.hpp
│ │ │ ├── camera.cpp
│ │ │ ├── camera.hpp
│ │ │ ├── coordsys.cpp
│ │ │ ├── coordsys.hpp
│ │ │ ├── cylinder.cpp
│ │ │ ├── cylinder.hpp
│ │ │ ├── extvol.cpp
│ │ │ ├── extvol.hpp
│ │ │ ├── global.cpp
│ │ │ ├── global.hpp
│ │ │ ├── grid.cpp
│ │ │ ├── grid.hpp
│ │ │ ├── imageio.cpp
│ │ │ ├── imageio.hpp
│ │ │ ├── imap.cpp
│ │ │ ├── imap.hpp
│ │ │ ├── intersect.cpp
│ │ │ ├── intersect.hpp
│ │ │ ├── jpeg.cpp
│ │ │ ├── jpeg.hpp
│ │ │ ├── light.cpp
│ │ │ ├── light.hpp
│ │ │ ├── machine.hpp
│ │ │ ├── macros.hpp
│ │ │ ├── main.cpp
│ │ │ ├── objbound.cpp
│ │ │ ├── objbound.hpp
│ │ │ ├── parse.cpp
│ │ │ ├── parse.hpp
│ │ │ ├── plane.cpp
│ │ │ ├── plane.hpp
│ │ │ ├── ppm.cpp
│ │ │ ├── ppm.hpp
│ │ │ ├── pthread.cpp
│ │ │ ├── pthread_w.hpp
│ │ │ ├── quadric.cpp
│ │ │ ├── quadric.hpp
│ │ │ ├── render.cpp
│ │ │ ├── render.hpp
│ │ │ ├── ring.cpp
│ │ │ ├── ring.hpp
│ │ │ ├── shade.cpp
│ │ │ ├── shade.hpp
│ │ │ ├── sphere.cpp
│ │ │ ├── sphere.hpp
│ │ │ ├── tachyon_video.cpp
│ │ │ ├── tachyon_video.hpp
│ │ │ ├── texture.cpp
│ │ │ ├── texture.hpp
│ │ │ ├── tgafile.cpp
│ │ │ ├── tgafile.hpp
│ │ │ ├── trace.hpp
│ │ │ ├── trace.omp.cpp
│ │ │ ├── trace.serial.cpp
│ │ │ ├── trace.simple.cpp
│ │ │ ├── trace.taskq.cpp
│ │ │ ├── trace.tbb.cpp
│ │ │ ├── trace.tbb1d.cpp
│ │ │ ├── trace.threads.cpp
│ │ │ ├── trace.threads2d.cpp
│ │ │ ├── trace_rest.cpp
│ │ │ ├── triangle.cpp
│ │ │ ├── triangle.hpp
│ │ │ ├── types.hpp
│ │ │ ├── ui.cpp
│ │ │ ├── ui.hpp
│ │ │ ├── util.cpp
│ │ │ ├── util.hpp
│ │ │ ├── vector.cpp
│ │ │ ├── vector.hpp
│ │ │ ├── vol.cpp
│ │ │ └── vol.hpp
│ │ ├── parallel_for_each/
│ │ │ ├── README.md
│ │ │ └── parallel_preorder/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Graph.cpp
│ │ │ ├── Graph.hpp
│ │ │ ├── Matrix.hpp
│ │ │ ├── README.md
│ │ │ ├── main.cpp
│ │ │ └── parallel_preorder.cpp
│ │ ├── parallel_pipeline/
│ │ │ ├── README.md
│ │ │ └── square/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── gen_input.cpp
│ │ │ └── square.cpp
│ │ ├── parallel_reduce/
│ │ │ ├── README.md
│ │ │ ├── convex_hull/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── convex_hull.hpp
│ │ │ │ ├── convex_hull_bench.cpp
│ │ │ │ └── convex_hull_sample.cpp
│ │ │ ├── pi/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── common.h
│ │ │ │ ├── main.cpp
│ │ │ │ └── pi.cpp
│ │ │ └── primes/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── main.cpp
│ │ │ ├── primes.cpp
│ │ │ └── primes.hpp
│ │ ├── task_arena/
│ │ │ ├── README.md
│ │ │ └── fractal/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── fractal.cpp
│ │ │ ├── fractal.hpp
│ │ │ ├── fractal_video.hpp
│ │ │ ├── gui/
│ │ │ │ ├── fractal.rc
│ │ │ │ └── resource.h
│ │ │ └── main.cpp
│ │ ├── task_group/
│ │ │ ├── README.md
│ │ │ └── sudoku/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── input1
│ │ │ ├── input2
│ │ │ ├── input3
│ │ │ ├── input4
│ │ │ └── sudoku.cpp
│ │ └── test_all/
│ │ ├── README.md
│ │ └── fibonacci/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ └── fibonacci.cpp
│ ├── include/
│ │ ├── oneapi/
│ │ │ ├── tbb/
│ │ │ │ ├── blocked_nd_range.h
│ │ │ │ ├── blocked_range.h
│ │ │ │ ├── blocked_range2d.h
│ │ │ │ ├── blocked_range3d.h
│ │ │ │ ├── blocked_rangeNd.h
│ │ │ │ ├── cache_aligned_allocator.h
│ │ │ │ ├── collaborative_call_once.h
│ │ │ │ ├── combinable.h
│ │ │ │ ├── concurrent_hash_map.h
│ │ │ │ ├── concurrent_lru_cache.h
│ │ │ │ ├── concurrent_map.h
│ │ │ │ ├── concurrent_priority_queue.h
│ │ │ │ ├── concurrent_queue.h
│ │ │ │ ├── concurrent_set.h
│ │ │ │ ├── concurrent_unordered_map.h
│ │ │ │ ├── concurrent_unordered_set.h
│ │ │ │ ├── concurrent_vector.h
│ │ │ │ ├── detail/
│ │ │ │ │ ├── _aggregator.h
│ │ │ │ │ ├── _aligned_space.h
│ │ │ │ │ ├── _allocator_traits.h
│ │ │ │ │ ├── _assert.h
│ │ │ │ │ ├── _attach.h
│ │ │ │ │ ├── _concurrent_queue_base.h
│ │ │ │ │ ├── _concurrent_skip_list.h
│ │ │ │ │ ├── _concurrent_unordered_base.h
│ │ │ │ │ ├── _config.h
│ │ │ │ │ ├── _containers_helpers.h
│ │ │ │ │ ├── _exception.h
│ │ │ │ │ ├── _export.h
│ │ │ │ │ ├── _flow_graph_body_impl.h
│ │ │ │ │ ├── _flow_graph_cache_impl.h
│ │ │ │ │ ├── _flow_graph_impl.h
│ │ │ │ │ ├── _flow_graph_indexer_impl.h
│ │ │ │ │ ├── _flow_graph_item_buffer_impl.h
│ │ │ │ │ ├── _flow_graph_join_impl.h
│ │ │ │ │ ├── _flow_graph_node_impl.h
│ │ │ │ │ ├── _flow_graph_node_set_impl.h
│ │ │ │ │ ├── _flow_graph_nodes_deduction.h
│ │ │ │ │ ├── _flow_graph_tagged_buffer_impl.h
│ │ │ │ │ ├── _flow_graph_trace_impl.h
│ │ │ │ │ ├── _flow_graph_types_impl.h
│ │ │ │ │ ├── _hash_compare.h
│ │ │ │ │ ├── _intrusive_list_node.h
│ │ │ │ │ ├── _machine.h
│ │ │ │ │ ├── _mutex_common.h
│ │ │ │ │ ├── _namespace_injection.h
│ │ │ │ │ ├── _node_handle.h
│ │ │ │ │ ├── _pipeline_filters.h
│ │ │ │ │ ├── _pipeline_filters_deduction.h
│ │ │ │ │ ├── _range_common.h
│ │ │ │ │ ├── _rtm_mutex.h
│ │ │ │ │ ├── _rtm_rw_mutex.h
│ │ │ │ │ ├── _scoped_lock.h
│ │ │ │ │ ├── _segment_table.h
│ │ │ │ │ ├── _small_object_pool.h
│ │ │ │ │ ├── _string_resource.h
│ │ │ │ │ ├── _task.h
│ │ │ │ │ ├── _task_handle.h
│ │ │ │ │ ├── _template_helpers.h
│ │ │ │ │ ├── _utils.h
│ │ │ │ │ └── _waitable_atomic.h
│ │ │ │ ├── enumerable_thread_specific.h
│ │ │ │ ├── flow_graph.h
│ │ │ │ ├── flow_graph_abstractions.h
│ │ │ │ ├── global_control.h
│ │ │ │ ├── info.h
│ │ │ │ ├── memory_pool.h
│ │ │ │ ├── mutex.h
│ │ │ │ ├── null_mutex.h
│ │ │ │ ├── null_rw_mutex.h
│ │ │ │ ├── parallel_for.h
│ │ │ │ ├── parallel_for_each.h
│ │ │ │ ├── parallel_invoke.h
│ │ │ │ ├── parallel_pipeline.h
│ │ │ │ ├── parallel_reduce.h
│ │ │ │ ├── parallel_scan.h
│ │ │ │ ├── parallel_sort.h
│ │ │ │ ├── partitioner.h
│ │ │ │ ├── profiling.h
│ │ │ │ ├── queuing_mutex.h
│ │ │ │ ├── queuing_rw_mutex.h
│ │ │ │ ├── rw_mutex.h
│ │ │ │ ├── scalable_allocator.h
│ │ │ │ ├── spin_mutex.h
│ │ │ │ ├── spin_rw_mutex.h
│ │ │ │ ├── task.h
│ │ │ │ ├── task_arena.h
│ │ │ │ ├── task_group.h
│ │ │ │ ├── task_scheduler_observer.h
│ │ │ │ ├── tbb_allocator.h
│ │ │ │ ├── tbbmalloc_proxy.h
│ │ │ │ ├── tick_count.h
│ │ │ │ └── version.h
│ │ │ └── tbb.h
│ │ └── tbb/
│ │ ├── blocked_nd_range.h
│ │ ├── blocked_range.h
│ │ ├── blocked_range2d.h
│ │ ├── blocked_range3d.h
│ │ ├── blocked_rangeNd.h
│ │ ├── cache_aligned_allocator.h
│ │ ├── collaborative_call_once.h
│ │ ├── combinable.h
│ │ ├── concurrent_hash_map.h
│ │ ├── concurrent_lru_cache.h
│ │ ├── concurrent_map.h
│ │ ├── concurrent_priority_queue.h
│ │ ├── concurrent_queue.h
│ │ ├── concurrent_set.h
│ │ ├── concurrent_unordered_map.h
│ │ ├── concurrent_unordered_set.h
│ │ ├── concurrent_vector.h
│ │ ├── enumerable_thread_specific.h
│ │ ├── flow_graph.h
│ │ ├── flow_graph_abstractions.h
│ │ ├── global_control.h
│ │ ├── info.h
│ │ ├── memory_pool.h
│ │ ├── mutex.h
│ │ ├── null_mutex.h
│ │ ├── null_rw_mutex.h
│ │ ├── parallel_for.h
│ │ ├── parallel_for_each.h
│ │ ├── parallel_invoke.h
│ │ ├── parallel_pipeline.h
│ │ ├── parallel_reduce.h
│ │ ├── parallel_scan.h
│ │ ├── parallel_sort.h
│ │ ├── partitioner.h
│ │ ├── profiling.h
│ │ ├── queuing_mutex.h
│ │ ├── queuing_rw_mutex.h
│ │ ├── rw_mutex.h
│ │ ├── scalable_allocator.h
│ │ ├── spin_mutex.h
│ │ ├── spin_rw_mutex.h
│ │ ├── task.h
│ │ ├── task_arena.h
│ │ ├── task_group.h
│ │ ├── task_scheduler_observer.h
│ │ ├── tbb.h
│ │ ├── tbb_allocator.h
│ │ ├── tbbmalloc_proxy.h
│ │ ├── tick_count.h
│ │ └── version.h
│ ├── integration/
│ │ ├── cmake/
│ │ │ └── generate_vars.cmake
│ │ ├── linux/
│ │ │ ├── env/
│ │ │ │ ├── vars.sh
│ │ │ │ └── vars.sh.in
│ │ │ ├── modulefiles/
│ │ │ │ ├── tbb
│ │ │ │ └── tbb32
│ │ │ ├── oneapi/
│ │ │ │ └── vars.sh
│ │ │ └── sys_check/
│ │ │ └── sys_check.sh
│ │ ├── mac/
│ │ │ └── env/
│ │ │ ├── vars.sh
│ │ │ └── vars.sh.in
│ │ ├── pkg-config/
│ │ │ └── tbb.pc.in
│ │ └── windows/
│ │ ├── env/
│ │ │ ├── vars.bat
│ │ │ └── vars.bat.in
│ │ ├── nuget/
│ │ │ ├── inteltbb.devel.win.targets
│ │ │ └── inteltbb.redist.win.targets
│ │ ├── oneapi/
│ │ │ └── vars.bat
│ │ └── sys_check/
│ │ └── sys_check.bat
│ ├── python/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── TBB.py
│ │ ├── rml/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── ipc_server.cpp
│ │ │ ├── ipc_utils.cpp
│ │ │ └── ipc_utils.h
│ │ ├── setup.py
│ │ └── tbb/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── api.i
│ │ ├── pool.py
│ │ └── test.py
│ ├── rfcs/
│ │ ├── README.md
│ │ ├── archived/
│ │ │ └── README.md
│ │ ├── experimental/
│ │ │ ├── README.md
│ │ │ ├── blocked_nd_range_ctad/
│ │ │ │ └── README.md
│ │ │ └── parallel_phase_for_task_arena/
│ │ │ └── README.md
│ │ ├── proposed/
│ │ │ ├── README.md
│ │ │ ├── loading-dependencies/
│ │ │ │ └── loading-dependencies-by-module-name.org
│ │ │ └── numa_support/
│ │ │ ├── README.md
│ │ │ └── tbbbind-link-static-hwloc.org
│ │ ├── supported/
│ │ │ └── README.md
│ │ └── template.md
│ ├── src/
│ │ ├── tbb/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── address_waiter.cpp
│ │ │ ├── allocator.cpp
│ │ │ ├── arena.cpp
│ │ │ ├── arena.h
│ │ │ ├── arena_slot.cpp
│ │ │ ├── arena_slot.h
│ │ │ ├── assert_impl.h
│ │ │ ├── cancellation_disseminator.h
│ │ │ ├── co_context.h
│ │ │ ├── concurrent_bounded_queue.cpp
│ │ │ ├── concurrent_monitor.h
│ │ │ ├── concurrent_monitor_mutex.h
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbb.def
│ │ │ │ ├── lin64-tbb.def
│ │ │ │ ├── mac64-tbb.def
│ │ │ │ ├── win32-tbb.def
│ │ │ │ └── win64-tbb.def
│ │ │ ├── dynamic_link.cpp
│ │ │ ├── dynamic_link.h
│ │ │ ├── environment.h
│ │ │ ├── exception.cpp
│ │ │ ├── global_control.cpp
│ │ │ ├── governor.cpp
│ │ │ ├── governor.h
│ │ │ ├── intrusive_list.h
│ │ │ ├── itt_notify.cpp
│ │ │ ├── itt_notify.h
│ │ │ ├── mailbox.h
│ │ │ ├── main.cpp
│ │ │ ├── main.h
│ │ │ ├── market.cpp
│ │ │ ├── market.h
│ │ │ ├── market_concurrent_monitor.h
│ │ │ ├── misc.cpp
│ │ │ ├── misc.h
│ │ │ ├── misc_ex.cpp
│ │ │ ├── observer_proxy.cpp
│ │ │ ├── observer_proxy.h
│ │ │ ├── parallel_pipeline.cpp
│ │ │ ├── permit_manager.h
│ │ │ ├── pm_client.h
│ │ │ ├── private_server.cpp
│ │ │ ├── profiling.cpp
│ │ │ ├── queuing_rw_mutex.cpp
│ │ │ ├── rml_base.h
│ │ │ ├── rml_tbb.cpp
│ │ │ ├── rml_tbb.h
│ │ │ ├── rml_thread_monitor.h
│ │ │ ├── rtm_mutex.cpp
│ │ │ ├── rtm_rw_mutex.cpp
│ │ │ ├── scheduler_common.h
│ │ │ ├── semaphore.cpp
│ │ │ ├── semaphore.h
│ │ │ ├── small_object_pool.cpp
│ │ │ ├── small_object_pool_impl.h
│ │ │ ├── task.cpp
│ │ │ ├── task_dispatcher.cpp
│ │ │ ├── task_dispatcher.h
│ │ │ ├── task_group_context.cpp
│ │ │ ├── task_stream.h
│ │ │ ├── tbb.rc
│ │ │ ├── tcm.h
│ │ │ ├── tcm_adaptor.cpp
│ │ │ ├── tcm_adaptor.h
│ │ │ ├── thread_control_monitor.h
│ │ │ ├── thread_data.h
│ │ │ ├── thread_dispatcher.cpp
│ │ │ ├── thread_dispatcher.h
│ │ │ ├── thread_dispatcher_client.h
│ │ │ ├── thread_request_serializer.cpp
│ │ │ ├── thread_request_serializer.h
│ │ │ ├── threading_control.cpp
│ │ │ ├── threading_control.h
│ │ │ ├── threading_control_client.h
│ │ │ ├── tls.h
│ │ │ ├── tools_api/
│ │ │ │ ├── disable_warnings.h
│ │ │ │ ├── ittnotify.h
│ │ │ │ ├── ittnotify_config.h
│ │ │ │ ├── ittnotify_static.c
│ │ │ │ ├── ittnotify_static.h
│ │ │ │ ├── ittnotify_types.h
│ │ │ │ └── legacy/
│ │ │ │ └── ittnotify.h
│ │ │ ├── version.cpp
│ │ │ └── waiters.h
│ │ ├── tbbbind/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbbbind.def
│ │ │ │ ├── lin64-tbbbind.def
│ │ │ │ ├── mac64-tbbbind.def
│ │ │ │ ├── win32-tbbbind.def
│ │ │ │ └── win64-tbbbind.def
│ │ │ ├── tbb_bind.cpp
│ │ │ └── tbb_bind.rc
│ │ ├── tbbmalloc/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Customize.h
│ │ │ ├── MapMemory.h
│ │ │ ├── Statistics.h
│ │ │ ├── Synchronize.h
│ │ │ ├── TypeDefinitions.h
│ │ │ ├── backend.cpp
│ │ │ ├── backend.h
│ │ │ ├── backref.cpp
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbbmalloc.def
│ │ │ │ ├── lin64-tbbmalloc.def
│ │ │ │ ├── mac64-tbbmalloc.def
│ │ │ │ ├── win32-tbbmalloc.def
│ │ │ │ └── win64-tbbmalloc.def
│ │ │ ├── frontend.cpp
│ │ │ ├── large_objects.cpp
│ │ │ ├── large_objects.h
│ │ │ ├── shared_utils.h
│ │ │ ├── tbbmalloc.cpp
│ │ │ ├── tbbmalloc.rc
│ │ │ ├── tbbmalloc_internal.h
│ │ │ └── tbbmalloc_internal_api.h
│ │ └── tbbmalloc_proxy/
│ │ ├── CMakeLists.txt
│ │ ├── def/
│ │ │ ├── lin32-proxy.def
│ │ │ └── lin64-proxy.def
│ │ ├── function_replacement.cpp
│ │ ├── function_replacement.h
│ │ ├── proxy.cpp
│ │ ├── proxy.h
│ │ ├── proxy_overload_osx.h
│ │ └── tbbmalloc_proxy.rc
│ ├── test/
│ │ ├── CMakeLists.txt
│ │ ├── common/
│ │ │ ├── allocator_overload.h
│ │ │ ├── allocator_stl_test_common.h
│ │ │ ├── allocator_test_common.h
│ │ │ ├── checktype.h
│ │ │ ├── common_arena_constraints.h
│ │ │ ├── concepts_common.h
│ │ │ ├── concurrency_tracker.h
│ │ │ ├── concurrent_associative_common.h
│ │ │ ├── concurrent_lru_cache_common.h
│ │ │ ├── concurrent_ordered_common.h
│ │ │ ├── concurrent_priority_queue_common.h
│ │ │ ├── concurrent_unordered_common.h
│ │ │ ├── config.h
│ │ │ ├── container_move_support.h
│ │ │ ├── containers_common.h
│ │ │ ├── cpu_usertime.h
│ │ │ ├── custom_allocators.h
│ │ │ ├── doctest.h
│ │ │ ├── dummy_body.h
│ │ │ ├── exception_handling.h
│ │ │ ├── fp_control.h
│ │ │ ├── graph_utils.h
│ │ │ ├── initializer_list_support.h
│ │ │ ├── inject_scheduler.h
│ │ │ ├── iterator.h
│ │ │ ├── memory_usage.h
│ │ │ ├── node_handling_support.h
│ │ │ ├── parallel_for_each_common.h
│ │ │ ├── parallel_invoke_common.h
│ │ │ ├── parallel_reduce_common.h
│ │ │ ├── range_based_for_support.h
│ │ │ ├── rwm_upgrade_downgrade.h
│ │ │ ├── spin_barrier.h
│ │ │ ├── state_trackable.h
│ │ │ ├── test.h
│ │ │ ├── test_comparisons.h
│ │ │ ├── test_follows_and_precedes_api.h
│ │ │ ├── test_invoke.h
│ │ │ ├── test_join_node_multiple_predecessors.h
│ │ │ ├── tls_limit.h
│ │ │ ├── utils.h
│ │ │ ├── utils_assert.h
│ │ │ ├── utils_concurrency_limit.h
│ │ │ ├── utils_dynamic_libs.h
│ │ │ ├── utils_env.h
│ │ │ ├── utils_report.h
│ │ │ ├── utils_yield.h
│ │ │ └── vector_types.h
│ │ ├── conformance/
│ │ │ ├── conformance_allocators.cpp
│ │ │ ├── conformance_arena_constraints.cpp
│ │ │ ├── conformance_async_node.cpp
│ │ │ ├── conformance_blocked_nd_range.cpp
│ │ │ ├── conformance_blocked_range.cpp
│ │ │ ├── conformance_blocked_range2d.cpp
│ │ │ ├── conformance_blocked_range3d.cpp
│ │ │ ├── conformance_blocked_rangeNd.cpp
│ │ │ ├── conformance_broadcast_node.cpp
│ │ │ ├── conformance_buffer_node.cpp
│ │ │ ├── conformance_collaborative_call_once.cpp
│ │ │ ├── conformance_combinable.cpp
│ │ │ ├── conformance_composite_node.cpp
│ │ │ ├── conformance_concurrent_hash_map.cpp
│ │ │ ├── conformance_concurrent_lru_cache.cpp
│ │ │ ├── conformance_concurrent_map.cpp
│ │ │ ├── conformance_concurrent_priority_queue.cpp
│ │ │ ├── conformance_concurrent_queue.cpp
│ │ │ ├── conformance_concurrent_set.cpp
│ │ │ ├── conformance_concurrent_unordered_map.cpp
│ │ │ ├── conformance_concurrent_unordered_set.cpp
│ │ │ ├── conformance_concurrent_vector.cpp
│ │ │ ├── conformance_continue_node.cpp
│ │ │ ├── conformance_enumerable_thread_specific.cpp
│ │ │ ├── conformance_flowgraph.h
│ │ │ ├── conformance_function_node.cpp
│ │ │ ├── conformance_global_control.cpp
│ │ │ ├── conformance_graph.cpp
│ │ │ ├── conformance_indexer_node.cpp
│ │ │ ├── conformance_input_node.cpp
│ │ │ ├── conformance_join_node.cpp
│ │ │ ├── conformance_limiter_node.cpp
│ │ │ ├── conformance_multifunction_node.cpp
│ │ │ ├── conformance_mutex.cpp
│ │ │ ├── conformance_mutex.h
│ │ │ ├── conformance_overwrite_node.cpp
│ │ │ ├── conformance_parallel_for.cpp
│ │ │ ├── conformance_parallel_for_each.cpp
│ │ │ ├── conformance_parallel_invoke.cpp
│ │ │ ├── conformance_parallel_pipeline.cpp
│ │ │ ├── conformance_parallel_reduce.cpp
│ │ │ ├── conformance_parallel_scan.cpp
│ │ │ ├── conformance_parallel_sort.cpp
│ │ │ ├── conformance_priority_queue_node.cpp
│ │ │ ├── conformance_queue_node.cpp
│ │ │ ├── conformance_resumable_tasks.cpp
│ │ │ ├── conformance_sequencer_node.cpp
│ │ │ ├── conformance_split_node.cpp
│ │ │ ├── conformance_task_arena.cpp
│ │ │ ├── conformance_task_group.cpp
│ │ │ ├── conformance_task_group_context.cpp
│ │ │ ├── conformance_tick_count.cpp
│ │ │ ├── conformance_version.cpp
│ │ │ └── conformance_write_once_node.cpp
│ │ ├── tbb/
│ │ │ ├── test_adaptive_mutex.cpp
│ │ │ ├── test_allocators.cpp
│ │ │ ├── test_arena_constraints.cpp
│ │ │ ├── test_arena_priorities.cpp
│ │ │ ├── test_async_node.cpp
│ │ │ ├── test_blocked_range.cpp
│ │ │ ├── test_broadcast_node.cpp
│ │ │ ├── test_buffer_node.cpp
│ │ │ ├── test_buffering_try_put_and_wait.h
│ │ │ ├── test_collaborative_call_once.cpp
│ │ │ ├── test_composite_node.cpp
│ │ │ ├── test_concurrent_hash_map.cpp
│ │ │ ├── test_concurrent_lru_cache.cpp
│ │ │ ├── test_concurrent_map.cpp
│ │ │ ├── test_concurrent_monitor.cpp
│ │ │ ├── test_concurrent_priority_queue.cpp
│ │ │ ├── test_concurrent_queue.cpp
│ │ │ ├── test_concurrent_queue_whitebox.cpp
│ │ │ ├── test_concurrent_set.cpp
│ │ │ ├── test_concurrent_unordered_map.cpp
│ │ │ ├── test_concurrent_unordered_set.cpp
│ │ │ ├── test_concurrent_vector.cpp
│ │ │ ├── test_continue_node.cpp
│ │ │ ├── test_dynamic_link.cpp
│ │ │ ├── test_eh_algorithms.cpp
│ │ │ ├── test_eh_flow_graph.cpp
│ │ │ ├── test_eh_thread.cpp
│ │ │ ├── test_enumerable_thread_specific.cpp
│ │ │ ├── test_environment_whitebox.cpp
│ │ │ ├── test_flow_graph.cpp
│ │ │ ├── test_flow_graph_priorities.cpp
│ │ │ ├── test_flow_graph_whitebox.cpp
│ │ │ ├── test_function_node.cpp
│ │ │ ├── test_fuzzing.cpp
│ │ │ ├── test_global_control.cpp
│ │ │ ├── test_handle_perror.cpp
│ │ │ ├── test_hw_concurrency.cpp
│ │ │ ├── test_implicit_linkage_on_windows.cpp
│ │ │ ├── test_indexer_node.cpp
│ │ │ ├── test_input_node.cpp
│ │ │ ├── test_intrusive_list.cpp
│ │ │ ├── test_join_node.cpp
│ │ │ ├── test_join_node.h
│ │ │ ├── test_join_node_key_matching.cpp
│ │ │ ├── test_join_node_key_matching_n_args.cpp
│ │ │ ├── test_join_node_msg_key_matching.cpp
│ │ │ ├── test_join_node_msg_key_matching_n_args.cpp
│ │ │ ├── test_join_node_preview.cpp
│ │ │ ├── test_limiter_node.cpp
│ │ │ ├── test_multifunction_node.cpp
│ │ │ ├── test_mutex.cpp
│ │ │ ├── test_mutex.h
│ │ │ ├── test_numa_dist.cpp
│ │ │ ├── test_openmp.cpp
│ │ │ ├── test_overwrite_node.cpp
│ │ │ ├── test_parallel_for.cpp
│ │ │ ├── test_parallel_for_each.cpp
│ │ │ ├── test_parallel_invoke.cpp
│ │ │ ├── test_parallel_phase.cpp
│ │ │ ├── test_parallel_pipeline.cpp
│ │ │ ├── test_parallel_reduce.cpp
│ │ │ ├── test_parallel_scan.cpp
│ │ │ ├── test_parallel_sort.cpp
│ │ │ ├── test_partitioner.cpp
│ │ │ ├── test_partitioner.h
│ │ │ ├── test_priority_queue_node.cpp
│ │ │ ├── test_profiling.cpp
│ │ │ ├── test_queue_node.cpp
│ │ │ ├── test_resumable_tasks.cpp
│ │ │ ├── test_scheduler_mix.cpp
│ │ │ ├── test_semaphore.cpp
│ │ │ ├── test_sequencer_node.cpp
│ │ │ ├── test_split_node.cpp
│ │ │ ├── test_tagged_msg.cpp
│ │ │ ├── test_task.cpp
│ │ │ ├── test_task_arena.cpp
│ │ │ ├── test_task_group.cpp
│ │ │ ├── test_tbb_fork.cpp
│ │ │ ├── test_tbb_header.cpp
│ │ │ ├── test_tbb_header_secondary.cpp
│ │ │ ├── test_tick_count.cpp
│ │ │ └── test_write_once_node.cpp
│ │ └── tbbmalloc/
│ │ ├── test_malloc_atexit.cpp
│ │ ├── test_malloc_compliance.cpp
│ │ ├── test_malloc_init_shutdown.cpp
│ │ ├── test_malloc_lib_unload.cpp
│ │ ├── test_malloc_new_handler.cpp
│ │ ├── test_malloc_overload.cpp
│ │ ├── test_malloc_overload_disable.cpp
│ │ ├── test_malloc_pools.cpp
│ │ ├── test_malloc_pure_c.c
│ │ ├── test_malloc_regression.cpp
│ │ ├── test_malloc_shutdown_hang.cpp
│ │ ├── test_malloc_used_by_lib.cpp
│ │ ├── test_malloc_whitebox.cpp
│ │ └── test_scalable_allocator.cpp
│ └── third-party-programs.txt
├── xxhash/
│ ├── .gitattributes
│ ├── .github/
│ │ ├── dependabot.yml
│ │ └── workflows/
│ │ ├── ci.yml
│ │ └── scorecard.yml
│ ├── .gitignore
│ ├── CHANGELOG
│ ├── Doxyfile
│ ├── Doxyfile-internal
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── SECURITY.md
│ ├── appveyor.yml
│ ├── cli/
│ │ ├── .tipi/
│ │ │ ├── deps
│ │ │ └── opts
│ │ ├── COPYING
│ │ ├── README.md
│ │ ├── xsum_arch.c
│ │ ├── xsum_arch.h
│ │ ├── xsum_bench.c
│ │ ├── xsum_bench.h
│ │ ├── xsum_config.h
│ │ ├── xsum_os_specific.c
│ │ ├── xsum_os_specific.h
│ │ ├── xsum_output.c
│ │ ├── xsum_output.h
│ │ ├── xsum_sanity_check.c
│ │ ├── xsum_sanity_check.h
│ │ ├── xxhsum.1
│ │ ├── xxhsum.1.md
│ │ └── xxhsum.c
│ ├── clib.json
│ ├── cmake_unofficial/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── JoinPaths.cmake
│ │ ├── README.md
│ │ └── xxHashConfig.cmake.in
│ ├── doc/
│ │ ├── README.md
│ │ ├── xxhash.cry
│ │ └── xxhash_spec.md
│ ├── fuzz/
│ │ └── fuzzer.c
│ ├── libxxhash.pc.in
│ ├── tests/
│ │ ├── Makefile
│ │ ├── cli-comment-line.sh
│ │ ├── cli-ignore-missing.sh
│ │ ├── collisions/
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── allcodecs/
│ │ │ │ ├── README.md
│ │ │ │ ├── dummy.c
│ │ │ │ └── dummy.h
│ │ │ ├── hashes.h
│ │ │ ├── main.c
│ │ │ ├── pool.c
│ │ │ ├── pool.h
│ │ │ ├── sort.cc
│ │ │ ├── sort.hh
│ │ │ ├── threading.c
│ │ │ └── threading.h
│ │ ├── filename-escape.sh
│ │ ├── generate_unicode_test.c
│ │ ├── multiInclude.c
│ │ ├── ppc_define.c
│ │ ├── sanity_test.c
│ │ ├── sanity_test_vectors.h
│ │ ├── sanity_test_vectors_generator.c
│ │ └── unicode_lint.sh
│ ├── xxh3.h
│ ├── xxh_x86dispatch.c
│ ├── xxh_x86dispatch.h
│ ├── xxhash.c
│ └── xxhash.h
├── zlib/
│ ├── CMakeFiles/
│ │ ├── zlib.dir/
│ │ │ └── build.make
│ │ └── zlibstatic.dir/
│ │ └── build.make
│ ├── CMakeLists.txt
│ ├── ChangeLog
│ ├── FAQ
│ ├── INDEX
│ ├── LICENSE
│ ├── Makefile
│ ├── Makefile.in
│ ├── README
│ ├── adler32.c
│ ├── amiga/
│ │ ├── Makefile.pup
│ │ └── Makefile.sas
│ ├── compress.c
│ ├── configure
│ ├── contrib/
│ │ ├── README.contrib
│ │ ├── ada/
│ │ │ ├── buffer_demo.adb
│ │ │ ├── mtest.adb
│ │ │ ├── read.adb
│ │ │ ├── readme.txt
│ │ │ ├── test.adb
│ │ │ ├── zlib-streams.adb
│ │ │ ├── zlib-streams.ads
│ │ │ ├── zlib-thin.adb
│ │ │ ├── zlib-thin.ads
│ │ │ ├── zlib.adb
│ │ │ ├── zlib.ads
│ │ │ └── zlib.gpr
│ │ ├── blast/
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── blast.c
│ │ │ ├── blast.h
│ │ │ ├── test.pk
│ │ │ └── test.txt
│ │ ├── delphi/
│ │ │ ├── ZLib.pas
│ │ │ ├── ZLibConst.pas
│ │ │ ├── readme.txt
│ │ │ └── zlibd32.mak
│ │ ├── dotzlib/
│ │ │ ├── DotZLib/
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── ChecksumImpl.cs
│ │ │ │ ├── CircularBuffer.cs
│ │ │ │ ├── CodecBase.cs
│ │ │ │ ├── Deflater.cs
│ │ │ │ ├── DotZLib.cs
│ │ │ │ ├── DotZLib.csproj
│ │ │ │ ├── GZipStream.cs
│ │ │ │ ├── Inflater.cs
│ │ │ │ └── UnitTests.cs
│ │ │ ├── DotZLib.build
│ │ │ ├── DotZLib.chm
│ │ │ ├── DotZLib.sln
│ │ │ ├── LICENSE_1_0.txt
│ │ │ └── readme.txt
│ │ ├── gcc_gvmat64/
│ │ │ └── gvmat64.S
│ │ ├── infback9/
│ │ │ ├── README
│ │ │ ├── infback9.c
│ │ │ ├── infback9.h
│ │ │ ├── inffix9.h
│ │ │ ├── inflate9.h
│ │ │ ├── inftree9.c
│ │ │ └── inftree9.h
│ │ ├── iostream/
│ │ │ ├── test.cpp
│ │ │ ├── zfstream.cpp
│ │ │ └── zfstream.h
│ │ ├── iostream2/
│ │ │ ├── zstream.h
│ │ │ └── zstream_test.cpp
│ │ ├── iostream3/
│ │ │ ├── README
│ │ │ ├── TODO
│ │ │ ├── test.cc
│ │ │ ├── zfstream.cc
│ │ │ └── zfstream.h
│ │ ├── minizip/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.am
│ │ │ ├── MiniZip64_Changes.txt
│ │ │ ├── MiniZip64_info.txt
│ │ │ ├── configure.ac
│ │ │ ├── crypt.h
│ │ │ ├── ioapi.c
│ │ │ ├── ioapi.h
│ │ │ ├── iowin32.c
│ │ │ ├── iowin32.h
│ │ │ ├── make_vms.com
│ │ │ ├── miniunz.c
│ │ │ ├── miniunzip.1
│ │ │ ├── minizip.1
│ │ │ ├── minizip.c
│ │ │ ├── minizip.pc.in
│ │ │ ├── mztools.c
│ │ │ ├── mztools.h
│ │ │ ├── unzip.c
│ │ │ ├── unzip.h
│ │ │ ├── zip.c
│ │ │ └── zip.h
│ │ ├── nuget/
│ │ │ ├── nuget.csproj
│ │ │ └── nuget.sln
│ │ ├── pascal/
│ │ │ ├── example.pas
│ │ │ ├── readme.txt
│ │ │ ├── zlibd32.mak
│ │ │ └── zlibpas.pas
│ │ ├── puff/
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── puff.c
│ │ │ ├── puff.h
│ │ │ ├── pufftest.c
│ │ │ └── zeros.raw
│ │ ├── testzlib/
│ │ │ ├── testzlib.c
│ │ │ └── testzlib.txt
│ │ ├── untgz/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.msc
│ │ │ └── untgz.c
│ │ └── vstudio/
│ │ ├── readme.txt
│ │ ├── vc10/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── miniunz.vcxproj.filters
│ │ │ ├── minizip.vcxproj
│ │ │ ├── minizip.vcxproj.filters
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlib.vcxproj.filters
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── testzlibdll.vcxproj.filters
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibstat.vcxproj.filters
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ ├── zlibvc.vcxproj
│ │ │ └── zlibvc.vcxproj.filters
│ │ ├── vc11/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc12/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc14/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc17/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ └── vc9/
│ │ ├── miniunz.vcproj
│ │ ├── minizip.vcproj
│ │ ├── testzlib.vcproj
│ │ ├── testzlibdll.vcproj
│ │ ├── zlib.rc
│ │ ├── zlibstat.vcproj
│ │ ├── zlibvc.def
│ │ ├── zlibvc.sln
│ │ └── zlibvc.vcproj
│ ├── crc32.c
│ ├── crc32.h
│ ├── deflate.c
│ ├── deflate.h
│ ├── doc/
│ │ ├── algorithm.txt
│ │ ├── rfc1950.txt
│ │ ├── rfc1951.txt
│ │ ├── rfc1952.txt
│ │ └── txtvsbin.txt
│ ├── examples/
│ │ ├── README.examples
│ │ ├── enough.c
│ │ ├── fitblk.c
│ │ ├── gun.c
│ │ ├── gzappend.c
│ │ ├── gzjoin.c
│ │ ├── gzlog.c
│ │ ├── gzlog.h
│ │ ├── gznorm.c
│ │ ├── zlib_how.html
│ │ ├── zpipe.c
│ │ ├── zran.c
│ │ └── zran.h
│ ├── gzclose.c
│ ├── gzguts.h
│ ├── gzlib.c
│ ├── gzread.c
│ ├── gzwrite.c
│ ├── infback.c
│ ├── inffast.c
│ ├── inffast.h
│ ├── inffixed.h
│ ├── inflate.c
│ ├── inflate.h
│ ├── inftrees.c
│ ├── inftrees.h
│ ├── make_vms.com
│ ├── msdos/
│ │ ├── Makefile.bor
│ │ ├── Makefile.dj2
│ │ ├── Makefile.emx
│ │ ├── Makefile.msc
│ │ └── Makefile.tc
│ ├── nintendods/
│ │ ├── Makefile
│ │ └── README
│ ├── old/
│ │ ├── Makefile.emx
│ │ ├── Makefile.riscos
│ │ ├── README
│ │ ├── descrip.mms
│ │ ├── os2/
│ │ │ ├── Makefile.os2
│ │ │ └── zlib.def
│ │ └── visual-basic.txt
│ ├── os400/
│ │ ├── README400
│ │ ├── bndsrc
│ │ ├── make.sh
│ │ └── zlib.inc
│ ├── qnx/
│ │ └── package.qpg
│ ├── test/
│ │ ├── example.c
│ │ ├── infcover.c
│ │ └── minigzip.c
│ ├── treebuild.xml
│ ├── trees.c
│ ├── trees.h
│ ├── uncompr.c
│ ├── watcom/
│ │ ├── watcom_f.mak
│ │ └── watcom_l.mak
│ ├── win32/
│ │ ├── DLL_FAQ.txt
│ │ ├── Makefile.bor
│ │ ├── Makefile.gcc
│ │ ├── Makefile.msc
│ │ ├── README-WIN32.txt
│ │ ├── VisualC.txt
│ │ ├── zlib.def
│ │ └── zlib1.rc
│ ├── zconf.h.cmakein
│ ├── zconf.h.in
│ ├── zconf.h.included
│ ├── zlib.3
│ ├── zlib.h
│ ├── zlib.pc.cmakein
│ ├── zlib.pc.in
│ ├── zutil.c
│ └── zutil.h
└── zstd/
├── .buckconfig
├── .buckversion
├── .cirrus.yml
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── android-ndk-build.yml
│ ├── commit.yml
│ ├── dev-long-tests.yml
│ ├── dev-short-tests.yml
│ ├── nightly.yml
│ ├── publish-release-artifacts.yml
│ ├── scorecards.yml
│ └── windows-artifacts.yml
├── .gitignore
├── CHANGELOG
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── COPYING
├── LICENSE
├── Makefile
├── Package.swift
├── README.md
├── SECURITY.md
├── TESTING.md
├── contrib/
│ ├── VS2005/
│ │ ├── README.md
│ │ ├── fullbench/
│ │ │ └── fullbench.vcproj
│ │ ├── fuzzer/
│ │ │ └── fuzzer.vcproj
│ │ ├── zstd/
│ │ │ └── zstd.vcproj
│ │ ├── zstd.sln
│ │ └── zstdlib/
│ │ └── zstdlib.vcproj
│ ├── cleanTabs
│ ├── diagnose_corruption/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ └── check_flipped_bits.c
│ ├── docker/
│ │ ├── Dockerfile
│ │ └── README.md
│ ├── freestanding_lib/
│ │ └── freestanding.py
│ ├── linux-kernel/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── btrfs-benchmark.sh
│ │ ├── btrfs-extract-benchmark.sh
│ │ ├── decompress_sources.h
│ │ ├── linux.mk
│ │ ├── linux_zstd.h
│ │ ├── mem.h
│ │ ├── squashfs-benchmark.sh
│ │ ├── test/
│ │ │ ├── Makefile
│ │ │ ├── include/
│ │ │ │ └── linux/
│ │ │ │ ├── compiler.h
│ │ │ │ ├── errno.h
│ │ │ │ ├── kernel.h
│ │ │ │ ├── limits.h
│ │ │ │ ├── math64.h
│ │ │ │ ├── module.h
│ │ │ │ ├── printk.h
│ │ │ │ ├── stddef.h
│ │ │ │ ├── swab.h
│ │ │ │ ├── types.h
│ │ │ │ ├── unaligned.h
│ │ │ │ └── xxhash.h
│ │ │ ├── macro-test.sh
│ │ │ ├── static_test.c
│ │ │ └── test.c
│ │ ├── zstd_common_module.c
│ │ ├── zstd_compress_module.c
│ │ ├── zstd_decompress_module.c
│ │ └── zstd_deps.h
│ ├── match_finders/
│ │ ├── README.md
│ │ ├── zstd_edist.c
│ │ └── zstd_edist.h
│ ├── premake/
│ │ ├── premake4.lua
│ │ └── zstd.lua
│ ├── recovery/
│ │ ├── Makefile
│ │ └── recover_directory.c
│ ├── seekable_format/
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ ├── parallel_compression.c
│ │ │ ├── parallel_processing.c
│ │ │ ├── seekable_compression.c
│ │ │ ├── seekable_decompression.c
│ │ │ └── seekable_decompression_mem.c
│ │ ├── tests/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── seekable_tests.c
│ │ ├── zstd_seekable.h
│ │ ├── zstd_seekable_compression_format.md
│ │ ├── zstdseek_compress.c
│ │ └── zstdseek_decompress.c
│ ├── seqBench/
│ │ ├── Makefile
│ │ └── seqBench.c
│ └── snap/
│ └── snapcraft.yaml
├── doc/
│ ├── README.md
│ ├── decompressor_errata.md
│ ├── decompressor_permissive.md
│ ├── educational_decoder/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── harness.c
│ │ ├── zstd_decompress.c
│ │ └── zstd_decompress.h
│ ├── zstd_compression_format.md
│ └── zstd_manual.html
├── examples/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common.h
│ ├── dictionary_compression.c
│ ├── dictionary_decompression.c
│ ├── multiple_simple_compression.c
│ ├── multiple_streaming_compression.c
│ ├── simple_compression.c
│ ├── simple_decompression.c
│ ├── streaming_compression.c
│ ├── streaming_compression_thread_pool.c
│ ├── streaming_decompression.c
│ └── streaming_memory_usage.c
├── lib/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common/
│ │ ├── allocations.h
│ │ ├── bits.h
│ │ ├── bitstream.h
│ │ ├── compiler.h
│ │ ├── cpu.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── entropy_common.c
│ │ ├── error_private.c
│ │ ├── error_private.h
│ │ ├── fse.h
│ │ ├── fse_decompress.c
│ │ ├── huf.h
│ │ ├── mem.h
│ │ ├── pool.c
│ │ ├── pool.h
│ │ ├── portability_macros.h
│ │ ├── threading.c
│ │ ├── threading.h
│ │ ├── xxhash.c
│ │ ├── xxhash.h
│ │ ├── zstd_common.c
│ │ ├── zstd_deps.h
│ │ ├── zstd_internal.h
│ │ └── zstd_trace.h
│ ├── compress/
│ │ ├── clevels.h
│ │ ├── fse_compress.c
│ │ ├── hist.c
│ │ ├── hist.h
│ │ ├── huf_compress.c
│ │ ├── zstd_compress.c
│ │ ├── zstd_compress_internal.h
│ │ ├── zstd_compress_literals.c
│ │ ├── zstd_compress_literals.h
│ │ ├── zstd_compress_sequences.c
│ │ ├── zstd_compress_sequences.h
│ │ ├── zstd_compress_superblock.c
│ │ ├── zstd_compress_superblock.h
│ │ ├── zstd_cwksp.h
│ │ ├── zstd_double_fast.c
│ │ ├── zstd_double_fast.h
│ │ ├── zstd_fast.c
│ │ ├── zstd_fast.h
│ │ ├── zstd_lazy.c
│ │ ├── zstd_lazy.h
│ │ ├── zstd_ldm.c
│ │ ├── zstd_ldm.h
│ │ ├── zstd_ldm_geartab.h
│ │ ├── zstd_opt.c
│ │ ├── zstd_opt.h
│ │ ├── zstd_preSplit.c
│ │ ├── zstd_preSplit.h
│ │ ├── zstdmt_compress.c
│ │ └── zstdmt_compress.h
│ ├── decompress/
│ │ ├── huf_decompress.c
│ │ ├── huf_decompress_amd64.S
│ │ ├── zstd_ddict.c
│ │ ├── zstd_ddict.h
│ │ ├── zstd_decompress.c
│ │ ├── zstd_decompress_block.c
│ │ ├── zstd_decompress_block.h
│ │ └── zstd_decompress_internal.h
│ ├── deprecated/
│ │ ├── zbuff.h
│ │ ├── zbuff_common.c
│ │ ├── zbuff_compress.c
│ │ └── zbuff_decompress.c
│ ├── dictBuilder/
│ │ ├── cover.c
│ │ ├── cover.h
│ │ ├── divsufsort.c
│ │ ├── divsufsort.h
│ │ ├── fastcover.c
│ │ └── zdict.c
│ ├── dll/
│ │ └── example/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── build_package.bat
│ │ ├── fullbench-dll.sln
│ │ └── fullbench-dll.vcxproj
│ ├── legacy/
│ │ ├── zstd_legacy.h
│ │ ├── zstd_v01.c
│ │ ├── zstd_v01.h
│ │ ├── zstd_v02.c
│ │ ├── zstd_v02.h
│ │ ├── zstd_v03.c
│ │ ├── zstd_v03.h
│ │ ├── zstd_v04.c
│ │ ├── zstd_v04.h
│ │ ├── zstd_v05.c
│ │ ├── zstd_v05.h
│ │ ├── zstd_v06.c
│ │ ├── zstd_v06.h
│ │ ├── zstd_v07.c
│ │ └── zstd_v07.h
│ ├── libzstd.mk
│ ├── libzstd.pc.in
│ ├── module.modulemap
│ ├── zdict.h
│ ├── zstd.h
│ └── zstd_errors.h
├── tests/
│ ├── .gitignore
│ ├── DEPRECATED-test-zstd-speed.py
│ ├── Makefile
│ ├── README.md
│ ├── automated_benchmarking.py
│ ├── bigdict.c
│ ├── checkTag.c
│ ├── check_size.py
│ ├── cli-tests/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── basic/
│ │ │ ├── args.sh
│ │ │ ├── args.sh.exit
│ │ │ ├── args.sh.stderr.glob
│ │ │ ├── help.sh
│ │ │ ├── help.sh.stdout.glob
│ │ │ ├── memlimit.sh
│ │ │ ├── memlimit.sh.stderr.exact
│ │ │ ├── memlimit.sh.stdout.exact
│ │ │ ├── output_dir.sh
│ │ │ ├── output_dir.sh.stderr.exact
│ │ │ ├── output_dir.sh.stdout.exact
│ │ │ ├── version.sh
│ │ │ └── version.sh.stdout.glob
│ │ ├── bin/
│ │ │ ├── cmp_size
│ │ │ ├── datagen
│ │ │ ├── die
│ │ │ ├── println
│ │ │ ├── zstd
│ │ │ ├── zstdgrep
│ │ │ └── zstdless
│ │ ├── cltools/
│ │ │ ├── setup
│ │ │ ├── zstdgrep.sh
│ │ │ ├── zstdgrep.sh.exit
│ │ │ ├── zstdgrep.sh.stderr.exact
│ │ │ ├── zstdgrep.sh.stdout.glob
│ │ │ ├── zstdless.sh
│ │ │ ├── zstdless.sh.stderr.exact
│ │ │ └── zstdless.sh.stdout.glob
│ │ ├── common/
│ │ │ ├── format.sh
│ │ │ ├── mtime.sh
│ │ │ ├── permissions.sh
│ │ │ └── platform.sh
│ │ ├── compression/
│ │ │ ├── adapt.sh
│ │ │ ├── basic.sh
│ │ │ ├── compress-literals.sh
│ │ │ ├── format.sh
│ │ │ ├── golden.sh
│ │ │ ├── gzip-compat.sh
│ │ │ ├── levels.sh
│ │ │ ├── levels.sh.stderr.exact
│ │ │ ├── long-distance-matcher.sh
│ │ │ ├── multi-threaded.sh
│ │ │ ├── multi-threaded.sh.stderr.exact
│ │ │ ├── multiple-files.sh
│ │ │ ├── multiple-files.sh.stdout.exact
│ │ │ ├── row-match-finder.sh
│ │ │ ├── setup
│ │ │ ├── stream-size.sh
│ │ │ ├── verbose-wlog.sh
│ │ │ ├── verbose-wlog.sh.stderr.glob
│ │ │ ├── verbose-wlog.sh.stdout.glob
│ │ │ ├── window-resize.sh
│ │ │ ├── window-resize.sh.stderr.ignore
│ │ │ └── window-resize.sh.stdout.glob
│ │ ├── decompression/
│ │ │ ├── detectErrors.sh
│ │ │ ├── golden.sh
│ │ │ ├── pass-through.sh
│ │ │ ├── pass-through.sh.stderr.exact
│ │ │ └── pass-through.sh.stdout.exact
│ │ ├── dict-builder/
│ │ │ ├── empty-input.sh
│ │ │ ├── empty-input.sh.stderr.exact
│ │ │ ├── no-inputs.sh
│ │ │ ├── no-inputs.sh.exit
│ │ │ └── no-inputs.sh.stderr.exact
│ │ ├── dictionaries/
│ │ │ ├── dictionary-mismatch.sh
│ │ │ ├── dictionary-mismatch.sh.stderr.exact
│ │ │ ├── golden.sh
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── file-handling/
│ │ │ ├── directory-mirror.sh
│ │ │ ├── directory-mirror.sh.stderr.exact
│ │ │ └── directory-mirror.sh.stdout.exact
│ │ ├── file-stat/
│ │ │ ├── compress-file-to-dir-without-write-perm.sh
│ │ │ ├── compress-file-to-dir-without-write-perm.sh.stderr.exact
│ │ │ ├── compress-file-to-file.sh
│ │ │ ├── compress-file-to-file.sh.stderr.exact
│ │ │ ├── compress-file-to-stdout.sh
│ │ │ ├── compress-file-to-stdout.sh.stderr.exact
│ │ │ ├── compress-stdin-to-file.sh
│ │ │ ├── compress-stdin-to-file.sh.stderr.exact
│ │ │ ├── compress-stdin-to-stdout.sh
│ │ │ ├── compress-stdin-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-file-to-file.sh
│ │ │ ├── decompress-file-to-file.sh.stderr.exact
│ │ │ ├── decompress-file-to-stdout.sh
│ │ │ ├── decompress-file-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-file.sh
│ │ │ ├── decompress-stdin-to-file.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-stdout.sh
│ │ │ └── decompress-stdin-to-stdout.sh.stderr.exact
│ │ ├── progress/
│ │ │ ├── no-progress.sh
│ │ │ ├── no-progress.sh.stderr.glob
│ │ │ ├── progress.sh
│ │ │ └── progress.sh.stderr.glob
│ │ ├── run.py
│ │ └── zstd-symlinks/
│ │ ├── setup
│ │ ├── zstdcat.sh
│ │ └── zstdcat.sh.stdout.exact
│ ├── datagencli.c
│ ├── decodecorpus.c
│ ├── dict-files/
│ │ └── zero-weight-dict
│ ├── external_matchfinder.c
│ ├── external_matchfinder.h
│ ├── fullbench.c
│ ├── fuzz/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── block_decompress.c
│ │ ├── block_round_trip.c
│ │ ├── decompress_cross_format.c
│ │ ├── decompress_dstSize_tooSmall.c
│ │ ├── dictionary_decompress.c
│ │ ├── dictionary_loader.c
│ │ ├── dictionary_round_trip.c
│ │ ├── dictionary_stream_round_trip.c
│ │ ├── fse_read_ncount.c
│ │ ├── fuzz.h
│ │ ├── fuzz.py
│ │ ├── fuzz_data_producer.c
│ │ ├── fuzz_data_producer.h
│ │ ├── fuzz_helpers.c
│ │ ├── fuzz_helpers.h
│ │ ├── fuzz_third_party_seq_prod.h
│ │ ├── generate_sequences.c
│ │ ├── huf_decompress.c
│ │ ├── huf_round_trip.c
│ │ ├── raw_dictionary_round_trip.c
│ │ ├── regression_driver.c
│ │ ├── seekable_roundtrip.c
│ │ ├── seq_prod_fuzz_example/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ └── example_seq_prod.c
│ │ ├── sequence_compression_api.c
│ │ ├── simple_compress.c
│ │ ├── simple_decompress.c
│ │ ├── simple_round_trip.c
│ │ ├── stream_decompress.c
│ │ ├── stream_round_trip.c
│ │ ├── zstd_frame_info.c
│ │ ├── zstd_helpers.c
│ │ └── zstd_helpers.h
│ ├── fuzzer.c
│ ├── golden-compression/
│ │ ├── PR-3517-block-splitter-corruption-test
│ │ ├── http
│ │ ├── huffman-compressed-larger
│ │ └── large-literal-and-match-lengths
│ ├── golden-decompression-errors/
│ │ ├── .gitignore
│ │ ├── off0.bin.zst
│ │ ├── truncated_huff_state.zst
│ │ └── zeroSeq_extraneous.zst
│ ├── golden-dictionaries/
│ │ └── http-dict-missing-symbols
│ ├── gzip/
│ │ ├── Makefile
│ │ ├── gzip-env.sh
│ │ ├── helin-segv.sh
│ │ ├── help-version.sh
│ │ ├── hufts.sh
│ │ ├── init.cfg
│ │ ├── init.sh
│ │ ├── keep.sh
│ │ ├── list.sh
│ │ ├── memcpy-abuse.sh
│ │ ├── mixed.sh
│ │ ├── null-suffix-clobber.sh
│ │ ├── stdin.sh
│ │ ├── test-driver.sh
│ │ ├── trailing-nul.sh
│ │ ├── unpack-invalid.sh
│ │ ├── z-suffix.sh
│ │ ├── zdiff.sh
│ │ ├── zgrep-context.sh
│ │ ├── zgrep-f.sh
│ │ ├── zgrep-signal.sh
│ │ └── znew-k.sh
│ ├── invalidDictionaries.c
│ ├── largeDictionary.c
│ ├── legacy.c
│ ├── libzstd_builds.sh
│ ├── longmatch.c
│ ├── loremOut.c
│ ├── loremOut.h
│ ├── paramgrill.c
│ ├── playTests.sh
│ ├── poolTests.c
│ ├── rateLimiter.py
│ ├── regression/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── data.c
│ │ ├── data.h
│ │ ├── levels.h
│ │ ├── method.c
│ │ ├── method.h
│ │ ├── result.c
│ │ ├── result.h
│ │ ├── results.csv
│ │ └── test.c
│ ├── roundTripCrash.c
│ ├── seqgen.c
│ ├── seqgen.h
│ ├── test-license.py
│ ├── test-variants.sh
│ ├── test-zstd-versions.py
│ └── zstreamtest.c
└── zlibWrapper/
├── .gitignore
├── Makefile
├── README.md
├── examples/
│ ├── example.c
│ ├── example_original.c
│ ├── fitblk.c
│ ├── fitblk_original.c
│ ├── minigzip.c
│ └── zwrapbench.c
├── gzclose.c
├── gzcompatibility.h
├── gzguts.h
├── gzlib.c
├── gzread.c
├── gzwrite.c
├── zstd_zlibwrapper.c
└── zstd_zlibwrapper.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [rui314] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/workflows/build-all.yml
================================================
name: Build all tarballs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build-linux:
strategy:
matrix:
include:
- { target: x86_64, os: ubuntu-24.04 }
- { target: aarch64, os: ubuntu-24.04-arm }
- { target: arm, os: ubuntu-24.04-arm }
- { target: riscv64, os: ubuntu-24.04 }
- { target: ppc64le, os: ubuntu-24.04 }
- { target: s390x, os: ubuntu-24.04 }
- { target: loongarch64, os: ubuntu-24.04 }
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Podman
run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static
- name: Login to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build a tarball
run: ./dist.sh ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: dist/mold-*.tar.gz
compression-level: 0
build-windows:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Archive
shell: pwsh
run: |
mkdir build
cd build
cmake -T clangcl ..
cmake --build . --config Release -j $Env:NUMBER_OF_PROCESSORS
cmake --install . --config Release --prefix ../mold-install
cd ..
New-Item -ItemType Directory -Force dist | Out-Null
$version = $Env:TAG -replace '^v', ''
Compress-Archive -Path mold-install\* -DestinationPath dist\mold-$version-windows-x86_64.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: win-x86_64
path: dist/mold-*.*
================================================
FILE: .github/workflows/build-native.yml
================================================
name: Build native tarballs
on:
push:
workflow_dispatch:
jobs:
build-tarballs:
strategy:
matrix:
include:
- { target: x86_64, os: ubuntu-24.04 }
- { target: aarch64, os: ubuntu-24.04-arm }
- { target: arm, os: ubuntu-24.04-arm }
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Podman
run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static
- name: Login to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build a tarball
run: ./dist.sh ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: dist/mold-*.tar.gz
compression-level: 0
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
pull_request:
env:
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
jobs:
build-asan-tsan:
strategy:
matrix:
target:
- ''
- '-DMOLD_USE_ASAN=On'
- '-DMOLD_USE_TSAN=On'
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: rui314/setup-mold@staging
- run: sudo ./install-build-deps.sh
- name: build
run: |
sudo apt-get install -y clang-18 clang gcc-multilib gdb dwarfdump zstd
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 ${{ matrix.target }} ..
cmake --build . -j$(nproc)
- run: cd build; ctest --output-on-failure -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-clang
path: |
build
!build/CMakeFiles
build-msan:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: .github/workflows/run-msan.sh
build-multi-archs:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: install-build-deps
run: |
sudo ./install-build-deps.sh
sudo ./install-cross-tools.sh
sudo .github/workflows/install-extras.sh
- name: build
run: |
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
- run: cd build; ctest --output-on-failure -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-multi-archs
path: |
build
!build/CMakeFiles
build-distros:
strategy:
matrix:
distro:
- alpine
- archlinux
- debian:11 # GCC 10 and CMake 3.18 - the minimum supported by mold
- fedora
- gentoo/stage3
- opensuse/tumbleweed
- ubuntu:22.04
- ubuntu:25.04
runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v4
- run: ./install-build-deps.sh
- name: build
run: |
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
- run: cd build; ctest --output-on-failure -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results-${{ matrix.distro }}
path: |
build
!build/CMakeFiles
build-macos:
runs-on: macos-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: build
run: |
mkdir build
cd build
cmake ..
cmake --build . -j$(sysctl -n hw.physicalcpu)
build-windows:
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: build
run: |
mkdir build
cd build
cmake -T clangcl ..
cmake --build . -j $Env:NUMBER_OF_PROCESSORS
build-msys:
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
pacboy: gcc-libs:p libwinpthread-git:p tbb:p zlib:p zstd:p dlfcn:p cc:p cmake:p ninja:p
- name: build
shell: msys2 {0}
run: |
mkdir build
cd build
cmake -GNinja -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON ..
cmake --build . -j $(nproc)
build-freebsd:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Build and test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
run: |
./install-build-deps.sh
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
ctest --output-on-failure -j$(nproc)
================================================
FILE: .github/workflows/install-extras.sh
================================================
#!/bin/bash -x
apt-get update
apt-get install -y wget xz-utils
# Install a 32-bit RISC-V toolchain
mkdir /rv32
wget -O- --progress=dot:mega https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.06.13/riscv32-glibc-ubuntu-24.04-gcc-nightly-2025.06.13-nightly.tar.xz | tar -C /rv32 --strip-components=1 --xz -xf -
ln -sf /rv32/sysroot /usr/riscv32-linux-gnu
echo '/rv32/bin/riscv32-unknown-linux-gnu-gcc -L/usr/riscv32-linux-gnu "$@"' > /usr/bin/riscv32-linux-gnu-gcc
echo '/rv32/bin/riscv32-unknown-linux-gnu-g++ -L/usr/riscv32-linux-gnu "$@"' > /usr/bin/riscv32-linux-gnu-g++
chmod 755 /usr/bin/riscv32-linux-gnu-{gcc,g++}
for i in objdump objcopy strip; do
ln -sf /rv32/bin/riscv32-unknown-linux-gnu-$i /usr/bin/riscv32-linux-gnu-$i
done
# Install a LoongArch toolchain
mkdir /larch
wget -O- --progress=dot:mega https://github.com/loongson/build-tools/releases/download/2025.06.06/x86_64-cross-tools-loongarch64-binutils_2.44-gcc_15.1.0-glibc_2.41.tar.xz | tar -C /larch --strip-components=1 --xz -xf -
cp -r /larch/loongarch64-unknown-linux-gnu/lib/* /larch/target/lib64
ln -sf /larch/target /usr/loongarch64-linux-gnu
for i in gcc g++ objdump objcopy strip; do
ln -sf /larch/bin/loongarch64-unknown-linux-gnu-$i /usr/bin/loongarch64-linux-gnu-$i
done
wget -O /usr/local/bin/qemu-loongarch64 --progress=dot:mega https://github.com/loongson/build-tools/releases/download/2025.06.06/qemu-loongarch64
chmod 755 /usr/local/bin/qemu-loongarch64
# Install ARM32 big-endian toolchain
mkdir /armeb
wget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/armebv7-eabihf/tarballs/armebv7-eabihf--glibc--stable-2024.05-1.tar.xz | tar -C /armeb --strip-components=1 --xz -xf -
ln -sf /armeb/armeb-buildroot-linux-gnueabihf/sysroot /usr/armeb-linux-gnueabihf
echo '/armeb/bin/armeb-linux-gcc -L/usr/armeb-linux-gnu "$@"' > /usr/bin/armeb-linux-gnueabihf-gcc
echo '/armeb/bin/armeb-linux-g++ -L/usr/armeb-linux-gnu "$@"' > /usr/bin/armeb-linux-gnueabihf-g++
chmod 755 /usr/bin/armeb-linux-gnueabihf-{gcc,g++}
for i in objdump objcopy strip; do
ln -sf /armeb/bin/armeb-linux-$i /usr/bin/armeb-linux-gnueabihf-$i
done
# Install ARM64 big-endian toolchain
mkdir /aarch64be
wget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64be/tarballs/aarch64be--glibc--stable-2024.05-1.tar.xz | tar -C /aarch64be --strip-components=1 --xz -xf -
ln -sf /aarch64be/aarch64_be-buildroot-linux-gnu/sysroot /usr/aarch64_be-linux-gnu
echo '/aarch64be/bin/aarch64_be-linux-gcc -L/usr/aarch64_be-linux-gnu "$@"' > /usr/bin/aarch64_be-linux-gnu-gcc
echo '/aarch64be/bin/aarch64_be-linux-g++ -L/usr/aarch64_be-linux-gnu "$@"' > /usr/bin/aarch64_be-linux-gnu-g++
chmod 755 /usr/bin/aarch64_be-linux-gnu-{gcc,g++}
for i in objdump objcopy strip; do
ln -sf /aarch64be/bin/aarch64_be-linux-$i /usr/bin/aarch64_be-linux-gnu-$i
done
# Install SH4 big-endian toolchain
mkdir /sh4aeb
wget -O- --progress=dot:mega https://toolchains.bootlin.com/downloads/releases/toolchains/sh-sh4aeb/tarballs/sh-sh4aeb--glibc--stable-2024.05-1.tar.xz | tar -C /sh4aeb --strip-components=1 --xz -xf -
ln -sf /sh4aeb/sh4aeb-buildroot-linux-gnu/sysroot /usr/sh4aeb-linux-gnu
echo '/sh4aeb/bin/sh4aeb-linux-gcc -L/usr/sh4aeb-linux-gnu "$@"' > /usr/bin/sh4aeb-linux-gnu-gcc
echo '/sh4aeb/bin/sh4aeb-linux-g++ -L/usr/sh4aeb-linux-gnu "$@"' > /usr/bin/sh4aeb-linux-gnu-g++
chmod 755 /usr/bin/sh4aeb-linux-gnu-{gcc,g++}
for i in objdump objcopy strip; do
ln -sf /sh4aeb/bin/sh4aeb-linux-$i /usr/bin/sh4aeb-linux-gnu-$i
done
# Install Intel SDE CPU emulator for CET-related tests
mkdir /sde
wget -O- --progress=dot:mega https://downloadmirror.intel.com/850782/sde-external-9.53.0-2025-03-16-lin.tar.xz | tar -C /sde --strip-components=1 --xz -xf -
ln -s /sde/sde64 /usr/bin
================================================
FILE: .github/workflows/release-assets.yml
================================================
name: Build & attach tarballs on tag push
on:
push:
tags: ['v[0-9]*']
permissions:
contents: write
packages: write
id-token: write
env:
TAG: ${{ github.ref_name }}
jobs:
build-linux:
strategy:
matrix:
include:
- { target: x86_64, os: ubuntu-24.04 }
- { target: aarch64, os: ubuntu-24.04-arm }
- { target: arm, os: ubuntu-24.04-arm }
- { target: riscv64, os: ubuntu-24.04 }
- { target: ppc64le, os: ubuntu-24.04 }
- { target: s390x, os: ubuntu-24.04 }
- { target: loongarch64, os: ubuntu-24.04 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Podman
run: sudo apt-get update && sudo apt-get install -y podman qemu-user-static
- name: Login to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: ./dist.sh ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: dist/mold-*.tar.gz
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build and Archive
shell: pwsh
run: |
mkdir build
cd build
cmake -T clangcl ..
cmake --build . --config Release -j $Env:NUMBER_OF_PROCESSORS
cmake --install . --config Release --prefix ../mold-install
cd ..
New-Item -ItemType Directory -Force dist | Out-Null
$version = $Env:TAG -replace '^v', ''
Compress-Archive -Path mold-install\* -DestinationPath dist\mold-$version-x86_64-windows.zip
- uses: actions/upload-artifact@v4
with:
name: win-x86_64
path: dist/mold-*.*
publish:
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
pattern: '*'
merge-multiple: true
- name: Ensure release exists (create if missing)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
if gh release view "$TAG" >& /dev/null; then
echo "Existing release found for $TAG"
else
echo "Creating draft release for $TAG"
gh release create "$TAG" --draft \
--title "$TAG" \
--notes "Automated draft – fill the changelog later."
fi
- name: Upload tarballs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "$TAG" dist/* --clobber
gh release view "$TAG" --json assets --jq '.assets[].name'
================================================
FILE: .github/workflows/run-msan.sh
================================================
#!/bin/bash
set -e -x
cd "$(dirname $0)"/../..
if [ "$GITHUB_REPOSITORY" = '' ]; then
image=mold-msan
image_build="podman build -t $image -"
else
# If this script is running on GitHub Actions, we want to cache
# the created container image in GitHub's container repostiory.
image=ghcr.io/$GITHUB_REPOSITORY/mold-msan
image_build="podman build -t $image --output=type=registry --layers --cache-to $image --cache-from $image -"
fi
cat <<EOF | $image_build
FROM mirror.gcr.io/library/ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential gcc g++ wget ca-certificates make cmake ninja-build python3 clang-20 llvm-20-dev libclang-20-dev libclang-rt-20-dev libtbb-dev mold && \
rm -rf /var/lib/apt/lists
RUN mkdir /llvm && \
cd /llvm && \
wget -O- --progress=dot:mega https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-21.1.1.tar.gz | tar xzf - --strip-components=1 && \
cmake -S ./runtimes -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_USE_SANITIZER=MemoryWithOrigins && \
cmake --build build -j\$(nproc) && \
cmake --install build --prefix /msan && \
rm -rf /llvm
EOF
# Build mold and run its tests
podman run -it --rm --pull=never -v "$(pwd):/mold:ro" --security-opt seccomp=unconfined $image bash -c "
set -e
mkdir /build
cd /build
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20 -DMOLD_USE_MSAN=ON -DMOLD_STDLIB_PREFIX=/msan -DMOLD_USE_MIMALLOC=0 -DMOLD_USE_SYSTEM_TBB=1 -DMOLD_USE_MOLD=1 /mold
cmake --build . -j\$(nproc)
setarch -R ctest --output-on-failure -j\$(nproc)
"
================================================
FILE: .github/workflows/update-manpage.yml
================================================
name: Update manpage
on:
push:
paths:
- 'docs/mold.md'
branches:
- main
workflow_dispatch:
jobs:
update-manpage:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install ronn
run: sudo apt-get update && sudo apt-get install -y ronn
- name: Generate mold.1 from mold.md
run: ronn --roff docs/mold.md
- name: Configure Git
run: |
git config --global user.name 'Rui Ueyama'
git config --global user.email 'rui314@gmail.com'
- name: Commit and push if mold.1 is updated
run: |
git add docs/mold.1
git diff --staged --quiet || (git commit -m "Update mold.1 (automated commit)" && git push)
================================================
FILE: .gitignore
================================================
*.o
*.so
*~
**/.DS_Store
.cache
core
gentoo
/mold-*.tar.gz
/build*
/mold
/dist
================================================
FILE: CMakeLists.txt
================================================
# You can customize a build by specifying CMake options. An option may be
# given in the -Dvariable=value form. For a boolean variable, `ON` or `1`
# means true, while `OFF` or `0` means false.
#
# Here are a couple of common cmake options:
#
# -DCMAKE_C_COMPILER=<command-name>
#
# Specifies the C compiler name to use. The default value is `cc`.
#
# -DCMAKE_CXX_COMPILER=<command-name>
#
# Specifies the C++ compiler name to use. The default value is `c++`.
#
# -DCMAKE_INSTALL_PREFIX=<directory>
#
# Specifies the install target directory. The default value is `/usr/local`.
#
# -DCMAKE_BUILD_TYPE=[Debug | Release | RelWithDebInfo | MinSizeRel]
#
# Specifies the build type. The default is `Release`, which is the right
# option unless you are debugging mold.
#
# An example of a cmake command line is shown below:
#
# $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_COMPILER=g++-12 ..
#
# where `..` refers to this directory.
#
# With cmake, you may run `cmake --install .` instead of `make install` to
# install build artifacts to system directories. If you want to install
# artifacts to a temporary target directory, run `cmake --install . --prefix
# <dir>`.
#
# You can see the current cmake variables and their values by running
# `cmake -N -L .` in a build directory.
#
# Note that in this file, we provide various dials and knobs to configure
# how to build mold. However, as a policy, we do not provide a way to
# enable/disable any individual mold's feature. In other words, we do not
# provide options like `--enable-foo` or `--disable-foo`. The motivation
# behind this is build reproducibility. We want to guarantee that all builds
# of the mold linker of the same version will have the exact same set of
# features and behave exactly the same.
cmake_minimum_required(VERSION 3.14)
project(mold VERSION 2.40.4)
include(CMakeDependentOption)
include(CheckSymbolExists)
include(GNUInstallDirs)
add_executable(mold)
target_compile_features(mold PRIVATE cxx_std_20)
if(MINGW)
target_link_libraries(mold PRIVATE dl)
else()
target_link_libraries(mold PRIVATE ${CMAKE_DL_LIBS})
endif()
# Build mold itself using mold if -DMOLD_USE_MOLD=ON
option(MOLD_USE_MOLD "Use mold to build mold" OFF)
if(MOLD_USE_MOLD)
target_link_options(mold PRIVATE -fuse-ld=mold)
if(CMAKE_BUILD_TYPE MATCHES "Deb")
target_link_options(mold PRIVATE -Wl,--gdb-index)
endif()
if(CMAKE_BUILD_TYPE MATCHES "^Rel")
target_link_options(mold PRIVATE -Wl,--gc-sections,--icf=safe)
endif()
endif()
if(NOT "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
target_compile_options(mold PRIVATE
-fno-exceptions
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-ffunction-sections
-fdata-sections
-Wall
-Wextra
-Wno-sign-compare
-Wno-unused-function
-Wno-unused-parameter
-Wno-missing-field-initializers
-ggnu-pubnames)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(mold PRIVATE -D_GLIBCXX_ASSERTIONS)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
set(OPENBSD ON)
endif()
# Build mold with -flto if -DMOLD_LTO=ON
option(MOLD_LTO "Build mold with link-time optimization enabled")
if(MOLD_LTO)
set_property(TARGET mold PROPERTY INTERPROCEDURAL_OPTIMIZATION ON)
endif()
# Enable AddressSanitizer if -DMOLD_USE_ASAN=ON
option(MOLD_USE_ASAN "Build mold with AddressSanitizer" OFF)
if(MOLD_USE_ASAN)
target_compile_options(mold PRIVATE -fsanitize=address -fsanitize=undefined)
target_link_options(mold PRIVATE -fsanitize=address -fsanitize=undefined)
endif()
# Enabled ThreadSanitizer if -DMOLD_USE_TSAN=ON
option(MOLD_USE_TSAN "Build mold with ThreadSanitizer" OFF)
if(MOLD_USE_TSAN)
target_compile_options(mold PRIVATE -fsanitize=thread)
target_link_options(mold PRIVATE -fsanitize=thread)
endif()
# Enable MemorySanitizer if -DMOLD_USE_MSAN=ON
option(MOLD_USE_MSAN "Build mold with MemorySanitizer" OFF)
if(MOLD_USE_MSAN)
set(MOLD_STDLIB_PREFIX /usr CACHE FILEPATH "prefix of instrumented stdlib")
target_compile_options(mold PRIVATE
-g -Og -fsanitize=memory -fsanitize-memory-track-origins
-nostdinc++ -isystem ${MOLD_STDLIB_PREFIX}/include/c++/v1
-DENABLE_MSAN_UNPOISON
)
target_link_options(mold PRIVATE
-fsanitize=memory
-nostdlib++ -L ${MOLD_STDLIB_PREFIX}/lib -lc++
-Wl,-rpath,${MOLD_STDLIB_PREFIX}/lib
)
endif()
# Statically-link libstdc++ if -DMOLD_MOSTLY_STATIC=ON.
#
# This option is intended to be used by `./dist.sh` script to create a
# mold binary that works on various Linux distros. You probably don't
# need nor want to set this to ON.
option(MOLD_MOSTLY_STATIC "Statically link libstdc++ and some other libraries" OFF)
if(MOLD_MOSTLY_STATIC)
target_link_options(mold PRIVATE -static-libstdc++)
endif()
# Find zlib. If libz.so is not found, we compile a bundled one and
# statically-link it to mold.
find_package(ZLIB QUIET)
if(ZLIB_FOUND AND NOT MOLD_MOSTLY_STATIC)
target_link_libraries(mold PRIVATE ZLIB::ZLIB)
else()
set(ZLIB_BUILD_EXAMPLES OFF CACHE INTERNAL "")
add_subdirectory(third-party/zlib EXCLUDE_FROM_ALL)
target_include_directories(zlibstatic INTERFACE third-party/zlib
$<TARGET_PROPERTY:zlibstatic,BINARY_DIR>)
target_link_libraries(mold PRIVATE zlibstatic)
endif()
# Find BLAKE3 cryptographic hash library. Just like zlib, if libblkae3.so
# is not found, we compile a bundled one and statically-link it to mold.
find_package(BLAKE3 QUIET)
if(BLAKE3_FOUND AND NOT MOLD_MOSTLY_STATIC)
target_link_libraries(mold PRIVATE BLAKE3::blake3)
else()
function(mold_add_blake3)
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(third-party/blake3/c EXCLUDE_FROM_ALL)
target_link_libraries(mold PRIVATE blake3)
target_include_directories(mold PUBLIC third-party/blake3/c)
endfunction()
mold_add_blake3()
endif()
# Find zstd compression library. If zstd.h is not found, we compile a
# bundled one and statically-link it to mold.
include(CheckIncludeFile)
check_include_file(zstd.h HAVE_ZSTD_H)
if(HAVE_ZSTD_H AND NOT MOLD_MOSTLY_STATIC)
target_link_libraries(mold PRIVATE zstd)
else()
set(ZSTD_BUILD_PROGRAMS OFF)
set(ZSTD_BUILD_CONTRIB OFF)
set(ZSTD_BUILD_TESTS OFF)
set(ZSTD_MULTITHREAD_SUPPORT OFF)
set(ZSTD_BUILD_SHARED OFF)
set(ZSTD_BUILD_STATIC ON)
add_subdirectory(third-party/zstd/build/cmake EXCLUDE_FROM_ALL)
target_include_directories(mold PUBLIC third-party/zstd/lib)
target_link_libraries(mold PRIVATE libzstd_static)
endif()
# Find mimalloc. mimalloc is an alternative malloc implementation
# optimized for multi-threaded applications.
#
# If you want to use the usual libc's malloc, pass -DMOLD_USE_MIMALLOC=OFF.
#
# We enable mimalloc by default for 64-bit targets. It doesn't seem to
# be stable on 32-bit targets.
cmake_dependent_option(
MOLD_USE_MIMALLOC "Use mimalloc" ON
"CMAKE_SIZEOF_VOID_P EQUAL 8; NOT APPLE; NOT ANDROID; NOT OPENBSD; NOT MOLD_USE_ASAN; NOT MOLD_USE_TSAN" OFF)
cmake_dependent_option(
MOLD_USE_SYSTEM_MIMALLOC "Use system or vendored mimalloc" OFF
MOLD_USE_MIMALLOC OFF)
# By default, we build a bundled mimalloc and statically-link it to
# mold. If you want to dynamically link to the system's
# libmimalloc.so, pass -DMOLD_USE_SYSTEM_MIMALLOC=ON.
if(MOLD_USE_MIMALLOC)
if(MOLD_USE_SYSTEM_MIMALLOC)
find_package(mimalloc REQUIRED)
target_link_libraries(mold PRIVATE mimalloc)
else()
function(mold_add_mimalloc)
set(MI_BUILD_STATIC ON CACHE INTERNAL "")
set(MI_BUILD_TESTS OFF CACHE INTERNAL "")
set(MI_NO_OPT_ARCH ON CACHE INTERNAL "")
add_subdirectory(third-party/mimalloc EXCLUDE_FROM_ALL)
target_compile_definitions(mimalloc-static PRIVATE MI_USE_ENVIRON=0)
target_link_libraries(mold PRIVATE mimalloc-static)
endfunction()
mold_add_mimalloc()
endif()
endif()
# Find TBB. TBB (OneTBB or Intel TBB) is a high-level threading library.
# Use of this library is mandatory.
#
# By default, we build a bundled one and statically-link the library
# to mold. If you want to link to the system's libtbb2.so, pass
# -DMOLD_USE_SYSTEM_TBB=ON.
option(MOLD_USE_SYSTEM_TBB "Use system or vendored TBB" OFF)
if(MOLD_USE_SYSTEM_TBB OR BLAKE3_USE_TBB)
find_package(TBB REQUIRED)
target_link_libraries(mold PRIVATE TBB::tbb)
else()
function(mold_add_tbb)
set(BUILD_SHARED_LIBS OFF)
set(TBB_TEST OFF CACHE INTERNAL "")
set(TBB_STRICT OFF CACHE INTERNAL "")
add_subdirectory(third-party/tbb EXCLUDE_FROM_ALL)
target_compile_definitions(tbb PRIVATE __TBB_DYNAMIC_LOAD_ENABLED=0)
target_link_libraries(mold PRIVATE TBB::tbb)
endfunction()
mold_add_tbb()
endif()
# We always use Clang to build mold on Windows. MSVC can't compile mold.
if(WIN32)
if(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR
"Your compiler is not supported; install Clang from Visual Studio Installer and re-run cmake with '-T clangcl'")
endif()
target_compile_definitions(mold PRIVATE NOGDI NOMINMAX)
if(MINGW)
target_compile_definitions(mold PRIVATE _WIN32_WINNT=0xA00)
target_link_libraries(mold PRIVATE bcrypt)
endif()
else()
include(CheckLibraryExists)
check_library_exists(m pow "" LIBM_FOUND)
if(LIBM_FOUND)
target_link_libraries(mold PRIVATE m)
endif()
endif()
# Build mold-wrapper.so
if(NOT APPLE AND NOT WIN32)
add_library(mold-wrapper SHARED)
install(TARGETS mold-wrapper DESTINATION ${CMAKE_INSTALL_LIBDIR}/mold)
# Remove the default `lib` prefix
set_target_properties(mold-wrapper PROPERTIES PREFIX "")
target_link_libraries(mold-wrapper PRIVATE ${CMAKE_DL_LIBS})
target_sources(mold-wrapper PRIVATE src/mold-wrapper.c)
endif()
# If atomics doesn't work by default, add -latomic.
# We need the flag on riscv, armv6 and m68k.
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("#include <atomic>
int main() {
std::atomic_uint8_t a;
std::atomic_uint16_t b;
std::atomic_uint32_t c;
std::atomic_uint64_t d;
return ++a + ++b + ++c + ++d;
}" HAVE_FULL_ATOMIC_SUPPORT)
if(NOT HAVE_FULL_ATOMIC_SUPPORT)
target_link_libraries(mold PRIVATE atomic)
endif()
# Add -pthread
if(NOT APPLE AND NOT MSVC)
target_compile_options(mold PRIVATE -pthread)
target_link_options(mold PRIVATE -pthread)
endif()
check_symbol_exists(madvise sys/mman.h HAVE_MADVISE)
check_symbol_exists(uname sys/utsname.h HAVE_UNAME)
# Create a .cc file containing the current git hash for `mold --version`.
add_custom_target(git_hash
COMMAND ${CMAKE_COMMAND}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-DOUTPUT_FILE=${CMAKE_BINARY_DIR}/mold-git-hash.h
-P ${CMAKE_SOURCE_DIR}/lib/update-git-hash.cmake
DEPENDS lib/update-git-hash.cmake
BYPRODUCTS mold-git-hash.h
VERBATIM)
add_dependencies(mold git_hash)
# Almost all functions are template in mold which take a target type
# (e.g. X86_64) as its type parameter. Since we suport more than 10
# targets, compiling a single source file for all the targets is very
# slow.
#
# As a workaround, we create a .cc file for each target and spawn many
# compiler instances. This is hacky but greatly reduces compile time
# on a multicore machine.
#
# You can build mold for a specific set of targets by passing, e.g.,
# -DMOLD_TARGETS='X86_64;ARM64LE', though this is strongly discouraged
# for build reproducibility. Use this option only if you build mold
# frequently for your personal use; otherwise, always build mold with all
# targets enabled. We provide this flag in the trust that you will not
# abuse it, so please don’t betray that trust.
set(MOLD_TARGETS
X86_64 I386 ARM64LE ARM64BE ARM32LE ARM32BE RV32LE RV32BE RV64LE
RV64BE PPC32 PPC64V1 PPC64V2 S390X SPARC64 M68K SH4LE SH4BE
LOONGARCH32 LOONGARCH64
CACHE STRING "List of supported targets")
list(GET MOLD_TARGETS 0 MOLD_FIRST_TARGET)
list(APPEND MOLD_TEMPLATE_FILES
src/arch-arm32.cc
src/arch-arm64.cc
src/arch-i386.cc
src/arch-loongarch.cc
src/arch-m68k.cc
src/arch-ppc32.cc
src/arch-ppc64v1.cc
src/arch-ppc64v2.cc
src/arch-riscv.cc
src/arch-s390x.cc
src/arch-sh4.cc
src/arch-sparc64.cc
src/arch-x86-64.cc
src/archive-file.cc
src/cmdline.cc
src/error.cc
src/filetype.cc
src/gc-sections.cc
src/gdb-index.cc
src/icf.cc
src/input-files.cc
src/input-sections.cc
src/linker-script.cc
src/main.cc
src/mapfile.cc
src/output-chunks.cc
src/passes.cc
src/relocatable.cc
src/shrink-sections.cc
src/thunks.cc
src/tls.cc
)
if(WIN32 AND NOT MINGW)
list(APPEND MOLD_TEMPLATE_FILES src/lto-win32.cc)
else()
list(APPEND MOLD_TEMPLATE_FILES src/lto-unix.cc)
endif()
if(WIN32)
list(APPEND MOLD_TEMPLATE_FILES
src/output-file-win32.cc
src/subprocess-win32.cc
)
else()
list(APPEND MOLD_TEMPLATE_FILES
src/output-file-unix.cc
src/subprocess-unix.cc
)
endif()
function(mold_instantiate_templates SOURCE TARGET)
set(PATH ${CMAKE_BINARY_DIR}/${SOURCE}.${TARGET}.cc)
if(NOT EXISTS ${PATH})
file(WRITE ${PATH} "#define MOLD_${TARGET} 1
#define MOLD_TARGET ${TARGET}
#include \"${CMAKE_SOURCE_DIR}/${SOURCE}\"
")
endif()
target_sources(mold PRIVATE ${PATH})
endfunction()
foreach (SOURCE IN LISTS MOLD_TEMPLATE_FILES)
foreach(TARGET IN LISTS MOLD_TARGETS)
mold_instantiate_templates(${SOURCE} ${TARGET})
set(HAVE_TARGET_${TARGET} 1)
endforeach()
endforeach()
# Add other non-template source files.
target_sources(mold PRIVATE
lib/aho-corasick.cc
lib/compress.cc
lib/crc32.cc
lib/demangle.cc
lib/filepath.cc
lib/glob.cc
lib/hyperloglog.cc
lib/perf.cc
lib/random.cc
lib/tar.cc
src/elf.cc
src/entry.cc
third-party/rust-demangle/rust-demangle.c
)
if(WIN32)
target_sources(mold PRIVATE
src/jobs-win32.cc
src/mapped-file-win32.cc
src/signal-win32.cc
)
else()
target_sources(mold PRIVATE
src/jobs-unix.cc
src/mapped-file-unix.cc
src/signal-unix.cc
)
endif()
# Create config.h file
configure_file(lib/config.h.in config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Test configs
include(CTest)
if(BUILD_TESTING)
# Create the ld symlinks required for testing
if(NOT WIN32)
add_custom_command(
TARGET mold POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink mold ld
BYPRODUCTS ld
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
VERBATIM)
endif()
if(${UNIX})
add_subdirectory(test)
endif()
endif()
if(NOT CMAKE_SKIP_INSTALL_RULES)
install(TARGETS mold RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES docs/mold.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
function(mold_install_relative_symlink OLD NEW)
install(CODE "
get_filename_component(PREFIX_ABS \${CMAKE_INSTALL_PREFIX}/ ABSOLUTE)
get_filename_component(OLD_ABS ${OLD} ABSOLUTE BASE_DIR \${PREFIX_ABS})
get_filename_component(NEW_ABS ${NEW} ABSOLUTE BASE_DIR \${PREFIX_ABS})
get_filename_component(NEW_DIR \${NEW_ABS} DIRECTORY)
file(RELATIVE_PATH OLD_REL \${NEW_DIR} \${OLD_ABS})
message(STATUS \"Installing symlink: \$ENV{DESTDIR}\${NEW_ABS} -> \${OLD_REL}\")
file(MAKE_DIRECTORY \$ENV{DESTDIR}\${NEW_DIR})
file(CREATE_LINK \${OLD_REL} \$ENV{DESTDIR}\${NEW_ABS} SYMBOLIC)")
endfunction()
if(NOT WIN32)
mold_install_relative_symlink(${CMAKE_INSTALL_BINDIR}/mold${CMAKE_EXECUTABLE_SUFFIX}
${CMAKE_INSTALL_LIBEXECDIR}/mold/ld${CMAKE_EXECUTABLE_SUFFIX})
mold_install_relative_symlink(${CMAKE_INSTALL_BINDIR}/mold${CMAKE_EXECUTABLE_SUFFIX}
${CMAKE_INSTALL_BINDIR}/ld.mold${CMAKE_EXECUTABLE_SUFFIX})
mold_install_relative_symlink(${CMAKE_INSTALL_MANDIR}/man1/mold.1
${CMAKE_INSTALL_MANDIR}/man1/ld.mold.1)
endif()
endif()
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2023 Rui Ueyama
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# mold: A Modern Linker
mold is a faster drop-in replacement for existing Unix linkers. It is several
times quicker than the LLVM lld linker, the second-fastest open-source linker,
which I initially developed a few years ago. mold aims to enhance developer
productivity by minimizing build time, particularly in rapid
debug-edit-rebuild cycles.
Here is a performance comparison of GNU ld, GNU gold, LLVM lld, and
mold when linking final debuginfo-enabled executables for major large
programs on a simulated 16-core, 32-thread machine.

| Program (linker output size) | GNU ld | GNU gold | LLVM lld | mold
|-------------------------------|--------|----------|----------|------
| MySQL 8.3 (0.47 GiB) | 10.84s | 7.47s | 1.64s | 0.46s
| Clang 19 (1.56 GiB) | 42.07s | 33.13s | 5.20s | 1.35s
| Chromium 124 (1.35 GiB) | N/A | 27.40s | 6.10s | 1.52s
mold is so fast that it is only 2x _slower_ than the `cp` command on the same
machine. If you find that mold is not faster than other linkers, feel
free to [file a bug report](https://github.com/rui314/mold/issues).
mold supports x86-64, i386, ARM64, ARM32, 64-bit/32-bit little/big-endian
RISC-V, 32-bit PowerPC, 64-bit big-endian PowerPC ELFv1, 64-bit little-endian
PowerPC ELFv2, s390x, 64-bit/32-bit LoongArch, SPARC64, m68k, and SH-4.
## Why does linking speed matter?
If you are using a compiled language such as C, C++, or Rust, a build consists
of two phases. In the first phase, a compiler compiles source files into
object files (`.o` files). In the second phase, a linker takes all object
files and combines them into a single executable or shared library file.
The second phase can be time-consuming if your build output is large. mold can
speed up this process, saving you time and preventing distractions while
waiting for a lengthy build to finish. The difference is most noticeable
during rapid debug-edit-rebuild cycles.
## Installation
Binary packages for the following systems are currently available:
[](https://repology.org/project/mold/versions)
## How to Build
mold is written in C++20, so if you build mold yourself, you will need a
recent version of a C++ compiler and a C++ standard library. We recommend GCC
10.2 or Clang 16.0.0 (or later) and libstdc++ 10 or libc++ 7 (or later).
### Install Dependencies
To install build dependencies, run `./install-build-deps.sh` in this
directory. It will detect your Linux distribution and attempt to install the
necessary packages. You may need to run it as root.
### Compile mold
```shell
git clone --branch stable https://github.com/rui314/mold.git
cd mold
./install-build-deps.sh
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ -B build
cmake --build build -j$(nproc)
sudo cmake --build build --target install
```
You might need to pass a C++20 compiler command name to `cmake`. In the
example above, `c++` is passed. If that doesn't work for you, try a specific
version of a compiler, such as `g++-10` or `clang++-12`.
By default, `mold` is installed to `/usr/local/bin`. You can change the
installation location by passing `-DCMAKE_INSTALL_PREFIX=<directory>`.
For other cmake options, see the comments in `CMakeLists.txt`.
If you are not using a recent enough Linux distribution, or if `cmake` does
not work for you for any reason, you can use Podman to build mold in a
container. To do so, run `./dist.sh` in this directory instead of using
`cmake`. The shell script will pull a container image, build mold and auxiliary
files inside it, and package them into a single tar file named
`dist/mold-$version-$arch-linux.tar.gz`. You can extract the tar file anywhere
and use the mold executable in it.
## How to use
<details><summary>A classic way to use mold</summary>
On Unix, the linker command (usually `/usr/bin/ld`) is indirectly invoked by
the compiler driver (typically `cc`, `gcc`, or `clang`), which is in turn
indirectly invoked by `make` or other build system commands.
If you can specify an additional command line option for your compiler driver
by modifying the build system's config files, add one of the following flags
to use mold instead of `/usr/bin/ld`:
- For Clang: pass `-fuse-ld=mold`
- For GCC 12.1.0 or later: pass `-fuse-ld=mold`
- For GCC before 12.1.0: the `-fuse-ld` option does not accept `mold` as a
valid argument, so you need to use the `-B` option instead. The `-B` option
tells GCC where to look for external commands like `ld`.
If you have installed mold with `make install`, there should be a directory
named `/usr/libexec/mold` (or `/usr/local/libexec/mold`, depending on your
`$PREFIX`), and the `ld` command should be there. The `ld` is actually a
symlink to `mold`. So, all you need is to pass `-B/usr/libexec/mold` (or
`-B/usr/local/libexec/mold`) to GCC.
If you haven't installed `ld.mold` to any `$PATH`, you can still pass
`-fuse-ld=/absolute/path/to/mold` to clang to use mold. However, GCC does not
accept an absolute path as an argument for `-fuse-ld`.
</details>
<details><summary>If you are using Rust</summary>
Create `.cargo/config.toml` in your project directory with the following:
```toml
[target.'cfg(target_os = "linux")']
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/path/to/mold"]
```
where `/path/to/mold` is an absolute path to the mold executable. In the
example above, we use `clang` as a linker driver since it always accepts the
`-fuse-ld` option. If your GCC is recent enough to recognize the option, you
may be able to remove the `linker = "clang"` line.
```toml
[target.'cfg(target_os = "linux")']
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
```
If you want to use mold for all projects, add the above snippet to
`~/.cargo/config.toml`.
</details>
<details><summary>If you are using Nim</summary>
Create `config.nims` in your project directory with the following:
```nim
when findExe("mold").len > 0 and defined(linux):
switch("passL", "-fuse-ld=mold")
```
where `mold` must be included in the `PATH` environment variable. In this
example, `gcc` is used as the linker driver. Use the `-fuse-ld` option if your
GCC is recent enough to recognize this option.
If you want to use mold for all projects, add the above snippet to
`~/.config/config.nims`.
</details>
<details><summary>If you are using Conan package manager</summary>
You can configure [Conan](https://github.com/conan-io) to download the latest
version of `mold` and use it as the linker when building your dependencies and
projects from source. Please see the instructions [here](https://conan.io/center/recipes/mold).
</details>
<details><summary>mold -run</summary>
It is sometimes very hard to pass an appropriate command line option to `cc`
to specify an alternative linker. To address this situation, mold has a
feature to intercept all invocations of `ld`, `ld.bfd`, `ld.lld`, or `ld.gold`
and redirect them to itself. To use this feature, run `make` (or another build
command) as a subcommand of mold as follows:
```shell
mold -run make <make-options-if-any>
```
Internally, mold invokes a given command with the `LD_PRELOAD` environment
variable set to its companion shared object file. The shared object file
intercepts all function calls to `exec(3)`-family functions to replace
`argv[0]` with `mold` if it is `ld`, `ld.bf`, `ld.gold`, or `ld.lld`.
</details>
<details><summary>GitHub Actions</summary>
You can use our [setup-mold](https://github.com/rui314/setup-mold) GitHub
Action to speed up GitHub-hosted continuous builds. Although GitHub Actions
run on a 4 core machine, mold is still significantly faster than the default
GNU linker, especially when linking large programs.
</details>
<details><summary>Verify that you are using mold</summary>
mold leaves its identification string in the `.comment` section of an output
file. You can print it out to verify that you are actually using mold.
```shell
$ readelf -p .comment <executable-file>
String dump of section '.comment':
[ 0] GCC: (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0
[ 2b] mold 9a1679b47d9b22012ec7dfbda97c8983956716f7
```
If `mold` is present in the `.comment` section, the file was created by mold.
</details>
<details><summary>Online manual</summary>
Since mold is a drop-in replacement, you should be able to use it without
reading its manual. However, if you need it, [mold's man page](docs/mold.md)
is available online. You can read the same manual by running `man mold`.
</details>
## Why is mold so fast?
One reason is that it utilizes faster algorithms and more efficient data
structures compared to other linkers. Another reason is that mold is highly
parallelized.
Here is a side-by-side comparison of per-core CPU usage for lld (left) and
mold (right), linking the same program, a Chromium executable.

As you can see, mold uses all available cores throughout its execution and
finishes quickly. In contrast, lld fails to utilize available cores most of
the time. In this demo, the maximum parallelism is artificially capped at 16,
so that the bars fit in the GIF.
For details, please see the [design notes](docs/design.md).
## Sponsors
It is taken for granted nowadays that compiler toolchains can be easily
installed and used for free, and people may not think too much about the
individuals behind these "free tools". mold supports many projects, but it
is essentially a one-person project. This situation is similar to the one
depicted in the following xkcd illustration.
[](https://xkcd.com/2347)
If you think that the "Nebraska guy" should be rewarded, please consider
becoming our [GitHub sponsor](https://github.com/sponsors/rui314)!
We thank everyone who sponsors our project. In particular, we'd like to acknowledge
the following people and organizations who have sponsored $128/month or more:
### Corporate sponsors
<a href="https://mercury.com"><img src="docs/mercury-logo.png" align=center height=120 width=400 alt=Mercury></a>
<a href="https://cybozu-global.com"><img src="docs/cyboze-logo.png" align=center height=120 width=133 alt=Cybozu></a>
<a href="https://www.emergetools.com"><img src="docs/emerge-tools-logo.png" align=center height=120 width=240 alt="Emerge Tools"></a><br>
- [G-Research](https://www.gresearch.co.uk)
- [Signal Slot Inc.](https://github.com/signal-slot)
- [GlareDB](https://github.com/GlareDB)
### Individual sponsors
- [Wei Wu](https://github.com/lazyparser)
- [kyle-elliott](https://github.com/kyle-elliott)
- [Bryant Biggs](https://github.com/bryantbiggs)
- [kraptor23](https://github.com/kraptor23)
- [Jinkyu Yi](https://github.com/jincreator)
- [Pedro Navarro](https://github.com/pedronavf)
================================================
FILE: dist.sh
================================================
#!/bin/bash
#
# This script creates a mold binary distribution. The output is written to
# the `dist` directory as `mold-$version-$arch-linux.tar.gz` (e.g.
# `mold-2.40.0-x86_64-linux.tar.gz`).
#
# This script aims to produce reproducible outputs. That means each time
# it's run on the same git commit, it generates a bit-for-bit identical
# binary file regardless of when or where it's executed. This property
# serves as a strong safeguard against supply chain attacks. With a
# reproducible build, anyone can independently verify that the binary
# files published on our GitHub release page were built from the git
# commit tagged for release by rebuilding the binaries themselves.
#
# Debian provides snapshot.debian.org to host all historical binary
# packages. We use it to construct a container image pinned to a
# particular timestamp. snapshot.debian.org is known to be very slow,
# but that shouldn't be a big problem for us because we only need that
# site the first time.
#
# The mold executable created by this script is statically linked to
# libstdc++, but dynamically linked to glibc, libm and a few other
# libraries, as these libraries are almost always available on any Linux
# system. We can't statically link glibc because doing so would disable
# dlopen(), which is required to load the LTO linker plugin.
#
# We use a reasonably old Debian version for the build environment because
# a binary dynamically linked against a newer version of glibc won't work
# on a system with an older version of glibc.
#
# We prefer to build mold with Clang rather than GCC because mold's
# Identical Code Folding works best with the LLVM address significance
# table (.llvm_addrsig). Building a release binary with GCC produces a
# slightly larger binary than with Clang.
#
# We need a recent version of Clang to build mold. If it's not available
# via apt-get, we'll build it ourselves.
#
# This script can be used to create non-native binaries (e.g., building
# aarch64 binary on x86-64) because Podman automatically runs everything
# under QEMU if the container image is not native. To use this script for
# non-native builds, you may need to install the qemu-user-static package.
set -e -x
cd "$(dirname $0)"
usage() {
echo "Usage: $0 [ x86_64 | aarch64 | arm | riscv64 | ppc64le | s390x | loongarch64 ]"
exit 1
}
case $# in
0)
arch=$(uname -m)
if [ $arch = arm64 ]; then
arch=aarch64
elif [[ $arch = arm* ]]; then
arch=arm
fi
;;
1)
arch="$1"
;;
*)
usage
esac
# Create a Podman image.
if [ "$GITHUB_REPOSITORY" = '' ]; then
image=mold-builder-$arch
image_build="podman build --arch $arch -t $image -"
else
# If this script is running on GitHub Actions, we want to cache
# the created container image in GitHub's container repostiory.
image=ghcr.io/$GITHUB_REPOSITORY/mold-builder-$arch
image_build="podman build --arch $arch -t $image --output=type=registry --layers --cache-to $image --cache-from $image -"
fi
case $arch in
x86_64)
# Debian 9 (Stretch) released in June 2017.
#
# We use a Google-provided mirror (gcr.io) instead of the official Docker
# Hub (docker.io) because docker.io has a strict rate limit policy.
#
# The toolchain in Debian 9 is too old to build mold, so we rebuild it
# from source. We download source archives from official sites and build
# them locally, rather than downloading pre-built binaries from somewhere
# else, to avoid relying on unverifiable third-party binary blobs. Podman
# caches the result of each RUN command, so rebuilding is done only once
# per host.
cat <<EOF | $image_build
FROM mirror.gcr.io/library/debian:stretch@sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
RUN sed -i -e '/^deb/d' -e 's/^# deb /deb /g' /etc/apt/sources.list && \
echo 'Acquire::Retries "10"; Acquire::http::timeout "10"; Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/80-retries && \
apt-get update && \
apt-get install -y --no-install-recommends wget file make gcc g++ zlib1g-dev libssl-dev ca-certificates && \
rm -rf /var/lib/apt/lists
# Build CMake 3.27
RUN mkdir /build && \
cd /build && \
wget -O- --progress=dot:mega https://cmake.org/files/v3.27/cmake-3.27.7.tar.gz | tar xzf - --strip-components=1 && \
./bootstrap --parallel=\$(nproc) && \
make -j\$(nproc) && \
make install && \
rm -rf /build
# Build GCC 14
RUN mkdir /build && \
cd /build && \
wget -O- --progress=dot:mega https://ftpmirror.gnu.org/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz | tar xzf - --strip-components=1 && \
mkdir gmp mpc mpfr && \
wget -O- --progress=dot:mega https://ftpmirror.gnu.org/gmp/gmp-6.3.0.tar.gz | tar xzf - --strip-components=1 -C gmp && \
wget -O- --progress=dot:mega https://ftpmirror.gnu.org/mpc/mpc-1.3.1.tar.gz | tar xzf - --strip-components=1 -C mpc && \
wget -O- --progress=dot:mega https://ftpmirror.gnu.org/mpfr/mpfr-4.2.1.tar.gz | tar xzf - --strip-components=1 -C mpfr && \
./configure --prefix=/usr --enable-languages=c,c++ --disable-bootstrap --disable-multilib && \
make -j\$(nproc) && \
make install && \
ln -sf /usr/lib64/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 && \
rm -rf /build
# Build GNU binutils 2.43
RUN mkdir /build && \
cd /build && \
wget -O- --progress=dot:mega https://ftpmirror.gnu.org/binutils/binutils-2.43.tar.gz | tar xzf - --strip-components=1 && \
./configure --prefix=/usr && \
make -j\$(nproc) && \
make install && \
rm -fr /build
# Build Python 3.12.7
RUN mkdir /build && \
cd /build && \
wget -O- --progress=dot:mega https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz | tar xzf - --strip-components=1 && \
./configure && \
make -j\$(nproc) && \
make install && \
rm -rf /build
# Build LLVM 20
RUN mkdir /build && \
cd /build && \
wget -O- --progress=dot:mega https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-20.1.3.tar.gz | tar xzf - --strip-components=1 && \
mkdir b && \
cd b && \
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang ../llvm && \
cmake --build . -j\$(nproc) && \
cmake --install . --strip && \
rm -rf /build
EOF
;;
aarch64 | arm | ppc64le | s390x)
# Debian 11 (Bullseye) released in August 2021
#
# We don't want to build Clang for these targets on QEMU becuase it
# would take an extremely long time. Also, I believe old Linux boxes
# are typically x86-64.
cat <<EOF | $image_build
FROM mirror.gcr.io/library/debian:bullseye-20240904@sha256:8ccc486c29a3ad02ad5af7f1156e2152dff3ba5634eec9be375269ef123457d8
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
RUN sed -i -e '/^deb/d' -e 's/^# deb /deb /g' /etc/apt/sources.list && \
echo 'Acquire::Retries "10"; Acquire::http::timeout "10"; Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/80-retries && \
apt-get update && \
apt-get install -y --no-install-recommends build-essential gcc-10 g++-10 clang-16 cmake && \
ln -sf /usr/bin/clang-16 /usr/bin/clang && \
ln -sf /usr/bin/clang++-16 /usr/bin/clang++ && \
rm -rf /var/lib/apt/lists
EOF
;;
riscv64)
cat <<EOF | $image_build
FROM mirror.gcr.io/riscv64/debian:unstable-20240926@sha256:25654919c2926f38952cdd14b3300d83d13f2d820715f78c9f4b7a1d9399bf48
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
RUN sed -i -e '/^URIs/d' -e 's/^# http/URIs: http/' /etc/apt/sources.list.d/debian.sources && \
echo 'Acquire::Retries "10"; Acquire::http::timeout "10"; Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/80-retries && \
apt-get update && \
apt-get install -y --no-install-recommends build-essential gcc-14 g++-14 clang-18 cmake && \
ln -sf /usr/bin/clang-18 /usr/bin/clang && \
ln -sf /usr/bin/clang++-18 /usr/bin/clang++ && \
rm -rf /var/lib/apt/lists
EOF
;;
loongarch64)
cat <<EOF | $image_build
FROM mirror.gcr.io/loongarch64/debian:sid@sha256:0356df4e494bbb86bb469377a00789a5b42bbf67d5ff649a3f9721b745cbef77
ENV DEBIAN_FRONTEND=noninteractive TZ=UTC
RUN sed -i -e 's!http[^ ]*!http://snapshot.debian.org/archive/debian-ports/20250620T014755Z!g' /etc/apt/sources.list && \
echo 'Acquire::Retries "10"; Acquire::http::timeout "10"; Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/80-retries && \
apt-get update && \
apt-get install -y --no-install-recommends build-essential gcc-14 g++-14 clang-19 cmake && \
ln -sf /usr/bin/clang-19 /usr/bin/clang && \
ln -sf /usr/bin/clang++-19 /usr/bin/clang++ && \
rm -rf /var/lib/apt/lists
EOF
;;
*)
usage
;;
esac
version=$(sed -n 's/^project(mold VERSION \(.*\))/\1/p' CMakeLists.txt)
dest=mold-$version-$arch-linux
# Source tarballs available on GitHub don't contain .git directory.
# Clone the repo if missing.
[ -d .git ] || git clone --branch v$version --depth 1 --bare https://github.com/rui314/mold .git
# We use the timestamp of the last Git commit as the file timestamp
# for build artifacts.
timestamp=$(git log -1 --format=%ct)
# `uname -m` in an ARM32 container running on an ARM64 host reports it
# not as ARM32 but as ARM64. That confuses BLAKE3's cmake script and
# erroneously enables NEON SIMD instructions. `setarch` can be used to
# change the output of `uname -m`.
setarch=
[ $arch = arm ] && setarch='setarch linux32'
mkdir -p dist
# Build mold in a container.
#
# SOURCE_DATE_EPOCH is a standardized environment variable that allows
# build artifacts to appear as if they were built at a specific time.
# We use it to control how the compiler expands the C/C++ __DATE__ and
# __TIME__ macros.
podman run --arch $arch -it --rm --userns=host --pids-limit=-1 --network=none \
--pull=never -v "$(pwd):/mold:ro" -v "$(pwd)/dist:/dist" $image \
$setarch bash -c "
set -e
export SOURCE_DATE_EPOCH=$timestamp
mkdir /build
cd /build
cmake -DCMAKE_BUILD_TYPE=Release -DMOLD_MOSTLY_STATIC=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ /mold
cmake --build . -j\$(nproc)
cmake --install .
cmake -DMOLD_USE_MOLD=1 .
cmake --build . -j\$(nproc)
ctest --output-on-failure -j\$(nproc)
cmake --install . --prefix $dest --strip
find $dest -print | xargs touch --no-dereference --date=@$timestamp
find $dest -print | sort | tar -cf - --no-recursion --files-from=- | gzip -9nc > /dist/$dest.tar.gz
cp mold /dist
sha256sum /dist/$dest.tar.gz
"
================================================
FILE: docs/bugs.md
================================================
This is a note about interesting bugs that I met during the
development of the mold linker.
## GNU IFUNC
Problem: A statically-linked "hello world" program mysteriously
crashed in `__libc_start_main` function which is called just after
`_start`.
Investigation: I opened up gdb and found that the program reads a
bogus value from some array. It looks like `memcpy` failed to copy
proper data there. After some investigation, I noticed that `memcpy`
did't copy data at all but instead returned the address of
`__memcpy_avx_unaligned` function, which is a real `memcpy` function
optimized for machines with the AVX registers.
This odd issue was caused by the GNU IFUNC mechanism. That is, if a
function symbol has type `STT_GNU_IFUNC`, the function does not do
what its name suggests to do but instead returns a pointer to a
function that does the actual job. In this case, `memcpy` is an IFUNC
function, and it returns an address of `__memcpy_avx_unaligned` which
is a real `memcpy` function.
IFUNC function addresses are stored to `.got` section in an ELF
executable. The dynamic loader executes all IFUNC functions at
startup to replace their GOT entries with their return values. This
mechanism allows programs to choose the best implementation among
variants of the same function at runtime based on the machine info.
If a program is statically-linked, there's no dynamic loader that
rewrites the GOT entries. Therefore, if a program is
statically-linked, a libc's startup routine does that on behalf of the
dynamic loader. Concretely, a startup routine interprets all dynamic
relocations between `__rela_iplt_start` and `__rela_iplt_stop`
symbols. It is linker's responsibility to emit dynamic relocations
for IFUNC symbols even if it is linking a statically-linked program
and mark the beginning and the ending of a `.rela.dyn` section with
the symbols, so that the startup routine can find the relocations.
The bug was my linker didn't define `__rela_iplt_start` and
`__rela_iplt_stop` symbols. Since these symbols are weak, they are
initialized to zero. From the point of the initializer function,
there's no dynamic relocations between `__rela_iplt_start` and
`__rela_iplt_stop` symbols. That left GOT entries for IFUNC symbols
untouched.
The proper fix was to emit dynamic relocations for IFUNC symbols and
define the linker-synthesized symbols. I did that, and the bug was
fixed.
## stdio buffering
Problem: A statically-linked "Hello world" program prints out the
message if executed as `./hello`, but it doesn't output anything if
executed as `./hello | cat`.
Investigation: I knew that the default buffering mode for stdout is
line buffering (buffer is flushed on every '\n'), but if it is not
connected to the terminal (i.e. `isatty(2)` returns 0 on
`STDOUT_FILENO`), it automatically switches to full buffering (buffer
is flushed when it becomes full). So, it looks like libc failed to
flush the stdout on program exit for some reason.
I traced all function calls using gdb and noticed that `__libc_atexit`
was not called. That function seemed to be responsible for buffer
flushing. I don't know how exactly I found the root cause, but after
spending an hour or two, I found that `__start___libc_atexit` and
`__stop___libc_atexit` have value 0 in my linker's output while they
mark a section containing the address of `__libc_atexit` in GNU ld's
output.
So, libc doesn't directly call `__libc_atexit` but instead call all
function pointers between `__start___libc_atexit` and
`__stop___libc_atexit` symbols. libc puts `__libc_atexit` address in
`_libc_atexit` section, expecting that the linker automatically
creates the start and the end marker symbols for the section.
There's an obscure linker feature: if a section name is valid as a C
identifier (e.g. `foo` or `_foo_bar` but not `.foo`), the linker
automatically creates marker symbols by prepending `__start_` and
`__stop_` to the section name. My linker lacked the feature.
I implemented the feature, and the bug was fixed.
## TLS variable initialization
Problem: A statically-linked "hello world" program crashes after
reading a thread-local variable.
Investigation: Thread-local variables are very different from other
types of varaibles because there may be more than one instance of the
same variable in memory. Each thread has its copy of thread-local
varaibles. `%fs` segment register points the end of the variable area
for the current thread, and the variables are accessed as an offset
from `%fs`.
Thread-local variables may be initialized (e.g. `thread_local int x =
5;`). The linker gathers all thread-local variables and put them into
`PT_TLS` segment. At runtime, the contents of the segment is used as
an "initialization image" for new threads. When a new thread is
created, the image is memcpy'ed to the new thread's thread-local
variable area. The initialization image itself is read-only at
runtime.
It took more than a day to find out that memcpy copies the
initialization image to a different place than the thread-local
variables reside. That means, thread-local variables had garbage as
initial values, and the program crashed when using them.
The problem is that I set a very large value (4096) to the alignment
of `PT_TLS` segment. All `PT_LOAD` segments are naturally aligned to
the page boundary, so I use the same value for `PT_TLS`, but that was
a mistake. When a thread initialization routine sets a value to `%fs`,
it first aligns the end of the thread-local variable area address to
`PT_TLS` alignment value. So, if you set a large value to `PT_TLS`
alignment, `%fs` is set to a wrong place.
I fixed `PT_TLS` alignment, and the bug was gone.
## stdio buffering (another issue)
I noticed that a dynamically-linked "hello world" program didn't
flush its stdout buffer on exit. The cause of the problem was that the
executable had more than one DT_NEEDED entry for `libc.so`.
DT_NEEDED entries in `.dynamic` section specify a list of shared
object file names which need to be linked at runtime. I added one
DT_NEEDED entry for each library specified with the `-l` option.
The pitfall is, unlike object files, libraries are allowed to
appear more than once in a command line, and the linker has to
de-duplicate them before processing. Adding more than one DT_NEEDED
entry for the same shared object causes mysterious issues like this.
# Copy relocations and symbol aliases
environ, _environ and __environ point to the same location in libc.so,
so when we create a copy relocation for one of the symbols, we need to
do that for all of them. Otherwise, they'll end up pointing to different
places which causes a very mysterious issue.
# DT_DEBUG and gdb
If you forget to add an entry with type DT_DEBUG to .dynamic, gdb's
`info sharedlibrary` command doesn't print out a list of shared
libraries loaded to memory. The value of the entry doesn't matter, so
it can be just zero. The existence of it is important.
#
__EH_FRAME_BEGIN__ in libgcc/crtstuff.c
================================================
FILE: docs/coding-guidelines.md
================================================
# Coding Guidelines
mold is written in C++20, but as is the case with every C++ project,
it has local coding rules. In this document, I'll explain some of them
and try to give justifications for why I chose such rules.
## DOs
- Always use `i64` (which is a type alias for `int64_t` in mold) for
integers unless you have a reason not to. For example, even if you know
that a loop counter won't exceed 100, you should stop thinking about it
and just use `i64`.
Justification: Local variables are usually on CPU registers, so on
64-bit CPUs, there's no performance peanlty on choosing `i64` over
`i32`. Even if a compiler has to spill register values to the stack,
I don't think there's an observable difference between `i32` and
`i64`. Therefore, extra 32 bits are essentially free. On 32-bit CPUs,
they are not free, but that's OK because we are writing mold for modern
computers. mold will still run on 32-bit computers but a bit slowly.
By always using `i64`, we can eliminate the need to think about the
"right" size for each variable. It also reduces the risk of integer
overflow.
Exceptions: If you have to allocate a very large number (e.g. millions)
of the same object, its size matters. In that case, use a smaller type.
## DON'Ts
- Don't use `auto` unless its actual type is obvious in the very narrow
context. Currently, we use `auto` only for lambdas.
Justification: I think `auto` makes code writing easier but code reading
harder, because readers have to make a guess as to what is the actual
type of `auto`. If you are already familiar with the existing codebase,
you may be able to guess it easily, but that's not always the case.
I want to keep the mold codebase friendly to first-time readers.
- Don't over-use inheritance. In mold, most classes don't have parents,
and even if they do, their class hierarchy is very shallow. Currently
its height is just two (i.e. abstract classes and their implementations).
Justification: Designing class hierarchies is fun as it feels like
taxonomy, but I don't think that always help writing code. It looks like
simpler class hierarchy makes its code simpler.
================================================
FILE: docs/design.md
================================================
[This document was written in 2020, and the contents are outdated.
Specifically, we no longer believe that object preloading is a good
idea. That being said, most of the points in this document still hold
even today. Therefore, I'll keep this document as-is.]
## Design and implementation of mold
For the rest of this documentation, I'll explain the design and the
implementation of mold. If you are only interested in using mold, you
don't need to read the below.
### Motivation
Here is why I'm writing a new linker:
- Even though lld has significantly improved the situation, linking is
still one of the slowest steps in a build. It is especially
annoying when I changed one line of code and had to wait for a few
seconds or even more for a linker to complete. It should be
instantaneous. There's a need for a faster linker.
- The number of cores on a PC has increased a lot lately, and this
trend is expected to continue. However, the existing linkers can't
take the advantage of the trend because they don't scale well for more
cores. I have a 64-core/128-thread machine, so my goal is to create
a linker that uses the CPU nicely. mold should be much faster than
other linkers on 4 or 8-core machines too, though.
- It looks to me that the designs of the existing linkers are somewhat
too similar, and I believe there are a lot of drastically different
designs that haven't been explored yet. Developers generally don't
care about linkers as long as they work correctly, and they don't
even think about creating a new one. So there may be lots of low
hanging fruits there in this area.
### Basic design
- In order to achieve a `cp`-like performance, the most important
thing is to fix the layout of an output file as quickly as possible, so
that we can start copying actual data from input object files to an
output file as soon as possible.
- Copying data from input files to an output file is I/O-bounded, so
there should be room for doing computationally-intensive tasks while
copying data from one file to another.
- We should allow the linker to preload object files from disk and
parse them in memory before a complete set of input object files
is ready. To do so, we need
to split the linker into two in such a way that the latter half of
the process finishes as quickly as possible by speculatively parsing
and preprocessing input files in the first half of the process.
- One of the most computationally-intensive stage among linker stages
is symbol resolution. To resolve symbols, we basically have to throw
all symbol strings into a hash table to match undefined symbols with
defined symbols. But this can be done in the preloading stage using
[string interning](https://en.wikipedia.org/wiki/String_interning).
- Object files may contain a special section called a mergeable string
section. The section contains lots of null-terminated strings, and
the linker is expected to gather all mergeable string sections and
merge their contents. So, if two object files contain the same
string literal, for example, the resulting output will contain a
single merged string. This step is computationally intensive, but string
merging can be done in the preloading stage using string interning.
- Static archives (.a files) contain object files, but the static
archive's string table contains only defined symbols of member
object files and lacks other types of symbols. That makes static
archives unsuitable for speculative parsing. Therefore, the linker
should ignore the symbol table of static archive and directly read
static archive members.
- If there's a relocation that uses a GOT of a symbol, then we have to
create a GOT entry for that symbol. Otherwise, we shouldn't. That
means we need to scan all relocation tables to fix the length and
the contents of a .got section. This is computationally intensive,
but this step is parallelizable.
### Linker Script
Linker script is an embedded language for the linker. It is mainly
used to control how input sections are mapped to output sections and
the layout of the output, but it can also do a lot of tricky stuff.
Its feature is useful especially for embedded programming, but it's
also an awfully underdocumented and complex language.
We have to implement a subset of the linker script language anwyay,
because on Linux, /usr/lib/x86_64-linux-gnu/libc.so is (despite its
name) not a shared object file but actually an ASCII file containing
linker script code to load the _actual_ libc.so file. But the feature
set for this purpose is very limited, and it is okay to implement them
to mold.
Besides that, we really don't want to implement the linker script
language. But at the same time, we want to satisfy the user needs that
are currently satisfied with the linker script language. So, what
should we do? Here is my observation:
- Linker script allows doing a lot of tricky stuff, such as specifying
the exact layout of a file, inserting arbitrary bytes between
sections, etc. But most of them can be done with a post-link binary
editing tool (such as `objcopy`).
- It looks like there are two things that truly cannot be done by a
post-link editing tool: (a) mapping input sections to output
sections, and (b) applying relocations.
From the above observation, I believe we need to provide only the
following features instead of the entire linker script language:
- A method to specify how input sections are mapped to output
sections, and
- a method to set addresses to output sections, so that relocations
are applied based on desired addresses.
I believe everything else can be done with a post-link binary editing
tool.
### Details
- As we aim to the 1-second goal for Chromium, every millisecond
counts. We can't ignore the latency of process exit. If we mmap a
lot of files, \_exit(2) is not instantaneous but takes a few hundred
milliseconds because the kernel has to clean up a lot of
resources. As a workaround, we should organize the linker command as
two processes; the first process forks the second process, and the
second process does the actual work. As soon as the second process
writes a result file to a filesystem, it notifies the first process,
and the first process exits. The second process can take time to
exit, because it is not an interactive process.
- At least on Linux, it looks like the filesystem's performance to
allocate new blocks to a new file is the limiting factor when
creating a new large file and filling its contents using mmap.
If you already have a large file in the buffer cache, writing to it is
much faster than creating a new fresh file and writing to it.
Based on this observation, mold overwrites to an existing
executable file if exists. My quick benchmark showed that I could
save 300 milliseconds when creating a 2 GiB output file.
Linux doesn't allow to open an executable for writing if it is
running (you'll get a "text busy" error if you attempt). mold
falls back to the usual way if it fails to open an output file.
- The output from the linker should be deterministic for the sake of
[build reproducibility](https://en.wikipedia.org/wiki/Reproducible_builds)
and ease of debugging. This might add a little bit of overhead to
the linker, but that shouldn't be too much.
- A .build-id, a unique ID embedded to an output file, is usually
computed by applying a cryptographic hash function (e.g. SHA-1) to
an output file. This is a slow step, but we can speed it up by
splitting a file into small chunks, computing SHA-1 for each chunk,
and then computing SHA-1 of the concatenated SHA-1 hashes
(i.e. constructing a [Merkle
Tree](https://en.wikipedia.org/wiki/Merkle_tree) of height 2).
Modern x86 processors have purpose-built instructions for SHA-1 and
can compute SHA-1 pretty quickly at about 2 GiB/s. Using 16
cores, a build-id for a 2 GiB executable can be computed in 60 to 70
milliseconds.
- BFD, gold, and lld support section garbage collection. That is, a
linker runs a mark-sweep garbage collection on an input graph, where
sections are vertices and relocations are edges, to discard all
sections that are not reachable from the entry point symbol
(i.e. `_start`) or a few other root sections. In mold, we are using
multiple threads to mark sections concurrently.
- Similarly, BFD, gold an lld support Identical Comdat Folding (ICF)
as yet another size optimization. ICF merges two or more read-only
sections that happen to have the same contents and relocations.
To do that, we have to find isomorphic subgraphs from larger graphs.
I implemented a new algorithm for mold, which is 5x faster than lld
to do ICF for Chromium (from 5 seconds to 1 second).
- [Intel Threading Building
Blocks](https://github.com/oneapi-src/oneTBB) (TBB) is a good
library for parallel execution and has several concurrent
containers. We are particularly interested in using
`parallel_for_each` and `concurrent_hash_map`.
- TBB provides `tbbmalloc` which works better for multi-threaded
applications than the glib'c malloc, but it looks like
[jemalloc](https://github.com/jemalloc/jemalloc) and
[mimalloc](https://github.com/microsoft/mimalloc) are a little bit
more scalable than `tbbmalloc`.
### Size of the problem
When linking Chrome, a linker reads 3,430,966,844 bytes of data in
total. The data contains the following items:
| Data item | Number
| ------------------------ | ------
| Object files | 30,723
| Public undefined symbols | 1,428,149
| Mergeable strings | 1,579,996
| Comdat groups | 9,914,510
| Regular sections¹ | 10,345,314
| Public defined symbols | 10,512,135
| Symbols | 23,953,607
| Sections | 27,543,225
| Relocations against SHF_ALLOC sections | 39,496,375
| Relocations | 62,024,719
¹ Sections that have to be copied from input object files to an
output file. Sections that contain relocations or symbols are for
example excluded.
### Internals
In this section, I'll explain the internals of mold linker.
#### A brief history of Unix and the Unix linker
Conceptually, what a linker does is pretty simple. A compiler compiles
a fragment of a program (a single source file) into a fragment of
machine code and data (an object file, which typically has the .o
extension), and a linker stitches them together into a single
executable or a shared library image.
In reality, modern linkers for Unix-like systems are much more
complicated than the naive understanding because they have gradually
gained one feature at a time over the 50 years history of Unix, and
they are now something like a bag of lots of miscellaneous features in
which none of the features is more important than the others. It is
very easy to miss the forest for the trees, since for those who don't
know the details of the Unix linker, it is not clear which feature is
essential and which is not.
That being said, one thing is clear that at any point of Unix history,
a Unix linker has a coherent feature set for the Unix of that age. So,
let me entangle the history to see how the operating system, runtime,
and linker have gained features that we see today. That should give
you an idea of why a particular feature has been added to a linker in the
first place.
1. Original Unix didn't support shared libraries, and a program was
always loaded to a fixed address. An executable was something like
a memory dump that was just loaded to a particular address by the
kernel. After loading, the kernel started executing the program by
setting the instruction pointer to a particular address.
The most essential feature for any linker is relocation processing.
The original Unix linker of course supported that. Let me explain
what that is.
Individual object files are inevitably incomplete as a program,
because when a compiler created them, it only see a part of an
entire program. For example, if an object file contains a function
call that refers to another object file, the `call` instruction in the
object cannot be complete, as the compiler has no idea as to what
is the called function's address. To deal with this, the compiler
emits a placeholder value (typically just zero) instead of a real
address and leaves metadata in an object file saying "fix offset X
of this file with an address of Y". That metadata is called
"relocation". Relocations are typically processed by the linker.
It is easy for a linker to apply relocations for the original Unix
because a program is always loaded to a fixed address. It exactly
knows the addresses of all functions and data when linking a
program.
Static library support, which is still an important feature of Unix
linker, also dates back to this early period of Unix history.
To understand what it is, imagine that you are trying to compile
a program for the early Unix. You don't want to waste time to
compile libc functions every time you compile your program (the
computers of the era were incredibly slow), so you have already
placed each libc function into a separate source file and compiled
them individually. That means you have object files for each libc
function, e.g., printf.o, scanf.o, atoi.o, write.o, etc.
Given this configuration, all you have to do to link your program
against libc functions is to pick up the right set of libc object
files and give them to the linker along with the object files of your
program. But, keeping the linker command line in sync with the
libc functions you are using in your program is bothersome. You can
be conservative; you can specify all libc object files to the
command line, but that leads to program bloat because the linker
unconditionally link all object files given to it no matter whether
they are used or not. So, a new feature was added to the linker to
fix the problem. That is the static library, which is also called
the archive file.
An archive file is just a bundle of object files, just like zip
file but in an uncompressed form. An archive file typically has the
.a file extension and named after its contents. For example, the
archive file containing all libc objects is named `libc.a`.
If you pass an archive file along with other object files to the
linker, the linker pulls out an object file from the archive _only
when_ it is referenced by other object files. In other words,
unlike object files directly given to a linker, object files
wrapped in an archive are not linked to the output by default.
An archive works as a supplement to complete your program.
Even today, you can still find a libc archive file. Run `ar t
/usr/lib/x86_64-linux-gnu/libc.a` on Linux should give you a list
of object files in the libc archive.
2. In the '80s, Sun Microsystems, a leading commercial Unix vendor at the
time, added shared library support to their Unix variant, SunOS.
(This section is incomplete.)
### Concurrency strategy
In this section, I'll explain the high-level concurrency strategy of
mold.
In most places, mold adopts data parallelism. That is, we have a huge
number of pieces of data of the same kind, and we process each of them
individually using parallel for-loop. For example, after identifying
the exact set of input object files, we need to scan all relocation
tables to determine the sizes of .got and .plt sections. We do that
using a parallel for-loop. The granularity of parallel processing in
this case is the relocation table.
Data parallelism is very efficient and scalable because there's no
need for threads to communicate with each other while working on each
element of data. In addition to that, data parallelism is easy to
understand, as it is just a for-loop in which multiple iterations may
be executed in parallel. We don't use high-level communication or
synchronization mechanisms such as channels, futures, promises,
latches or something like that in mold.
In some cases, we need to share a little bit of data between threads
while executing a parallel for-loop. For example, the loop to scan
relocations turns on "requires GOT" or "requires PLT" flags in a
symbol. Symbol is a shared resource, and writing to them from multiple
threads without synchronization is unsafe. To deal with it, we made
the flag an atomic variable.
The other common pattern you can find in mold which is build on top of
the parallel for-loop is the map-reduce pattern. That is, we run a
parallel for-loop on a large data set to produce a small data set and
process the small data set with a single thread. Let me take a
build-id computation as an example. Build-id is typically computed by
applying a cryptographic hash function such as SHA-1 on a linker's
output file. To compute it, we first consider an output as a sequence
of 1 MiB blocks and compute a SHA-1 hash for each block in parallel.
Then, we concatenate the SHA-1 hashes and compute a SHA-1 hash on the
hashes to get a final build-id.
Finally, we use concurrent hashmap at a few places in mold. Concurrent
hashmap is a hashmap to which multiple threads can safely insert items
in parallel. We use it in the symbol resolution stage, for example.
To resolve symbols, we basically have to throw in all defined symbols
into a hash table, so that we can find a matching defined symbol for
an undefined symbol by name. We do the hash table insertion from a
parallel for-loop which iterates over a list of input files.
Overall, even though mold is highly scalable, it succeeded to avoid
complexties you often find in complex parallel programs. From high
level, mold just serially executes the linker's internal passes one by
one. Each pass is parallelized using parallel for-loops.
### Rejected ideas
In this section, I'll explain the alternative designs I currently do
not plan to implement and why I turned them down.
- Placing variable-length sections at end of an output file and start
copying file contents before fixing the output file layout
Idea: Fixing the layout of regular sections seems easy, and if we
place them at beginning of a file, we can start copying their
contents from their input files to an output file. While copying
file contents, we can compute the sizes of variable-length sections
such as .got or .plt and place them at end of the file.
Reason for rejection: I did not choose this design because I doubt
if it could actually shorten link time and I think I don't need it
anyway.
The linker has to de-duplicate comdat sections (i.e. inline
functions that are included in multiple object files), so we
cannot compute the layout of regular sections until we resolve all
symbols and de-duplicate comdats. That takes a few hundred
milliseconds. After that, we can compute the sizes of
variable-length sections in less than 100 milliseconds. It's quite
fast, so it doesn't seem to make much sense to proceed without
fixing the final file layout.
The other reason to reject this idea is because there's good a
chance for this idea to have a negative impact on linker's overall
performance. If we copy file contents before fixing the layout, we
can't apply relocations to them while copying because symbol
addresses are not available yet. If we fix the file layout first, we
can apply relocations while copying, which is effectively zero-cost
due to a very good data locality. On the other hand, if we apply
relocations long after we copy file contents, it's pretty expensive
because section contents are very likely to have been evicted from
CPU cache.
- Incremental linking
Idea: Incremental linking is a technique to patch a previous linker's
output file so that only functions or data that are updated from the
previous build are written to it. It is expected to significantly
reduce the amount of data copied from input files to an output file
and thus speed up linking. GNU BFD and gold linkers support it.
Reason for rejection: I turned it down because it (1) is
complicated, (2) doesn't seem to speed it up that much and (3) has
several practical issues. Let me explain each of them.
First, incremental linking for real C/C++ programs is not as easy as
one might think. Let me take malloc as an example. malloc is usually
defined by libc, but you can implement it in your program, and if
that's the case, the symbol `malloc` will be resolved to your
function instead of the one in libc. If you include a library that
defines malloc (such as libjemalloc or libtbbmallc) before libc,
their malloc will override libc's malloc.
Assume that you are using a nonstandard malloc. What if you remove
your malloc from your code, or remove `-ljemalloc` from your
Makefile? The linker has to include a malloc from libc, which may
include more object files to satisfy its dependencies. Such code
change can affect the entire program rather than just replacing one
function. The same is true for adding malloc to your program. Making
a local change doesn't necessarily result in a local change in the
binary level. It can easily have cascading effects.
Some ELF fancy features make incremental linking even harder to
implement. Take the weak symbol as an example. If you define `atoi`
as a weak symbol in your program, and if you are not using `atoi`
at all in your program, that symbol will be resolved to address
0. But if you start using some libc function that indirectly calls
`atoi`, then `atoi` will be included in your program, and your weak
symbol will be resolved to that function. I don't know how to
efficiently fix up a binary for this case.
This is a hard problem, so existing linkers don't try too hard to
solve it. For example, IIRC, gold falls back to full link if any
function is removed from a previous build. If you want to not annoy
users in the fallback case, you need to make full link fast anyway.
Second, incremental linking itself has an overhead. It has to detect
updated files, patch an existing output file and write additional
data to an output file for future incremental linking. GNU gold, for
instance, takes almost 30 seconds on my machine to do a null
incremental link (i.e. no object files are updated from a previous
build) for chrome. It's just too slow.
Third, there are other practical issues in incremental linking. It's
not reproducible, so your binary isn't going to be the same as other
binaries even if you are compiling the same source tree using the
same compiler toolchain. Or, it is complex and there might be a bug
in it. If something doesn't work correctly, "remove --incremental
from your Makefile and try again" could be a piece of advice, but
that isn't ideal.
So, all in all, incremental linking is tricky. I wanted to make full
link as fast as possible, so that we don't have to think about how
to work around the slowness of full link.
- Defining a completely new file format and use it
Idea: Sometimes, the ELF file format itself seems to be a limiting
factor in improving the linker's performance. We might be able to make a
far better one if we create a new file format.
Reason for rejection: I rejected the idea because it apparently has
a practical issue (backward compatibility issue) and also doesn't
seem to improve the performance of linkers that much. As clearly
demonstrated by mold, we can create a fast linker for ELF. I believe
ELF isn't that bad, after all. The semantics of the existing Unix
linkers, such as the name resolution algorithm or the linker script,
have slowed the linkers down, but that's not a problem of the file
format itself.
- Watching object files using inotify(2)
Idea: When mold is running as a daemon for preloading, use
inotify(2) to watch file system updates so that it can reload files
as soon as they are updated.
Reason for rejection: Just like the maximum number of files you can
simultaneously open, the maximum number of files you can watch using
inotify(2) isn't that large. Maybe just a single instance of mold is
fine with inotify(2), but it may fail if you run multiple of it.
The other reason for not doing it is because mold is quite fast
without it anyway. Invoking stat(2) on each file for file update
check takes less than 100 milliseconds for Chrome, and if most of
the input files are not updated, parsing updated files takes almost
no time.
================================================
FILE: docs/execstack.md
================================================
This page explains the following warning message and how to fix it.
mold emits this message when it sees an object file that may not be
compatible with mold.
```
mold: warning: foo.o: this file may cause a segmentation fault because it requires an executable stack. See https://github.com/rui314/mold/tree/main/docs/execstack.md for more info.
```
# Background
On modern computers, the stack area (to which local variables are
stored) cannot contain executable code. If the control reaches the
stack area, the CPU refuses to execute any code there and the program
is usually terminated due to segmentation fault.
This is a security measure. The stack area used to be executable (old
CPUs generally execute any code as long as it is in a readable memory
region), but that provided an easy attack vector to a malicious user.
They wrote executable code to the stack area using some buffer
overflow bug and jumped there to run arbitrary code in a remote server
process.
To prevent this type of attack, the stack area is no longer executable
since the early 2000s. On Linux, the stack's executable-ness is
controlled by a bit in an executable, and the loader respects that
bit. The bit is set by the linker.
GCC had (and still has) a feature that depends on the executable
stack, so they invented a way to tell the linker to mark the stack
executable. Specifically, if an object file contains a
`.note.GNU-stack` section with the `SHF_EXECSTACK` bit, GNU linker
silently makes the stack of an output file executable.
But the GNU linker's behavior is dangerous. If you accidentally link
an object file that has that marker section, the entire stack area
silently becomes executable, disabling the security mechanism.
Therefore, mold simply ignores that marker section. If you are using
mold, you need to explicitly pass `-z execstack` to the linker to make
the stack executable.
# What caused this issue?
You are likely to use GCC's [Nested
Functions](https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html)
feature which still depends on the executable stack.
# How to fix it?
If you know what you are doing, pass `-z execstack` to mold. Beware
that this will significantly weaken your program's security.
If you don't want to pass `-z execstack`, rewrite your code so that
your code does not depend on the executable stack.
================================================
FILE: docs/glossary.md
================================================
The very concept of linking is simple: a compiler compiles a piece of
source code into an object file (a file containing machine code), and
a linker combines object files into a single executable or a shared
library file. However, the actual implementation of the linker for
modern systems is much more complicated because hardware, operating
system, compiler and linker all have many more features.
In this file, I'll explain random topics in the glossary format that
you need to understand to read mold code.
## DSO
A .so file. Short for Dynamic Shared Object. Often called as a
shared library, a dynamic libray or a shared object as well.
An DSO contains common functions and data that are used by multiple
executables and/or other DSOs. At runtime, a DSO is loaded to a
contiguous region in the virtual address.
## Object file
A .o file. An object file contains machine code and data, but it
cannot be executed because it's not self-contained. For example,
if you compile a C source file containing a call of `printf`,
the actual function code of `printf` is not included in the resulting
object file. You include `stdio.h`, but that teaches the compiler
only about `printf`'s type, and the compiler still don't know what
`printf` actually does. Therefore, it cannot emit code for `printf`.
You need to link an object file with other object file or a shared
library to make it exectuable.
## Virtual address space
A pointer has a value like 0x803020 which is an address of the
pointee. But it doesn't mean that the pointee resides at the
physical memory address 0x803020 on the computer. Modern CPUs
contains so-called Mmeory Management Unit (MMU), and all access to
the memory are first translated by MMU to the physical address.
The address before translation is called the "virtual address".
Unless you are doing the kernel programming, all addresses you
handle are virtual addresses.
The OS kernel controls the MMU so that each process owns the entire
virtual address space. So, even if two process uses the same virtual
address, they don't conflict. They are mapped to different physical
addresses.
The existence of MMU has several implications to the linker. First,
we can link the main executable to a specific address. On process
startup, there's no code or data in the virtual address space, so
the mapping of the main executable always succeed. However, it's not
true to DSOs because they are loaded after the main executable and
possibly other DSOs. Therefore, shared libraries must be linked in a
way that they can be loaded to any address in the virtual address
space.
## Relocation
A piece of information for the linker as to how to link object files
or a dynamic objects.
Object files can refer functions or data in other object files. For
example, if you compile a function which calls a non-local function
`foo`, the resulting code contains something like this:
```
26: e8 00 00 00 00 callq 2b <bar+0xb>
27: R_X86_64_PLT32 foo-0x4
```
The above `callq` is the instruction to call a function at the
machine code level. It's opcode is `0xe8` in x86-64, so the
instruction begins with `0xe8`. The following four bytes are
displacement; that is, the address of the branch target relative to
the end of this `callq` instruction. Notice that the displacement is
0. The compiler couldn't fill the displacement because it has no
idea as to where `foo` will be at runtime. So, the compiler write 0
as a placeholder and instead write a relocation `R_X86_64_PLT32`
with `foo` as its associated symbol. The linker reads this
relocation, computes the offsets between this call instruction and
function `foo` and overwrite the placeholder value 0 with an actual
displacement.
There are many different types of relocations. For example, if you
want to fix up not with a displacement but with an absolute address
of a symbol, you need to use `R_X86_64_ABS64` instead.
## Static library
A .a file. Often called as an archive file or just archive as well.
A static library is a container just like tar or zip. Actually,
there's no technical reason to not use tar or (uncompressed) zip,
but traditionally the .a file format is used by the linker.
A static library contains object files and can be passed to the
linker along with other object files and/or archives.
A linker pulls out object files from an archive only if it is needed
to resolve undefined symbols. In other words, object files in an
archive are not linked by default and used as a complement to supply
missing definitions. This is ideal for a library because you don't
want to link library functions unless you are actually using them.
Contrary to archive files, object files directly given to a linker
are always linked to the output.
To maximize the benefit of archive files, a library often used as a
static library is broken down to small files to separate each
function individually (for example, look at
https://git.musl-libc.org/cgit/musl/tree/src/stdio). By doing this,
you import only used functions.
A static file is created by `ar`, whose command line arguments are
similar to `tar`. A static library contains the symbol table which
offers a quick way to look up an object file for a defined symbol,
but mold does not use the static library's symbol table. mold
doesdn't need a symbol table to exist in an archive, and if exists,
mold just ignores it.
See also: DSO (dynamic library)
## Symbol
A symbol is a label assigned to a specific location in an input file
or an output file. For example, if you define function `foo` and
compile it, the resulting object file contains a symbol `foo`
pointing to the beginning of the machine code for `foo`.
Usually, a symbol name is a function or a variable name. If an
object is anonymous (such the one for a string literal), a compiler
generated a unique symbol, which often starts with `.` to avoid
conflict with user-defined symbols.
For C++, symbol name is a complex "mangled" name. We need to mangle
identifiers because a simple name such as `foo` cannot be uniquely
identify a function or a data in C++, because for example `foo` may
be in a namespace or defined as a static member in some class. If
`foo` is an overloaded function, we need to distinguish different
`foo`s by its type. Therefore, C++ compiler mangles an identifier by
appending nmaepsace names, type information and such so that
different things get different names.
For example, a function `int foo(int)` in a namespace `bar` is
mangled as `_ZN3bar3fooEi`.
A symbol can be either defined or undefined. A defined symbol points
to some location in a file which may contain the function's machine
code or the variable's initial value. An undefined symbol does not
point to anywhere. It needs to be merged with a defined symbol with
the same name at link-time. This merging process is called "name
resolution".
For example, if your program is using `printf`, it usually contains
`printf` as an undefined symbol. You need to link it with `libc.a`
or `libc.so`, which contain a defined symbol of `printf`, to make a
complete program.
================================================
FILE: docs/memory-sanitizer.md
================================================
# Instrumenting mold with MemorySanitizer
## Introduction
Per <https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo>:
> If you want MemorySanitizer to work properly and not produce any false
> positives, you must ensure that all the code in your program and in
> libraries it uses is instrumented (i.e. built with `-fsanitize=memory`).
> In particular, you would need to link against an MSan-instrumented C++
> standard library. We recommend to use [libc++](https://libcxx.llvm.org/)
> for that purpose.
## Building instrumented libc++
Build an MSan-instrumented libc++ from source:
```sh
cd ~
git clone https://github.com/llvm/llvm-project
cd llvm-project
cmake -S ./runtimes -B build-libcxx -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DLLVM_USE_SANITIZER=MemoryWithOrigins
cmake --build build-libcxx -- cxx cxxabi
export LIBCXX="$HOME/llvm-project/build-libcxx" # for subsequent build steps
```
Upon success, `./build-libcxx/{include,lib}` will contain the resulting
headers and shared libraries.
## Linking mold against instrumented libc++
Use the `MOLD_USE_MSAN` and `MOLD_STDLIB_PREFIX` cmake variables to link
mold against the instrumented build of libc++:
```sh
cd ~
git clone https://github.com/rui314/mold.git
cd mold
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DMOLD_USE_MSAN=ON \
-DMOLD_STDLIB_PREFIX="$LIBCXX" \
-DMOLD_USE_MIMALLOC=OFF \
-DMOLD_USE_SYSTEM_TBB=ON
cmake --build build
```
Most of mold's tests (except those for `-flto`) should work at this
point. Run them like normal:
```sh
ctest --test-dir build
```
Any resulting MemorySanitizer errors should be visible in
`./build/Temporary/Testing/LastTest.log`.
## Building instrumented LTO plugin (experimental)
Exercising `-flto` with MemorySanitizer (and without false positives)
requires instrumenting the transitive dependencies of `lto-unix.cc`:
- `libiberty.a`
- `liblto_plugin.so`
- `LLVMgold.so`
> [!NOTE]
> This is more involved and time-consuming than building only libc++ from
> source. The cost-benefit ratio of this additional instrumentation and
> test coverage may be unfavorable in many cases.
> [!IMPORTANT]
> The following steps are experimental and unlikely to work exactly as-is
> under CI runners and individual developer environments. Consider the
> following a starting point rather than a complete HOWTO.
Build an MSan-instrumented GNU libiberty:
```sh
cd ~
git clone git@github.com:gcc-mirror/gcc.git
cd gcc/libiberty
export CC=clang
export CFLAGS="-g -Og -fsanitize=memory -fsanitize-memory-track-origins"
export LDFLAGS="-fsanitize=memory"
./configure
make -j$(nproc)
unset CC CFLAGS LDFLAGS
```
Install the resulting `./libiberty.a` into the build toolchain being
tested with mold. If the system image is ephemeral or disposable (e.g. a
short-lived VM or container), a quick-and-dirty install could look like:
```sh
sudo cp /usr/lib/libiberty.a{,.bak}
sudo cp ./libiberty.a /usr/lib/
```
Build an MSan-instrumented GCC LTO plugin library:
```sh
cd ~/gcc/lto-plugin # use already-cloned repo from earlier step
export CC=clang
export CFLAGS="-g -Og -fsanitize=memory -fsanitize-memory-track-origins"
export LDFLAGS="-fsanitize=memory"
./configure --with-libiberty=/usr/lib
make -j$(nproc)
unset CC CFLAGS LDFLAGS
```
Install the resulting `liblto_plugin.so`. With the same caveats discussed
above, a simple install into an ephemeral environment could look like:
```sh
export GCC_VERSION="$(gcc -dumpversion)"
sudo cp /usr/lib/gcc/x86_64-pc-linux-gnu/$GCC_VERSION/liblto_plugin.so{,.bak}
sudo cp .libs/liblto_plugin.so /usr/lib/gcc/x86_64-pc-linux-gnu/$GCC_VERSION/
```
Build an MSan-instrumented LLVM LTO plugin library:
```sh
cd ~/llvm-project # use already-cloned repo from earlier step
CF="-nostdinc++ -isystem $LIBCXX/include/c++/v1"
INCDIR="$(find /usr -name plugin-api.h -type f | head -1 | xargs dirname)"
function configure
{
cmake -S ./llvm -B build-plugin -G Ninja \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_FLAGS="$CF" \
-DCMAKE_CXX_FLAGS="$CF" \
-DCMAKE_EXE_LINKER_FLAGS="$1" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLLVM_BINUTILS_INCDIR="$INCDIR" \
-DLLVM_USE_SANITIZER=MemoryWithOrigins
}
# workaround for linker issues: configure twice with different LDFLAGS
configure "-nostdlib++ -L $LIBCXX/lib -Wl,--rpath=$LIBCXX/lib"
configure "-nostdlib++ -L $LIBCXX/lib -lc++ -Wl,--rpath=$LIBCXX/lib"
cmake --build build-plugin -- LLVMgold.so
```
Install the resulting `LLVMgold.so`. With the same caveats discussed
above, a simple install into an ephemeral environment could look like:
```sh
sudo cp /usr/lib/LLVMgold.so{,.bak}
sudo cp ./build-plugin/lib/LLVMgold.so /usr/lib/
```
mold's tests for `-flto` should now (mostly) work, though there do seem
to be issues around `gcc` inferring `-flto` when not explicitly specified.
One workaround is to use `clang` as `TEST_CC`:
```sh
cd ~/mold # use already-cloned and built repo from earlier step
TEST_CC=clang TEST_CXX=clang++ ctest --test-dir build
```
## References
- <https://github.com/google/sanitizers/wiki/MemorySanitizerBootstrappingClang>
- <https://llvm.org/docs/GoldPlugin.html#lto-how-to-build>
================================================
FILE: docs/mold.1
================================================
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "MOLD" "1" "December 2025" ""
.SH "NAME"
\fBmold\fR \- a modern linker
.SH "SYNOPSIS"
\fBmold\fR [\fIoption\fR\|\.\|\.\|\.] \fIfile\fR\|\.\|\.\|\.
.SH "DESCRIPTION"
\fBmold\fR is a faster drop\-in replacement for the default GNU ld(1)\.
.SS "How to use"
See \fIhttps://github\.com/rui314/mold#how\-to\-use\fR\.
.SS "Compatibility"
\fBmold\fR is designed to be a drop\-in replacement for the GNU linkers for linking user\-land programs\. If your user\-land program cannot be built due to missing command\-line options, please file a bug at \fIhttps://github\.com/rui314/mold/issues\fR\.
.P
\fBmold\fR supports a very limited set of linker script features, which is just sufficient to read \fB/usr/lib/x86_64\-linux\-gnu/libc\.so\fR on Linux systems (on Linux, that file is contrary to its name not a shared library but an ASCII linker script that loads a real \fBlibc\.so\fR file\.)
.P
Beyond that, we have no plan to support any additional linker script features\. The linker script is an ad\-hoc, over\-designed, complex language which we believe needs to be replaced by a simpler mechanism\. We have a plan to add a replacement for the linker script to \fBmold\fR instead\.
.SS "Archive symbol resolution"
Traditionally, Unix linkers are sensitive to the order in which input files appear on the command line\. They process input files from the first (leftmost) file to the last (rightmost) file one\-by\-one\. While reading input files, they maintain sets of defined and undefined symbols\. When visiting an archive file (\fB\.a\fR files), they pull out object files to resolve as many undefined symbols as possible and move on to the next input file\. Object files that weren't pulled out will never have a chance for a second look\.
.P
Due to this behavior, you usually have to add archive files at the end of a command line, so that when a linker reaches archive files, it knows what symbols remain as undefined\.
.P
If you put archive files at the beginning of a command line, a linker doesn't have any undefined symbols, and thus no object files will be pulled out from archives\. You can change the processing order by using the \fB\-\-start\-group\fR and \fB\-\-end\-group\fR options, though they make a linker slower\.
.P
\fBmold\fR, as well as the LLVM lld(1) linker, takes a different approach\. They remember which symbols can be resolved from archive files instead of forgetting them after processing each archive\. Therefore, \fBmold\fR and lld(1) can "go back" in a command line to pull out object files from archives if they are needed to resolve remaining undefined symbols\. They are not sensitive to the input file order\.
.P
\fB\-\-start\-group\fR and \fB\-\-end\-group\fR are still accepted by \fBmold\fR and lld(1) for compatibility with traditional linkers, but they are silently ignored\.
.SS "Dynamic symbol resolution"
Some Unix linker features are difficult to understand without comprehending the semantics of dynamic symbol resolution\. Therefore, even though it's not specific to \fBmold\fR, we'll explain it here\.
.P
We use "ELF module" or just "module" as a collective term to refer to an executable or a shared library file in the ELF format\.
.P
An ELF module may have lists of imported symbols and exported symbols, as well as a list of shared library names from which imported symbols should be imported\. The point is that imported symbols are not bound to any specific shared library until runtime\.
.P
Here is how the Unix dynamic linker resolves dynamic symbols\. Upon the start of an ELF program, the dynamic linker constructs a list of ELF modules which, as a whole, consist of a complete program\. The executable file is always at the beginning of the list followed by its dependent shared libraries\. An imported symbol is searched from the beginning of the list to the end\. If two or more modules define the same symbol, the one that appears first in the list takes precedence over the others\.
.P
This Unix semantics are contrary to systems such as Windows that have a two\-level namespace for dynamic symbols\. On Windows, for example, dynamic symbols are represented as a tuple of (\fBsymbol\-name\fR, \fBshared\-library\-name\fR), so that each dynamic symbol is guaranteed to be resolved from some specific library\.
.P
Typically, an ELF module that exports a symbol also imports the same symbol\. Such a symbol is usually resolved to itself, but that's not the case if a module that appears before it in the symbol search list provides another definition of the same symbol\.
.P
Let's take \fBmalloc\fR as an example\. Assume that you define your version of \fBmalloc\fR in your main executable file\. Then, all \fBmalloc\fR calls from any module are resolved to your function instead of the one in libc, because the executable is always at the beginning of the dynamic symbol search list\. Note that even \fBmalloc\fR calls within libc are resolved to your definition since libc exports and imports \fBmalloc\fR\. Therefore, by defining \fBmalloc\fR yourself, you can overwrite a library function, and the \fBmalloc\fR in libc becomes dead code\.
.P
These Unix semantics are tricky and sometimes considered harmful\. For example, assume that you accidentally define \fBatoi\fR as a global function in your executable that behaves completely differently from the one in the C standard\. Then, all \fBatoi\fR function calls from any modules (even function calls within libc) are redirected to your function instead of the one in libc, which will very likely cause a problem\. That is a somewhat surprising consequence for an accidental name conflict\. On the other hand, this semantic is sometimes useful because it allows users to override library functions without rebuilding modules containing them\.
.P
Whether good or bad, you should keep these semantics in mind to understand Unix linkers' behaviors\.
.SS "Build reproducibility"
\fBmold\fR's output is deterministic\. That is, if you pass the same object files and the same command\-line options to the same version of \fBmold\fR, it is guaranteed that \fBmold\fR produces the bit\-for\-bit identical output\. The linker's internal randomness, such as the timing of thread scheduling or iteration orders of hash tables, doesn't affect the output\.
.P
\fBmold\fR does not have any host\-specific default settings\. This is contrary to the GNU linkers, for which some configurable values, such as system\-dependent library search paths, are hard\-coded\. \fBmold\fR depends only on its command\-line arguments\.
.SH "OPTION NOTATIONS"
Multi\-letter long options may precede either a single dash or double dashes, except for those starting with the letter "o"\. For historical reasons, long options beginning with "o" must precede double dashes\.
.P
For example, you can spell \fB\-\-as\-needed\fR as \fB\-as\-needed\fR, but \fB\-\-omagic\fR must not be spelled as \fB\-omagic\fR\. \fB\-omagic\fR will be interpreted not as \fB\-\-omagic\fR but as \fB\-o magic\fR\.
.SH "MOLD\-SPECIFIC OPTIONS"
.TP
\fB\-\-chroot\fR=\fIdir\fR
Set \fIdir\fR as the root directory\.
.TP
\fB\-\-color\-diagnostics\fR=[ \fIauto\fR | \fIalways\fR | \fInever\fR ]
Show diagnostic messages in color using ANSI escape sequences\. \fBauto\fR means that \fBmold\fR prints out messages in color only if the standard output is connected to a TTY\. Default is \fBauto\fR\.
.TP
\fB\-\-color\-diagnostics\fR
Synonym for \fB\-\-color\-diagnostics=auto\fR\.
.TP
\fB\-\-no\-color\-diagnostics\fR
Synonym for \fB\-\-color\-diagnostics=never\fR\.
.TP
\fB\-\-detach\fR, \fB\-\-no\-detach\fR
Permit or do not permit mold to create a debug info file in the background\.
.TP
\fB\-\-fork\fR, \fB\-\-no\-fork\fR
Spawn a child process and let it do the actual linking\. When linking a large program, the OS kernel can take a few hundred milliseconds to terminate a \fBmold\fR process\. \fB\-\-fork\fR hides that latency\. By default, it does fork\.
.IP
Note that \fB\-\-fork\fR also hides the resource usage statistics reported by time(2), since it doesn't call waitpid(2) on the child process\. If you need those statistics, pass \fB\-\-no\-fork\fR\.
.TP
\fB\-\-perf\fR
Print performance statistics\.
.TP
\fB\-\-print\-dependencies\fR
Print out dependency information for input files\.
.IP
Each line of the output for this option shows which file depends on which file to use a specific symbol\. This option is useful for debugging why some object file in a static archive got linked or why some shared library is kept in an output file's dependency list even with \fB\-\-as\-needed\fR\.
.TP
\fB\-\-relocatable\-merge\-sections\fR
By default, \fBmold\fR doesn't merge input sections by name when merging input object files into a single output object file for \fB\-r\fR\. For example, \fB\.text\.foo\fR and \fB\.text\.bar\fR aren't merged for \fB\-r\fR even though they are merged into \fB\.text\fR based on the default section merging rules\.
.IP
This option changes the behavior so that \fBmold\fR merges input sections by name by the default section merging rules\.
.TP
\fB\-\-repro\fR
Archive input files, as well as a text file containing command line options, in a tar file so that you can run \fBmold\fR with the exact same inputs again\. This is useful for reporting a bug with a reproducer\. The output filename is \fBpath/to/output\.tar\fR, where \fBpath/to/output\fR is an output filename specified by \fB\-o\fR\.
.TP
\fB\-\-reverse\-sections\fR
Reverse the order of input sections before assigning them the offsets in the output file\.
.IP
This option is useful for finding bugs that depend on the initialization order of global objects\. In C++, constructors of global objects in a single source file are guaranteed to be executed in the source order, but there's no such guarantee across compilation units\. Usually, constructors are executed in the order given to the linker, but depending on it is a mistake\.
.IP
By reversing the order of input sections using \fB\-\-reverse\-sections\fR, you can easily test that your program works in the reversed initialization order\.
.TP
\fB\-\-run\fR \fIcommand\fR \fIarg\fR\|\.\|\.\|\.
Run \fIcommand\fR with \fBmold\fR as \fB/usr/bin/ld\fR\. Specifically, \fBmold\fR runs a given command with the \fBLD_PRELOAD\fR environment set to intercept exec(3) family functions and replaces \fBargv[0]\fR with itself if it is \fBld\fR, \fBld\.gold\fR, or \fBld\.lld\fR\.
.TP
\fB\-\-separate\-debug\-file\fR, \fB\-\-separate\-debug\-file\fR=\fIfile\fR
Bundle debug info sections into a separate file instead of embedding them in an output executable or a shared library\. mold creates a debug info file in the background by default, so that you can start running your executable as soon as possible\.
.IP
By default, the debug info file is created in the same directory as is the output file, with the \fB\.dbg\fR file extension\. That filename is embedded into the output file so that \fBgdb\fR can automatically find the debug info file for the output file\. For more info about gdb features related to separate debug files, see \fIhttps://sourceware\.org/gdb/current/onlinedocs/gdb\.html/Separate\-Debug\-Files\.html\fR\.
.IP
mold holds a file lock with flock(2) while creating a debug info file in the background\.
.IP
If you don't want to create a debug info file in the background, pass the \fB\-\-no\-detach\fR option\.
.TP
\fB\-\-shuffle\-sections\fR, \fB\-\-shuffle\-sections\fR=\fInumber\fR
Randomize the output by shuffling the order of input sections before assigning them the offsets in the output file\. If a \fInumber\fR is given, it's used as a seed for the random number generator, so that the linker produces the same output for the same seed\. If no seed is given, a random number is used as a seed\.
.IP
This option is useful for benchmarking\. Modern CPUs are sensitive to a program's memory layout\. A seemingly benign change in program layout, such as a small size increase of a function in the middle of a program, can affect the program's performance\. Therefore, even if you write new code and get a good benchmark result, it is hard to say whether the new code improves the program's performance; it is possible that the new memory layout happens to perform better\.
.IP
By running a benchmark multiple times with randomized memory layouts using \fB\-\-shuffle\-sections\fR, you can isolate your program's real performance number from the randomness caused by memory layout changes\.
.TP
\fB\-\-spare\-program\-headers\fR=\fInumber\fR
Append the given number of \fBPT_NULL\fR entries to the end of the program header, so that post\-link processing tools can easily add new segments by overwriting the null entries\.
.IP
Note that ELF requires all \fBPT_LOAD\fR segments to be sorted by \fBp_vaddr\fR\. Therefore, if you add a new LOAD segment, you may need to sort the entire program header\.
.TP
\fB\-\-stats\fR
Print input statistics\.
.TP
\fB\-\-thread\-count\fR=\fIcount\fR
Use \fIcount\fR number of threads\.
.TP
\fB\-\-threads\fR, \fB\-\-no\-threads\fR
Use multiple threads\. By default, \fBmold\fR uses as many threads as the number of cores or 32, whichever is smaller\. The reason it is capped at 32 is because \fBmold\fR doesn't scale well beyond that point\. To use only one thread, pass \fB\-\-no\-threads\fR or \fB\-\-thread\-count=1\fR\.
.TP
\fB\-\-quick\-exit\fR, \fB\-\-no\-quick\-exit\fR
Use or do not use \fBquick_exit\fR to exit\.
.TP
\fB\-\-zero\-to\-bss\fR
Convert all\-zero data sections into BSS\.
.IP
When this option is enabled, \fBmold\fR scans input data sections that are not of type \fBSHT_NOBITS\fR and checks whether their contents consist solely of zero bytes\. Such sections are then converted into BSS (\fBSHT_NOBITS\fR) sections\. This reduces the size of the output file, since BSS sections occupy no space in the file image\.
.IP
This behavior is especially useful for user\-defined sections created with \fB__attribute__((section("\.sectname")))\fR that contain uninitialized global variables\. GCC and Clang do not automatically mark such sections as BSS even if their contents are entirely zero, and instead emit them as regular data sections\.
.IP
For example, consider \fB__attribute__((section("\.sectname"))) int vec[256];\fR\.
.IP
By default, this results in a \fB\.sectname\fR section of type \fBSHT_PROGBITS\fR filled with zeros\. With \fB\-\-zero\-to\-bss\fR, the linker will recognize it as empty data and convert it to a \fBSHT_NOBITS\fR section, reducing the output file size without changing runtime semantics\.
.TP
\fB\-z rewrite\-endbr\fR, \fB\-z norewrite\-endbr\fR
As a security measure, some CPU instruction sets have recently gained a feature to protect control flow integrity by disallowing indirect branches by default\. If the feature is enabled, the instruction that is executed immediately after an indirect branch must be an branch target marker instruction, or a CPU\-level fault will raise\. The marker instruction is also known as "landing pad" instruction, to which indirect branches can land\. This feature makes ROP attacks harder to conduct\.
.IP
To use the feature, a function whose pointer is taken needs to begin with a landing pad because a function call via a function pointer is compiled to an indirect branch\. On the other hand, if a function is called only directly (i\.e\. referred to only by \fIdirect\fR branch instructions), it doesn't have to begin with it\.
.IP
By default, the compiler always emits a landing pad at the beginning of each global function because it doesn't know whether or not the function's pointer is taken in another translation unit\. As a result, the resulting binary has more attack surface than necessary\.
.IP
If \fB\-\-rewrite\-endbr\fR is given, mold conducts a whole program analysis to identify functions whose addresses are actually taken and rewrites landing pads with no\-ops for non\-address\-taken functions, reducing the attack surface\.
.IP
This feature is currently available only on x86\-64\.
.SH "GNU\-COMPATIBLE OPTIONS"
.TP
\fB\-\-help\fR
Report usage information to stdout and exit\.
.TP
\fB\-v\fR, \fB\-\-version\fR
Report version information to stdout\.
.TP
\fB\-V\fR
Report version and target information to stdout\.
.TP
\fB\-E\fR, \fB\-\-export\-dynamic\fR, \fB\-\-no\-export\-dynamic\fR
When creating an executable, using the \fB\-E\fR option causes all global symbols to be put into the dynamic symbol table, so that the symbols are visible from other ELF modules at runtime\.
.IP
By default, or if \fB\-\-no\-export\-dynamic\fR is given, only symbols that are referenced by DSOs at link\-time are exported from an executable\.
.TP
\fB\-F\fR \fIlibname\fR, \fB\-\-filter\fR=\fIlibname\fR
Set the \fBDT_FILTER\fR dynamic section field to \fIlibname\fR\.
.TP
\fB\-I\fR \fIfile\fR, \fB\-\-dynamic\-linker\fR=\fIfile\fR, \fB\-\-no\-dynamic\-linker\fR
Set the dynamic linker path to \fIfile\fR\. If no \fB\-I\fR option is given, or if \fB\-\-no\-dynamic\-linker\fR is given, no dynamic linker path is set to an output file\. This is contrary to the GNU linkers which set a default dynamic linker path in that case\. This difference doesn't usually make any difference because the compiler driver always passes \fB\-I\fR to the linker\.
.TP
\fB\-L\fR \fIdir\fR, \fB\-\-library\-path\fR=\fIdir\fR
Add \fIdir\fR to the list of library search paths from which \fBmold\fR searches libraries for the \fB\-l\fR option\.
.IP
Unlike the GNU linkers, \fBmold\fR does not have default search paths\. This difference doesn't usually make any difference because the compiler driver always passes all necessary search paths to the linker\.
.TP
\fB\-M\fR, \fB\-\-print\-map\fR
Write a map file to stdout\.
.TP
\fB\-N\fR, \fB\-\-omagic\fR, \fB\-\-no\-omagic\fR
Force \fBmold\fR to emit an output file with an old\-fashioned memory layout\. First, it makes the first data segment not aligned to a page boundary\. Second, text segments are marked as writable if the option is given\.
.TP
\fB\-S\fR, \fB\-\-strip\-debug\fR
Omit \fB\.debug_*\fR sections from the output file\.
.TP
\fB\-T\fR \fIfile\fR, \fB\-\-script\fR=\fIfile\fR
Read linker script from \fIfile\fR\.
.TP
\fB\-X\fR, \fB\-\-discard\-locals\fR
Discard temporary local symbols to reduce the sizes of the symbol table and the string table\. Temporary local symbols are local symbols starting with \fB\.L\fR\. Compilers usually generate such symbols for unnamed program elements such as string literals or floating\-point literals\.
.TP
\fB\-e\fR \fIsymbol\fR, \fB\-\-entry\fR=\fIsymbol\fR:
.TP
\fB\-f\fR \fIshlib\fR, \fB\-\-auxiliary\fR=\fIshlib\fR
Set the \fBDT_AUXILIARY\fR dynamic section field to \fIshlib\fR\.
.TP
\fB\-h\fR \fIlibname\fR, \fB\-\-soname\fR=\fIlibname\fR
Set the \fBDT_SONAME\fR dynamic section field to \fIlibname\fR\. This option is used when creating a shared object file\. Typically, when you create \fBlibfoo\.so\fR, you want to pass \fB\-\-soname=foo\fR to a linker\.
.TP
\fB\-l\fR \fIlibname\fR
Search for \fBlib\fR\fIlibname\fR\fB\.so\fR or \fBlib\fR\fIlibname\fR\fB\.a\fR from library search paths\.
.TP
\fB\-m\fR \fItarget\fR
Choose a \fItarget\fR\.
.TP
\fB\-o\fR \fIfile\fR, \fB\-\-output\fR=\fIfile\fR
Use \fIfile\fR as the output file name instead of the default name \fBa\.out\fR\.
.TP
\fB\-r\fR, \fB\-\-relocatable\fR
Instead of generating an executable or a shared object file, combine input object files to generate another object file that can be used as an input to a linker\.
.TP
\fB\-s\fR, \fB\-\-strip\-all\fR
Omit \fB\.symtab\fR section from the output file\.
.TP
\fB\-u\fR \fIsymbol\fR, \fB\-\-undefined\fR=\fIsymbol\fR
If \fIsymbol\fR remains as an undefined symbol after reading all object files, and if there is a static archive that contains an object file defining \fIsymbol\fR, pull out the object file and link it so that the output file contains a definition of \fIsymbol\fR\.
.TP
\fB\-y\fR \fIsymbol\fR, \fB\-\-trace\-symbol\fR=\fIsymbol\fR
Trace references to \fIsymbol\fR\.
.TP
\fB\-\-Bdynamic\fR
Link against shared libraries\.
.TP
\fB\-\-Bstatic\fR
Do not link against shared libraries\.
.TP
\fB\-\-Bsymbolic\fR
When creating a shared library, make global symbols export\-only (i\.e\. do not import the same symbol)\. As a result, references within a shared library are always resolved locally, negating symbol override at runtime\. See "Dynamic symbol resolution" for more information about symbol imports and exports\.
.TP
\fB\-\-Bsymbolic\-functions\fR
This option has the same effect as \fB\-\-Bsymbolic\fR but works only for function symbols\. Data symbols remain being both imported and exported\.
.TP
\fB\-\-Bsymbolic\-non\-weak\fR
This option has the same effect as \fB\-\-Bsymbolic\fR but works only for non\-weak symbols\. Weak symbols remain being both imported and exported\.
.TP
\fB\-\-Bsymbolic\-non\-weak\-functions\fR
This option has the same effect as \fB\-\-Bsymbolic\fR but works only for non\-weak function symbols\. Data symbols and weak function symbols remain being both imported and exported\.
.TP
\fB\-\-Bno\-symbolic\fR
Cancel \fB\-\-Bsymbolic\fR, \fB\-\-Bsymbolic\-functions\fR, \fB\-\-Bsymbolic\-non\-weak\fR and \fB\-\-Bsymbolic\-non\-weak\-functions\fR\.
.TP
\fB\-\-Map\fR=\fIfile\fR
Write map file to \fIfile\fR\.
.TP
\fB\-\-Tbss\fR=\fIaddress\fR
Alias for \fB\-\-section\-start=\.bss=\fR\fIaddress\fR\.
.TP
\fB\-\-Tdata\fR=\fIaddress\fR
Alias for \fB\-\-section\-start=\.data=\fR\fIaddress\fR\.
.TP
\fB\-\-Ttext\fR=\fIaddress\fR
Alias for \fB\-\-section\-start=\.text=\fR\fIaddress\fR\.
.TP
\fB\-\-allow\-multiple\-definition\fR
Normally, the linker reports an error if there are more than one definition of a symbol\. This option changes the default behavior so that it doesn't report an error for duplicate definitions and instead use the first definition\.
.TP
\fB\-\-allow\-shlib\-undefined\fR, \fB\-\-no\-allow\-shlib\-undefined\fR
Even if mold succeeds in linking a main executable without undefined symbol errors, you may still encounter symbol lookup errors at runtime because the dynamic linker cannot find some symbols in shared libraries in any ELF module\. This occurs because mold ignores undefined symbols in shared libraries by default\.
.IP
If you pass \fB\-\-no\-allow\-shlib\-undefined\fR, mold verifies that undefined symbols in shared libraries given to the linker can be resolved at link\-time\. In other words, this converts the runtime error to a link\-time error\.
.IP
Note that you need to pass all shared libraries, including indirectly dependent ones, to the linker as arguments for \fB\-l\fR\. If a shared library depends on a library that's not passed to the linker, the verification will be skipped for that file\.
.TP
\fB\-\-as\-needed\fR, \fB\-\-no\-as\-needed\fR
By default, shared libraries given to the linker are unconditionally added to the list of required libraries in an output file\. However, shared libraries after \fB\-\-as\-needed\fR are added to the list only when at least one symbol is actually used by the output file\. In other words, shared libraries after \fB\-\-as\-needed\fR are not added to the list of needed libraries if they are not needed by a program\.
.IP
The \fB\-\-no\-as\-needed\fR option restores the default behavior for subsequent files\.
.TP
\fB\-\-build\-id\fR=[ \fBmd5\fR | \fBsha1\fR | \fBsha256\fR | \fBfast\fR | \fBuuid\fR | \fB0x\fR\fIhexstring\fR | \fBnone\fR ]
Create a \fB\.note\.gnu\.build\-id\fR section containing a byte string to uniquely identify an output file\. \fBsha256\fR compute a 256\-bit cryptographic hash of an output file and set it to build\-id\. \fBmd5\fR and \fBsha1\fR compute the same hash but truncate it to 128 and 160 bits, respectively, before setting it to build\-id\. \fBuuid\fR sets a random 128\-bit UUID\. \fB0x\fR\fIhexstring\fR sets \fIhexstring\fR\. \fBfast\fR is a synonym for \fBsha256\fR\.
.TP
\fB\-\-build\-id\fR
Synonym for \fB\-\-build\-id=sha256\fR\.
.TP
\fB\-\-no\-build\-id\fR
Synonym for \fB\-\-build\-id=none\fR\.
.TP
\fB\-\-compress\-debug\-sections\fR=[ \fBzlib\fR | \fBzlib\-gabi\fR | \fBzstd\fR | \fBnone\fR ]
Compress DWARF debug info (\fB\.debug_*\fR sections) using the zlib or zstd compression algorithm\. \fBzlib\-gabi\fR is an alias for \fBzlib\fR\.
.TP
\fB\-\-defsym\fR=\fIsymbol\fR=\fIvalue\fR
Define \fIsymbol\fR as an alias for \fIvalue\fR\.
.IP
\fIvalue\fR is either an integer (in decimal or hexadecimal with \fB0x\fR prefix) or a symbol name\. If an integer is given as a value, \fIsymbol\fR is defined as an absolute symbol with the given value\.
.TP
\fB\-\-default\-symver\fR
Use soname as a symbol version and append that version to all symbols\.
.TP
\fB\-\-demangle\fR, \fB\-\-no\-demangle\fR
Demangle C++ and Rust symbols in log messages\.
.TP
\fB\-\-dependency\-file\fR=\fIfile\fR
Write a dependency file to \fIfile\fR\. The contents of the written file is readable by make(1), which defines only one rule with the linker's output file as a target and all input files as its prerequisites\. Users are expected to include the generated dependency file into a Makefile to automate the dependency management\. This option is analogous to the compiler's \fB\-MM \-MF\fR options\.
.TP
\fB\-\-dynamic\-list\fR=\fIfile\fR
Read a list of dynamic symbols from \fIfile\fR\. Same as \fB\-\-export\-dynamic\-symbol\-list\fR, except that it implies \fB\-\-Bsymbolic\fR\. If \fIfile\fR does not exist in the current directory, it is searched from library search paths for the sake of compatibility with GNU ld\.
.TP
\fB\-\-eh\-frame\-hdr\fR, \fB\-\-no\-eh\-frame\-hdr\fR
Create \fB\.eh_frame_hdr\fR section\.
.TP
\fB\-\-emit\-relocs\fR
The linker usually "consumes" relocation sections\. That is, the linker applies relocations to other sections, and relocation sections themselves are discarded\.
.IP
The \fB\-\-emit\-relocs\fR instructs the linker to leave relocation sections in the output file\. Some post\-link binary analysis or optimization tools such as LLVM Bolt need them\.
.TP
\fB\-\-enable\-new\-dtags\fR, \fB\-\-disable\-new\-dtags\fR
By default, \fBmold\fR emits \fBDT_RUNPATH\fR for \fB\-\-rpath\fR\. If you pass \fB\-\-disable\-new\-dtags\fR, \fBmold\fR emits \fBDT_RPATH\fR for \fB\-\-rpath\fR instead\.
.TP
\fB\-\-execute\-only\fR:
.TP
\fB\-\-exclude\-libs\fR=\fIlibraries\fR \|\.\|\.\|\.
Mark all symbols in the given \fIlibraries\fR hidden\.
.TP
\fB\-\-export\-dynamic\-symbol\fR=\fIsymbol\fR
Put symbols matching \fIsymbol\fR in the dynamic symbol table\. \fIsymbol\fR may be a glob pattern in the same syntax as for the \fB\-\-export\-dynamic\-symbol\-list\fR or \fB\-\-version\-script\fR options\.
.TP
\fB\-\-export\-dynamic\-symbol\-list\fR=\fIfile\fR
Read a list of dynamic symbols from \fIfile\fR\.
.TP
\fB\-\-fatal\-warnings\fR, \fB\-\-no\-fatal\-warnings\fR
Treat warnings as errors\.
.TP
\fB\-\-fini\fR=\fIsymbol\fR
Call \fIsymbol\fR at unload\-time\.
.TP
\fB\-\-gc\-sections\fR, \fB\-\-no\-gc\-sections\fR
Remove unreferenced sections\.
.TP
\fB\-\-gdb\-index\fR
Create a \fB\.gdb_index\fR section to speed up GNU debugger\. To use this, you need to compile source files with the \fB\-ggnu\-pubnames\fR compiler flag\.
.TP
\fB\-\-hash\-style\fR=[ \fBsysv\fR | \fBgnu\fR | \fBboth\fR | \fBnone\fR ]
Set hash style\.
.TP
\fB\-\-icf\fR=[ \fBsafe\fR | \fBall\fR | \fBnone\fR ], \fB\-\-no\-icf\fR
It is not uncommon for a program to contain many identical functions that differ only in name\. For example, a C++ template \fBstd::vector\fR is very likely to be instantiated to the identical code for \fBstd::vector<int>\fR and \fBstd::vector<unsigned>\fR because the container cares only about the size of the parameter type\. Identical Code Folding (ICF) is a size optimization to identify and merge such identical functions\.
.IP
If \fB\-\-icf=all\fR is given, \fBmold\fR tries to merge all identical functions\. This reduces the size of the output most, but it is not a "safe" optimization\. It is guaranteed in C and C++ that two pointers pointing two different functions will never be equal, but \fB\-\-icf=all\fR breaks that assumption as two identical functions have the same address after merging\. So a care must be taken when you use this flag that your program does not depend on the function pointer uniqueness\.
.IP
\fB\-\-icf=safe\fR is a flag to merge functions only when it is safe to do so\. That is, if a program does not take an address of a function, it is safe to merge that function with other function, as you cannot compare a function pointer with something else without taking an address of a function\.
.IP
\fB\-\-icf=safe\fR needs to be used with a compiler that supports \fB\.llvm_addrsig\fR section which contains the information as to what symbols are address\-taken\. LLVM/Clang supports that section by default\. Since GCC does not support it yet, you cannot use \fB\-\-icf=safe\fR with GCC (it doesn't do any harm but can't optimize at all\.)
.IP
\fB\-\-icf=none\fR and \fB\-\-no\-icf\fR disables ICF\.
.TP
\fB\-\-ignore\-data\-address\-equality\fR
Make ICF to merge not only functions but also data\. This option should be used in combination with \fB\-\-icf=all\fR\.
.TP
\fB\-\-image\-base\fR=\fIaddr\fR
Set the base address to \fIaddr\fR\.
.TP
\fB\-\-init\fR=\fIsymbol\fR
Call \fIsymbol\fR at load\-time\.
.TP
\fB\-\-no\-undefined\fR
Report undefined symbols (even with \fB\-\-shared\fR)\.
.TP
\fB\-\-noinhibit\-exec\fR
Create an output file even if errors occur\.
.TP
\fB\-\-package\-metadata\fR=\fIpercent\-encoded\-string\fR
Embed a specified string into the \fB\.note\.package\fR section\. This option is designed for build scripts that generate binary packages, such as \fB\.rpm\fR or \fB\.deb\fR, to include package metadata in each executable\. It simplifies the process of identifying the corresponding package for a given executable or core file\.
.IP
An argument to this option is treated as percent\-encoded and decoded before being inserted into the section, allowing you to avoid the use of the comma (\fB,\fR) character in the argument\. This is useful because the compiler replaces all occurrences of commas in \fB\-Wl,\fR with spaces before forwarding them to the linker\. Note that \fBmold\fR always interprets the argument as percent\-encoded, so you also need to escape all occurrences of \fB%\fR as \fB%25\fR\.
.TP
\fB\-\-pack\-dyn\-relocs\fR=[ \fBrelr\fR | \fBnone\fR ]
If \fBrelr\fR is specified, all \fBR_*_RELATIVE\fR relocations are put into \fB\.relr\.dyn\fR section instead of \fB\.rel\.dyn\fR or \fB\.rela\.dyn\fR section\. Since \fB\.relr\.dyn\fR section uses a space\-efficient encoding scheme, specifying this flag can reduce the size of the output\. This is typically most effective for position\-independent executable\.
.IP
Note that a runtime loader has to support \fB\.relr\.dyn\fR to run executables or shared libraries linked with \fB\-\-pack\-dyn\-relocs=relr\fR\. As of 2022, only ChromeOS, Android and Fuchsia support it\.
.TP
\fB\-\-pie\fR, \fB\-\-pic\-executable\fR, \fB\-\-no\-pie\fR, \fB\-\-no\-pic\-executable\fR
Create a position\-independent executable\.
.TP
\fB\-\-print\-gc\-sections\fR, \fB\-\-no\-print\-gc\-sections\fR
Print removed unreferenced sections\.
.TP
\fB\-\-print\-icf\-sections\fR, \fB\-\-no\-print\-icf\-sections\fR
Print folded identical sections\.
.TP
\fB\-\-push\-state\fR, \fB\-\-pop\-state\fR
\fB\-\-push\-state\fR saves the current values of \fB\-\-as\-needed\fR, \fB\-\-whole\-archive\fR, \fB\-\-static\fR, and \fB\-\-start\-lib\fR\. The saved values can be restored by pop\-state\.
.IP
\fB\-\-push\-state\fR and \fB\-\-pop\-state\fR pairs can nest\.
.IP
These options are useful when you want to construct linker command line options programmatically\. For example, if you want to link \fBlibfoo\.so\fR by as\-needed basis but don't want to change the global state of \fB\-\-as\-needed\fR, you can append \fB\-\-push\-state \-\-as\-needed \-lfoo \-\-pop\-state\fR to the linker command line options\.
.TP
\fB\-\-relax, \-\-no\-relax\fR
Rewrite machine instructions with more efficient ones for some relocations\. The feature is enabled by default\.
.TP
\fB\-\-require\-defined\fR=\fIsymbol\fR
Like \fB\-\-undefined\fR, except the new symbol must be defined by the end of the link\.
.TP
\fB\-\-retain\-symbols\-file\fR=\fIfile\fR
Keep only symbols listed in \fIfile\fR\. \fIfile\fR is a text file containing a symbol name on each line\. \fBmold\fR discards all local symbols as well as global symbol that are not in \fIfile\fR\. Note that this option removes symbols only from \fB\.symtab\fR section and does not affect \fB\.dynsym\fR section, which is used for dynamic linking\.
.TP
\fB\-\-rpath\fR=\fIdir\fR
Add \fIdir\fR to runtime search paths\.
.TP
\fB\-\-section\-start\fR=\fIsection\fR=\fIaddress\fR
Set \fIaddress\fR to section\. \fIaddress\fR is a hexadecimal number that may start with an optional \fB0x\fR\.
.TP
\fB\-\-shared\fR, \fB\-\-Bshareable\fR
Create a share library\.
.TP
\fB\-\-spare\-dynamic\-tags\fR=\fInumber\fR
Append the given number of \fBDT_NULL\fR entries to the end of the \fB\.dynamic\fR section, so that post\-link processing tools can easily add new dynamic tags by overwriting the null entries\.
.TP
\fB\-\-start\-lib\fR, \fB\-\-end\-lib\fR
Handle object files between \fB\-\-start\-lib\fR and \fB\-\-end\-lib\fR as if they were in an archive file\. That means object files between them are linked only when they are needed to resolve undefined symbols\. The options are useful if you want to link object files only when they are needed but want to avoid the overhead of running ar(3)\.
.TP
\fB\-\-static\fR
Do not link against shared libraries\.
.TP
\fB\-\-sysroot\fR=\fIdir\fR
Set target system root directory to \fIdir\fR\.
.TP
\fB\-\-trace\fR
Print name of each input file\.
.TP
\fB\-\-undefined\-glob\fR=\fIpattern\fR
Synonym for \fB\-\-undefined\fR, except that \fB\-\-undefined\-glob\fR takes a glob pattern instead of just a single symbol name\.
.TP
\fB\-\-undefined\-version\fR, \fB\-\-no\-undefined\-version\fR
By default, \fBmold\fR warns on a symbol specified by a version script or by \fB\-\-export\-dynamic\-symbol\fR if it is not defined\. You can silence the warning by \fB\-\-undefined\-version\fR\.
.TP
\fB\-\-unique\fR=\fIpattern\fR
Don't merge input sections that match the given glob pattern \fIpattern\fR\.
.TP
\fB\-\-unresolved\-symbols\fR=[ \fBreport\-all\fR | \fBignore\-all\fR | \fBignore\-in\-object\-files\fR | \fBignore\-in\-shared\-libs\fR ]
How to handle undefined symbols\.
.TP
\fB\-\-version\-script\fR=\fIfile\fR
Read version script from \fIfile\fR\. If \fIfile\fR does not exist in the current directory, it is searched from library search paths for the sake of compatibility with GNU ld\.
.TP
\fB\-\-warn\-common\fR, \fB\-\-no\-warn\-common\fR
Warn about common symbols\.
.TP
\fB\-\-warn\-once\fR
Only warn once for each undefined symbol instead of warn for each relocation referring an undefined symbol\.
.TP
\fB\-\-warn\-unresolved\-symbols\fR, \fB\-\-error\-unresolved\-symbols\fR
Normally, the linker reports an error for unresolved symbols\. \fB\-\-warn\-unresolved\-symbols\fR option turns it into a warning\. \fB\-\-error\-unresolved\-symbols\fR option restores the default behavior\.
.TP
\fB\-\-whole\-archive\fR, \fB\-\-no\-whole\-archive\fR
When archive files (\fB\.a\fR files) are given to the linker, only object files that are needed to resolve undefined symbols are extracted from them and linked to an output file\. \fB\-\-whole\-archive\fR changes that behavior for subsequent archives so that the linker extracts all object files and links them to an output\. For example, if you are creating a shared object file and you want to include all archive members to the output, you should pass \fB\-\-whole\-archive\fR\. \fB\-\-no\-whole\-archive\fR restores the default behavior for subsequent archives\.
.TP
\fB\-\-wrap\fR=\fIsymbol\fR
Make \fIsymbol\fR be resolved to \fB__wrap_\fR\fIsymbol\fR\. The original symbol can be resolved as \fB__real_\fR\fIsymbol\fR\. This option is typically used for wrapping an existing function\.
.TP
\fB\-z cet\-report\fR=[ \fBwarning\fR | \fBerror\fR | \fBnone\fR ]
Intel Control\-flow Enforcement Technology (CET) is a new x86 feature available since Tiger Lake which is released in 2020\. It defines new instructions to harden security to protect programs from control hijacking attacks\. You can tell the compiler to use the feature by specifying the \fB\-fcf\-protection\fR flag\.
.IP
\fB\-z cet\-report\fR flag is used to make sure that all object files were compiled with a correct \fB\-fcf\-protection\fR flag\. If \fBwarning\fR or \fBerror\fR are given, \fBmold\fR prints out a warning or an error message if an object file was not compiled with the compiler flag\.
.IP
\fBmold\fR looks for \fBGNU_PROPERTY_X86_FEATURE_1_IBT\fR bit and \fBGNU_PROPERTY_X86_FEATURE_1_SHSTK\fR bit in \fB\.note\.gnu\.property\fR section to determine whether or not an object file was compiled with \fB\-fcf\-protection\fR\.
.TP
\fB\-z now\fR, \fB\-z lazy\fR
By default, functions referring to other ELF modules are resolved by the dynamic linker when they are called for the first time\. \fB\-z now\fR marks an executable or a shared library file so that all dynamic symbols are resolved when a file is loaded to memory\. \fB\-z lazy\fR restores the default behavior\.
.TP
\fB\-z origin\fR
Mark object requiring immediate \fB$ORIGIN\fR processing at runtime\.
.TP
\fB\-z ibt\fR
Turn on \fBGNU_PROPERTY_X86_FEATURE_1_IBT\fR bit in \fB\.note\.gnu\.property\fR section to indicate that the output uses IBT\-enabled PLT\. This option implies \fB\-z ibtplt\fR\.
.TP
\fB\-z ibtplt\fR
Generate Intel Branch Tracking (IBT)\-enabled PLT which is the default on x86\-64\. This is the default\.
.TP
\fB\-z execstack\fR, \fB\-z noexecstack\fR
By default, the pages for the stack area (i\.e\. the pages where local variables reside) are not executable for security reasons\. \fB\-z execstack\fR makes it executable\. \fB\-z noexecstack\fR restores the default behavior\.
.TP
\fB\-z keep\-text\-section\-prefix\fR, \fB\-z nokeep\-text\-section\-prefix\fR
Keep \fB\.text\.hot\fR, \fB\.text\.unknown\fR, \fB\.text\.unlikely\fR, \fB\.text\.startup\fR, and \fB\.text\.exit\fR as separate sections in the final binary instead of merging them as \fB\.text\fR\.
.TP
\fB\-z rodynamic\fR
Make the \fB\.dynamic\fR section read\-only\.
.TP
\fB\-z relro\fR, \fB\-z norelro\fR
Some sections such as \fB\.dynamic\fR have to be writable only during a module is being loaded to memory\. Once the dynamic linker finishes its job, such sections won't be mutated by anyone\. As a security mitigation, it is preferred to make such segments read\-only during program execution\.
.IP
\fB\-z relro\fR puts such sections into a special segment called \fBrelro\fR\. The dynamic linker makes a relro segment read\-only after it finishes its job\.
.IP
By default, \fBmold\fR generates a relro segment\. \fB\-z norelro\fR disables the feature\.
.TP
\fB\-z sectionheader\fR, \fB\-z nosectionheader\fR
\fB\-z nosectionheader\fR tell the linker to omit the section header\. By default, the linker does not omit the section header\.
.TP
\fB\-z separate\-loadable\-segments\fR, \fB\-z separate\-code\fR, \fB\-z noseparate\-code\fR
If one memory page contains multiple segments, the page protection bits are set in such a way that the needed attributes (writable or executable) are satisfied for all segments\. This usually happens at a boundary of two segments with two different attributes\.
.IP
\fBseparate\-loadable\-segments\fR adds paddings between segments with different attributes so that they do not share the same page\.
.IP
\fBseparate\-code\fR adds paddings only between executable and non\-executable segments\. This is the default\.
.IP
\fBnoseparate\-code\fR does not add any paddings between segments\.
.TP
\fB\-z defs\fR, \fB\-z nodefs\fR
Report undefined symbols (even with \fB\-\-shared\fR)\.
.TP
\fB\-z shstk\fR
Enforce shadow stack by turning \fBGNU_PROPERTY_X86_FEATURE_1_SHSTK\fR bit in \fB\.note\.gnu\.property\fR output section\. Shadow stack is part of Intel Control\-flow Enforcement Technology (CET), which is available since Tiger Lake (2020)\.
.TP
\fB\-z start_stop_visibility\fR=[ \fBhidden\fR | \fBprotected\fR ]
If a section name is valid as a C identifier (i\.e\., it matches \fB/^[_a\-zA\-Z][_a\-zA\-Z0\-9]*$/\fR), mold creates \fB__start_SECNAME\fR and \fB__stop_SECNAME\fR symbols to mark the beginning and end of the section, where \fBSECNAME\fR is the section name\.
.IP
You can make these marker symbols visible from other ELF modules by passing \fB\-z start_stop_visibility=protected\fR\. Default is \fBhidden\fR\.
.TP
\fB\-z text\fR, \fB\-z notext\fR, \fB\-z textoff\fR
\fBmold\fR by default reports an error if dynamic relocations are created in read\-only sections\. If \fB\-z notext\fR or \fB\-z textoff\fR are given, \fBmold\fR creates such dynamic relocations without reporting an error\. \fB\-z text\fR restores the default behavior\.
.TP
\fB\-z max\-page\-size\fR=\fInumber\fR
Some CPU ISAs support multiple memory page sizes\. This option specifies the maximum page size that an output binary can run on\. In general, binaries built for a larger page size can run on a system with a smaller page size, but not vice versa\. The default value is 4 KiB for i386, x86\-64, and RISC\-V, and 64 KiB for ARM64\.
.TP
\fB\-z nodefaultlib\fR
Make the dynamic loader ignore default search paths\.
.TP
\fB\-z nodelete\fR
Mark DSO non\-deletable at runtime\.
.TP
\fB\-z nodlopen\fR
Mark DSO not available to dlopen(3)\. This option makes it possible for the linker to optimize thread\-local variable accesses by rewriting instructions for some targets\.
.TP
\fB\-z nodump\fR
Mark DSO not available to dldump(3)\.
.TP
\fB\-z nocopyreloc\fR
Do not create copy relocations\.
.TP
\fB\-z initfirst\fR
Mark DSO to be initialized first at runtime\.
.TP
\fB\-z interpose\fR
Mark object to interpose all DSOs but executable\.
.TP
\fB\-(\fR, \fB\-)\fR, \fB\-EL\fR, \fB\-O\fR\fInumber\fR, \fB\-\-dc\fR, \fB\-\-dp\fR, \fB\-\-end\-group\fR, \fB\-\-no\-add\-needed\fR, \fB\-\-no\-copy\-dt\-needed\-entries\fR, \fB\-\-nostdlib\fR, \fB\-\-rpath\-link=Ar dir\fR, \fB\-\-sort\-common\fR, \fB\-\-sort\-section\fR, \fB\-\-start\-group\fR, \fB\-\-warn\-constructors\fR, \fB\-\-warn\-once\fR, \fB\-\-fix\-cortex\-a53\-835769\fR, \fB\-\-fix\-cortex\-a53\-843419\fR, \fB\-z combreloc\fR, \fB\-z common\-page\-size\fR, \fB\-z nocombreloc\fR
Ignored
.SH "ENVIRONMENT VARIABLES"
.TP
\fBMOLD_JOBS\fR
If this variable is set to \fB1\fR, only one \fBmold\fR process will run at a time\. If a new mold process is initiated while another is already active, the new process will wait until the active one completes before starting\.
.IP
The primary reason for this environment variable is to minimize peak memory usage\. Since mold is designed to operate with high parallelism, running multiple mold instances simultaneously may not be beneficial\. If you execute N instances of mold concurrently, it could require N times the time and N times the memory\. On the other hand, running them one after the other might still take N times longer, but the peak memory usage would be the same as running just a single instance\.
.IP
If your build system invokes multiple linker processes simultaneously and some of them often get killed due to out\-of\-memory errors, you might consider setting this environment variable to \fB1\fR to see if it addresses the OOM issue\.
.IP
Currently, any value other than \fB1\fR is silently ignored\.
.TP
\fBMOLD_DEBUG\fR
If this variable is set to a non\-empty string, \fBmold\fR embeds its command\-line options in the output file's \fB\.comment\fR section\.
.TP
\fBMOLD_REPRO\fR
Setting this variable to a non\-empty string has the same effect as passing the \fB\-\-repro\fR option\.
.SH "SEE ALSO"
gold(1), ld(1), elf(5), ld\.so(8)
.SH "AUTHOR"
Rui Ueyama \fIruiu@cs\.stanford\.edu\fR
.SH "BUGS"
Report bugs to \fIhttps://github\.com/rui314/mold/issues\fR\.
================================================
FILE: docs/mold.md
================================================
mold(1) -- a modern linker
==========================
## SYNOPSIS
`mold` [_option_...] _file_...
## DESCRIPTION
`mold` is a faster drop-in replacement for the default GNU ld(1).
### How to use
See <https://github.com/rui314/mold#how-to-use>.
### Compatibility
`mold` is designed to be a drop-in replacement for the GNU linkers for
linking user-land programs. If your user-land program cannot be built due to
missing command-line options, please file a bug at
<https://github.com/rui314/mold/issues>.
`mold` supports a very limited set of linker script features, which is just
sufficient to read `/usr/lib/x86_64-linux-gnu/libc.so` on Linux systems (on
Linux, that file is contrary to its name not a shared library but an ASCII
linker script that loads a real `libc.so` file.)
Beyond that, we have no plan to support any additional linker script features.
The linker script is an ad-hoc, over-designed, complex language which we
believe needs to be replaced by a simpler mechanism. We have a plan to add a
replacement for the linker script to `mold` instead.
### Archive symbol resolution
Traditionally, Unix linkers are sensitive to the order in which input files
appear on the command line. They process input files from the first (leftmost)
file to the last (rightmost) file one-by-one. While reading input files, they
maintain sets of defined and undefined symbols. When visiting an archive file
(`.a` files), they pull out object files to resolve as many undefined symbols
as possible and move on to the next input file. Object files that weren't
pulled out will never have a chance for a second look.
Due to this behavior, you usually have to add archive files at the end of a
command line, so that when a linker reaches archive files, it knows what
symbols remain as undefined.
If you put archive files at the beginning of a command line, a linker doesn't
have any undefined symbols, and thus no object files will be pulled out from
archives. You can change the processing order by using the `--start-group` and
`--end-group` options, though they make a linker slower.
`mold`, as well as the LLVM lld(1) linker, takes a different approach. They
remember which symbols can be resolved from archive files instead of
forgetting them after processing each archive. Therefore, `mold` and lld(1)
can "go back" in a command line to pull out object files from archives if they
are needed to resolve remaining undefined symbols. They are not sensitive to
the input file order.
`--start-group` and `--end-group` are still accepted by `mold` and lld(1)
for compatibility with traditional linkers, but they are silently ignored.
### Dynamic symbol resolution
Some Unix linker features are difficult to understand without comprehending
the semantics of dynamic symbol resolution. Therefore, even though it's not
specific to `mold`, we'll explain it here.
We use "ELF module" or just "module" as a collective term to refer to an
executable or a shared library file in the ELF format.
An ELF module may have lists of imported symbols and exported symbols, as well
as a list of shared library names from which imported symbols should be
imported. The point is that imported symbols are not bound to any specific
shared library until runtime.
Here is how the Unix dynamic linker resolves dynamic symbols. Upon the start
of an ELF program, the dynamic linker constructs a list of ELF modules which,
as a whole, consist of a complete program. The executable file is always at
the beginning of the list followed by its dependent shared libraries. An
imported symbol is searched from the beginning of the list to the end. If two
or more modules define the same symbol, the one that appears first in the list
takes precedence over the others.
This Unix semantics are contrary to systems such as Windows that have a
two-level namespace for dynamic symbols. On Windows, for example, dynamic
symbols are represented as a tuple of (`symbol-name`, `shared-library-name`),
so that each dynamic symbol is guaranteed to be resolved from some specific
library.
Typically, an ELF module that exports a symbol also imports the same symbol.
Such a symbol is usually resolved to itself, but that's not the case if a
module that appears before it in the symbol search list provides another
definition of the same symbol.
Let's take `malloc` as an example. Assume that you define your version of
`malloc` in your main executable file. Then, all `malloc` calls from any
module are resolved to your function instead of the one in libc, because the
executable is always at the beginning of the dynamic symbol search list. Note
that even `malloc` calls within libc are resolved to your definition since
libc exports and imports `malloc`. Therefore, by defining `malloc` yourself,
you can overwrite a library function, and the `malloc` in libc becomes dead
code.
These Unix semantics are tricky and sometimes considered harmful. For example,
assume that you accidentally define `atoi` as a global function in your
executable that behaves completely differently from the one in the C standard.
Then, all `atoi` function calls from any modules (even function calls within
libc) are redirected to your function instead of the one in libc, which will
very likely cause a problem. That is a somewhat surprising consequence for an
accidental name conflict. On the other hand, this semantic is sometimes useful
because it allows users to override library functions without rebuilding
modules containing them.
Whether good or bad, you should keep these semantics in mind to understand
Unix linkers' behaviors.
### Build reproducibility
`mold`'s output is deterministic. That is, if you pass the same object files
and the same command-line options to the same version of `mold`, it is
guaranteed that `mold` produces the bit-for-bit identical output. The linker's
internal randomness, such as the timing of thread scheduling or iteration
orders of hash tables, doesn't affect the output.
`mold` does not have any host-specific default settings. This is contrary to the
GNU linkers, for which some configurable values, such as system-dependent
library search paths, are hard-coded. `mold` depends only on its command-line
arguments.
## OPTION NOTATIONS
Multi-letter long options may precede either a single dash or double dashes,
except for those starting with the letter "o". For historical reasons, long
options beginning with "o" must precede double dashes.
For example, you can spell `--as-needed` as `-as-needed`, but `--omagic` must
not be spelled as `-omagic`. `-omagic` will be interpreted not as `--omagic`
but as `-o magic`.
## MOLD-SPECIFIC OPTIONS
* `--chroot`=_dir_:
Set _dir_ as the root directory.
* `--color-diagnostics`=[ _auto_ | _always_ | _never_ ]:
Show diagnostic messages in color using ANSI escape sequences. `auto` means
that `mold` prints out messages in color only if the standard output is
connected to a TTY. Default is `auto`.
* `--color-diagnostics`:
Synonym for `--color-diagnostics=auto`.
* `--no-color-diagnostics`:
Synonym for `--color-diagnostics=never`.
* `--detach`, `--no-detach`:
Permit or do not permit mold to create a debug info file in the background.
* `--fork`, `--no-fork`:
Spawn a child process and let it do the actual linking. When linking a large
program, the OS kernel can take a few hundred milliseconds to terminate a
`mold` process. `--fork` hides that latency. By default, it does fork.
Note that `--fork` also hides the resource usage statistics reported by
time(2), since it doesn't call waitpid(2) on the child process. If you
need those statistics, pass `--no-fork`.
* `--perf`:
Print performance statistics.
* `--print-dependencies`:
Print out dependency information for input files.
Each line of the output for this option shows which file depends on which
file to use a specific symbol. This option is useful for debugging why some
object file in a static archive got linked or why some shared library is
kept in an output file's dependency list even with `--as-needed`.
* `--relocatable-merge-sections`:
By default, `mold` doesn't merge input sections by name when merging input
object files into a single output object file for `-r`. For example,
`.text.foo` and `.text.bar` aren't merged for `-r` even though they are
merged into `.text` based on the default section merging rules.
This option changes the behavior so that `mold` merges input sections by
name by the default section merging rules.
* `--repro`:
Archive input files, as well as a text file containing command line options,
in a tar file so that you can run `mold` with the exact same inputs again.
This is useful for reporting a bug with a reproducer. The output filename is
`path/to/output.tar`, where `path/to/output` is an output filename specified
by `-o`.
* `--reverse-sections`:
Reverse the order of input sections before assigning them the offsets in the
output file.
This option is useful for finding bugs that depend on the initialization
order of global objects. In C++, constructors of global objects in a single
source file are guaranteed to be executed in the source order, but there's
no such guarantee across compilation units. Usually, constructors are
executed in the order given to the linker, but depending on it is a mistake.
By reversing the order of input sections using `--reverse-sections`, you can
easily test that your program works in the reversed initialization order.
* `--run` _command_ _arg_...:
Run _command_ with `mold` as `/usr/bin/ld`. Specifically, `mold` runs a
given command with the `LD_PRELOAD` environment set to intercept exec(3)
family functions and replaces `argv[0]` with itself if it is `ld`,
`ld.gold`, or `ld.lld`.
* `--separate-debug-file`, `--separate-debug-file`=_file_:
Bundle debug info sections into a separate file instead of embedding them in
an output executable or a shared library. mold creates a debug info file in
the background by default, so that you can start running your executable as
soon as possible.
By default, the debug info file is created in the same directory as is the
output file, with the `.dbg` file extension. That filename is embedded into
the output file so that `gdb` can automatically find the debug info file for
the output file. For more info about gdb features related to separate debug
files, see
<https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html>.
mold holds a file lock with flock(2) while creating a debug info file in the
background.
If you don't want to create a debug info file in the background, pass the
`--no-detach` option.
* `--shuffle-sections`, `--shuffle-sections`=_number_:
Randomize the output by shuffling the order of input sections before
assigning them the offsets in the output file. If a _number_ is given, it's
used as a seed for the random number generator, so that the linker produces
the same output for the same seed. If no seed is given, a random number is
used as a seed.
This option is useful for benchmarking. Modern CPUs are sensitive to a
program's memory layout. A seemingly benign change in program layout, such
as a small size increase of a function in the middle of a program, can
affect the program's performance. Therefore, even if you write new code and
get a good benchmark result, it is hard to say whether the new code improves
the program's performance; it is possible that the new memory layout happens
to perform better.
By running a benchmark multiple times with randomized memory layouts using
`--shuffle-sections`, you can isolate your program's real performance number
from the randomness caused by memory layout changes.
* `--spare-program-headers`=_number_:
Append the given number of `PT_NULL` entries to the end of the program
header, so that post-link processing tools can easily add new segments by
overwriting the null entries.
Note that ELF requires all `PT_LOAD` segments to be sorted by `p_vaddr`.
Therefore, if you add a new LOAD segment, you may need to sort the entire
program header.
* `--stats`:
Print input statistics.
* `--thread-count`=_count_:
Use _count_ number of threads.
* `--threads`, `--no-threads`:
Use multiple threads. By default, `mold` uses as many threads as the number of
cores or 32, whichever is smaller. The reason it is capped at 32 is because
`mold` doesn't scale well beyond that point. To use only one thread, pass
`--no-threads` or `--thread-count=1`.
* `--quick-exit`, `--no-quick-exit`:
Use or do not use `quick_exit` to exit.
* `--zero-to-bss`:
Convert all-zero data sections into BSS.
When this option is enabled, `mold` scans input data sections that are not
of type `SHT_NOBITS` and checks whether their contents consist solely of
zero bytes. Such sections are then converted into BSS (`SHT_NOBITS`)
sections. This reduces the size of the output file, since BSS sections
occupy no space in the file image.
This behavior is especially useful for user-defined sections created with
`__attribute__((section(".sectname")))` that contain uninitialized global
variables. GCC and Clang do not automatically mark such sections as BSS
even if their contents are entirely zero, and instead emit them as regular
data sections.
For example, consider `__attribute__((section(".sectname"))) int vec[256];`.
By default, this results in a `.sectname` section of type `SHT_PROGBITS`
filled with zeros. With `--zero-to-bss`, the linker will recognize it as
empty data and convert it to a `SHT_NOBITS` section, reducing the output
file size without changing runtime semantics.
* `-z rewrite-endbr`, `-z norewrite-endbr`:
As a security measure, some CPU instruction sets have recently gained a
feature to protect control flow integrity by disallowing indirect branches
by default. If the feature is enabled, the instruction that is executed
immediately after an indirect branch must be an branch target marker
instruction, or a CPU-level fault will raise. The marker instruction is also
known as "landing pad" instruction, to which indirect branches can land.
This feature makes ROP attacks harder to conduct.
To use the feature, a function whose pointer is taken needs to begin with a
landing pad because a function call via a function pointer is compiled to an
indirect branch. On the other hand, if a function is called only directly
(i.e. referred to only by _direct_ branch instructions), it doesn't have to
begin with it.
By default, the compiler always emits a landing pad at the beginning of each
global function because it doesn't know whether or not the function's
pointer is taken in another translation unit. As a result, the resulting
binary has more attack surface than necessary.
If `--rewrite-endbr` is given, mold conducts a whole program analysis
to identify functions whose addresses are actually taken and rewrites
landing pads with no-ops for non-address-taken functions, reducing the
attack surface.
This feature is currently available only on x86-64.
## GNU-COMPATIBLE OPTIONS
* `--help`:
Report usage information to stdout and exit.
* `-v`, `--version`:
Report version information to stdout.
* `-V`:
Report version and target information to stdout.
* `-E`, `--export-dynamic`, `--no-export-dynamic`:
When creating an executable, using the `-E` option causes all global symbols
to be put into the dynamic symbol table, so that the symbols are visible
from other ELF modules at runtime.
By default, or if `--no-export-dynamic` is given, only symbols that are
referenced by DSOs at link-time are exported from an executable.
* `-F` _libname_, `--filter`=_libname_:
Set the `DT_FILTER` dynamic section field to _libname_.
* `-I` _file_, `--dynamic-linker`=_file_, `--no-dynamic-linker`:
Set the dynamic linker path to _file_. If no `-I` option is given, or if
`--no-dynamic-linker` is given, no dynamic linker path is set to an output
file. This is contrary to the GNU linkers which set a default dynamic linker
path in that case. This difference doesn't usually make any difference
because the compiler driver always passes `-I` to the linker.
* `-L` _dir_, `--library-path`=_dir_:
Add _dir_ to the list of library search paths from which `mold` searches
libraries for the `-l` option.
Unlike the GNU linkers, `mold` does not have default search paths. This
difference doesn't usually make any difference because the compiler driver
always passes all necessary search paths to the linker.
* `-M`, `--print-map`:
Write a map file to stdout.
* `-N`, `--omagic`, `--no-omagic`:
Force `mold` to emit an output file with an old-fashioned memory layout.
First, it makes the first data segment not aligned to a page boundary.
Second, text segments are marked as writable if the option is given.
* `-S`, `--strip-debug`:
Omit `.debug_*` sections from the output file.
* `-T` _file_, `--script`=_file_:
Read linker script from _file_.
* `-X`, `--discard-locals`:
Discard temporary local symbols to reduce the sizes of the symbol table and
the string table. Temporary local symbols are local symbols starting with
`.L`. Compilers usually generate such symbols for unnamed program elements
such as string literals or floating-point literals.
* `-e` _symbol_, `--entry`=_symbol_:
Use _symbol_ as the entry point symbol instead of the default entry
point symbol _start.
* `-f` _shlib_, `--auxiliary`=_shlib_:
Set the `DT_AUXILIARY` dynamic section field to _shlib_.
* `-h` _libname_, `--soname`=_libname_:
Set the `DT_SONAME` dynamic section field to _libname_. This option is used
when creating a shared object file. Typically, when you create `libfoo.so`,
you want to pass `--soname=foo` to a linker.
* `-l` _libname_:
Search for `lib`_libname_`.so` or `lib`_libname_`.a` from library search
paths.
* `-m` _target_:
Choose a _target_.
* `-o` _file_, `--output`=_file_:
Use _file_ as the output file name instead of the default name `a.out`.
* `-r`, `--relocatable`:
Instead of generating an executable or a shared object file, combine input
object files to generate another object file that can be used as an input to
a linker.
* `-s`, `--strip-all`:
Omit `.symtab` section from the output file.
* `-u` _symbol_, `--undefined`=_symbol_:
If _symbol_ remains as an undefined symbol after reading all object files,
and if there is a static archive that contains an object file defining
_symbol_, pull out the object file and link it so that the output file
contains a definition of _symbol_.
* `-y` _symbol_, `--trace-symbol`=_symbol_:
Trace references to _symbol_.
* `--Bdynamic`:
Link against shared libraries.
* `--Bstatic`:
Do not link against shared libraries.
* `--Bsymbolic`:
When creating a shared library, make global symbols export-only (i.e. do not
import the same symbol). As a result, references within a shared library are
always resolved locally, negating symbol override at runtime. See "Dynamic
symbol resolution" for more information about symbol imports and exports.
* `--Bsymbolic-functions`:
This option has the same effect as `--Bsymbolic` but works only for function
symbols. Data symbols remain being both imported and exported.
* `--Bsymbolic-non-weak`:
This option has the same effect as `--Bsymbolic` but works only for non-weak
symbols. Weak symbols remain being both imported and exported.
* `--Bsymbolic-non-weak-functions`:
This option has the same effect as `--Bsymbolic` but works only for non-weak
function symbols. Data symbols and weak function symbols remain being both
imported and exported.
* `--Bno-symbolic`:
Cancel `--Bsymbolic`, `--Bsymbolic-functions`, `--Bsymbolic-non-weak` and
`--Bsymbolic-non-weak-functions`.
* `--Map`=_file_:
Write map file to _file_.
* `--Tbss`=_address_:
Alias for `--section-start=.bss=`_address_.
* `--Tdata`=_address_:
Alias for `--section-start=.data=`_address_.
* `--Ttext`=_address_:
Alias for `--section-start=.text=`_address_.
* `--allow-multiple-definition`:
Normally, the linker reports an error if there are more than one definition
of a symbol. This option changes the default behavior so that it doesn't
report an error for duplicate definitions and instead use the first
definition.
* `--allow-shlib-undefined`, `--no-allow-shlib-undefined`:
Even if mold succeeds in linking a main executable without undefined symbol
errors, you may still encounter symbol lookup errors at runtime because the
dynamic linker cannot find some symbols in shared libraries in any ELF
module. This occurs because mold ignores undefined symbols in shared
libraries by default.
If you pass `--no-allow-shlib-undefined`, mold verifies that undefined
symbols in shared libraries given to the linker can be resolved at
link-time. In other words, this converts the runtime error to a link-time
error.
Note that you need to pass all shared libraries, including indirectly
dependent ones, to the linker as arguments for `-l`. If a shared library
depends on a library that's not passed to the linker, the verification will
be skipped for that file.
* `--as-needed`, `--no-as-needed`:
By default, shared libraries given to the linker are unconditionally added
to the list of required libraries in an output file. However, shared
libraries after `--as-needed` are added to the list only when at least one
symbol is actually used by the output file. In other words, shared libraries
after `--as-needed` are not added to the list of needed libraries if they
are not needed by a program.
The `--no-as-needed` option restores the default behavior for subsequent
files.
* `--build-id`=[ `md5` | `sha1` | `sha256` | `fast` | `uuid` | `0x`_hexstring_ | `none` ]:
Create a `.note.gnu.build-id` section containing a byte string to uniquely
identify an output file. `sha256` compute a 256-bit cryptographic hash of an
output file and set it to build-id. `md5` and `sha1` compute the same hash
but truncate it to 128 and 160 bits, respectively, before setting it to
build-id. `uuid` sets a random 128-bit UUID. `0x`_hexstring_ sets
_hexstring_. `fast` is a synonym for `sha256`.
* `--build-id`:
Synonym for `--build-id=sha256`.
* `--no-build-id`:
Synonym for `--build-id=none`.
* `--compress-debug-sections`=[ `zlib` | `zlib-gabi` | `zstd` | `none` ]:
Compress DWARF debug info (`.debug_*` sections) using the zlib or zstd
compression algorithm. `zlib-gabi` is an alias for `zlib`.
* `--defsym`=_symbol_=_value_:
Define _symbol_ as an alias for _value_.
_value_ is either an integer (in decimal or hexadecimal with `0x` prefix) or
a symbol name. If an integer is given as a value, _symbol_ is defined as an
absolute symbol with the given value.
* `--default-symver`:
Use soname as a symbol version and append that version to all symbols.
* `--demangle`, `--no-demangle`:
Demangle C++ and Rust symbols in log messages.
* `--dependency-file`=_file_:
Write a dependency file to _file_. The contents of the written file is
readable by make(1), which defines only one rule with the linker's output
file as a target and all input files as its prerequisites. Users are
expected to include the generated dependency file into a Makefile to
automate the dependency management. This option is analogous to the
compiler's `-MM -MF` options.
* `--dynamic-list`=_file_:
Read a list of dynamic symbols from _file_. Same as
`--export-dynamic-symbol-list`, except that it implies `--Bsymbolic`. If
_file_ does not exist in the current directory, it is searched from library
search paths for the sake of compatibility with GNU ld.
* `--eh-frame-hdr`, `--no-eh-frame-hdr`:
Create `.eh_frame_hdr` section.
* `--emit-relocs`:
The linker usually "consumes" relocation sections. That is, the linker
applies relocations to other sections, and relocation sections themselves
are discarded.
The `--emit-relocs` instructs the linker to leave relocation sections in the
output file. Some post-link binary analysis or optimization tools such as
LLVM Bolt need them.
* `--enable-new-dtags`, `--disable-new-dtags`:
By default, `mold` emits `DT_RUNPATH` for `--rpath`. If you pass
`--disable-new-dtags`, `mold` emits `DT_RPATH` for `--rpath` instead.
* `--execute-only`:
Traditionally, setting the executable bit to 1 for a memory page implies
that the page also become readable, which allows machine code to be read
as data at runtime. That is actually what an attacker often does after
gaining a limited control of a process to find pieces of machine code
they can use to gain the full control of the process. As a mitigation,
recent processors including some ARM64 ones allows "execute-only" pages.
If a page is execute-only, you can call a function there as long as you
know its address but can't read it as data.
This option marks text segments as execute-only by setting just the "X"
bit instead of "RX". Note that on most systems, the absence of the "R"
bit in the text segment serves just as a hint. If you run a program
linked with `--execute-only` on a processor that doesn't support
execute-only pages, your executable will likely still function normally,
but the text segment will remain readable.
* `--exclude-libs`=_libraries_ ...:
Mark all symbols in the given _libraries_ hidden.
* `--export-dynamic-symbol`=_symbol_:
Put symbols matching _symbol_ in the dynamic symbol table. _symbol_ may be a
glob pattern in the same syntax as for the `--export-dynamic-symbol-list` or
`--version-script` options.
* `--export-dynamic-symbol-list`=_file_:
Read a list of dynamic symbols from _file_.
* `--fatal-warnings`, `--no-fatal-warnings`:
Treat warnings as errors.
* `--fini`=_symbol_:
Call _symbol_ at unload-time.
* `--gc-sections`, `--no-gc-sections`:
Remove unreferenced sections.
* `--gdb-index`:
Create a `.gdb_index` section to speed up GNU debugger. To use this, you
need to compile source files with the `-ggnu-pubnames` compiler flag.
* `--hash-style`=[ `sysv` | `gnu` | `both` | `none` ]:
Set hash style.
* `--icf`=[ `safe` | `all` | `none` ], `--no-icf`:
It is not uncommon for a program to contain many identical functions that
differ only in name. For example, a C++ template `std::vector` is very
likely to be instantiated to the identical code for `std::vector<int>` and
`std::vector<unsigned>` because the container cares only about the size of
the parameter type. Identical Code Folding (ICF) is a size optimization to
identify and merge such identical functions.
If `--icf=all` is given, `mold` tries to merge all identical functions. This
reduces the size of the output most, but it is not a "safe" optimization. It
is guaranteed in C and C++ that two pointers pointing two different
functions will never be equal, but `--icf=all` breaks that assumption as two
identical functions have the same address after merging. So a care must be
taken when you use this flag that your program does not depend on the
function pointer uniqueness.
`--icf=safe` is a flag to merge functions only when it is safe to do so.
That is, if a program does not take an address of a function, it is safe to
merge that function with other function, as you cannot compare a function
pointer with something else without taking an address of a function.
`--icf=safe` needs to be used with a compiler that supports `.llvm_addrsig`
section which contains the information as to what symbols are address-taken.
LLVM/Clang supports that section by default. Since GCC does not support it
yet, you cannot use `--icf=safe` with GCC (it doesn't do any harm but can't
optimize at all.)
`--icf=none` and `--no-icf` disables ICF.
* `--ignore-data-address-equality`:
Make ICF to merge not only functions but also data. This option should be
used in combination with `--icf=all`.
* `--image-base`=_addr_:
Set the base address to _addr_.
* `--init`=_symbol_:
Call _symbol_ at load-time.
* `--no-undefined`:
Report undefined symbols (even with `--shared`).
* `--noinhibit-exec`:
Create an output file even if errors occur.
* `--package-metadata`=_percent-encoded-string_:
Embed a specified string into the `.note.package` section. This option
is designed for build scripts that generate binary packages, such as
`.rpm` or `.deb`, to include package metadata in each executable. It
simplifies the process of identifying the corresponding package for a
given executable or core file.
An argument to this option is treated as percent-encoded and decoded
before being inserted into the section, allowing you to avoid the use of
the comma (`,`) character in the argument. This is useful because the
compiler replaces all occurrences of commas in `-Wl,` with spaces before
forwarding them to the linker. Note that `mold` always interprets the
argument as percent-encoded, so you also need to escape all occurrences
of `%` as `%25`.
* `--pack-dyn-relocs`=[ `relr` | `none` ]:
If `relr` is specified, all `R_*_RELATIVE` relocations are put into
`.relr.dyn` section instead of `.rel.dyn` or `.rela.dyn` section. Since
`.relr.dyn` section uses a space-efficient encoding scheme, specifying this
flag can reduce the size of the output. This is typically most effective for
position-independent executable.
Note that a runtime loader has to support `.relr.dyn` to run executables or
shared libraries linked with `--pack-dyn-relocs=relr`. As of 2022, only
ChromeOS, Android and Fuchsia support it.
* `--pie`, `--pic-executable`, `--no-pie`, `--no-pic-executable`:
Create a position-independent executable.
* `--print-gc-sections`, `--no-print-gc-sections`:
Print removed unreferenced sections.
* `--print-icf-sections`, `--no-print-icf-sections`:
Print folded identical sections.
* `--push-state`, `--pop-state`:
`--push-state` saves the current values of `--as-needed`, `--whole-archive`,
`--static`, and `--start-lib`. The saved values can be restored by
pop-state.
`--push-state` and `--pop-state` pairs can nest.
These options are useful when you want to construct linker command line
options programmatically. For example, if you want to link `libfoo.so` by
as-needed basis but don't want to change the global state of `--as-needed`,
you can append `--push-state --as-needed -lfoo --pop-state` to the linker
command line options.
* `--relax, --no-relax`:
Rewrite machine instructions with more efficient ones for some relocations.
The feature is enabled by default.
* `--require-defined`=_symbol_:
Like `--undefined`, except the new symbol must be defined by the end of the
link.
* `--retain-symbols-file`=_file_:
Keep only symbols listed in _file_. _file_ is a text file containing a
symbol name on each line. `mold` discards all local symbols as well as
global symbol that are not in _file_. Note that this option removes symbols
only from `.symtab` section and does not affect `.dynsym` section, which is
used for dynamic linking.
* `--rpath`=_dir_:
Add _dir_ to runtime search paths.
* `--section-start`=_section_=_address_:
Set _address_ to section. _address_ is a hexadecimal number that may start
with an optional `0x`.
* `--shared`, `--Bshareable`:
Create a share library.
* `--spare-dynamic-tags`=_number_:
Append the given number of `DT_NULL` entries to the end of the `.dynamic`
section, so that post-link processing tools can easily add new dynamic tags
by overwriting the null entries.
* `--start-lib`, `--end-lib`:
Handle object files between `--start-lib` and `--end-lib` as if they were in
an archive file. That means object files between them are linked only when
they are needed to resolve undefined symbols. The options are useful if you
want to link object files only when they are needed but want to avoid the
overhead of running ar(3).
* `--static`:
Do not link against shared libraries.
* `--sysroot`=_dir_:
Set target system root directory to _dir_.
* `--trace`:
Print name of each input file.
* `--undefined-glob`=_pattern_:
Synonym for `--undefined`, except that `--undefined-glob` takes a glob
pattern instead of just a single symbol name.
* `--undefined-version`, `--no-undefined-version`:
By default, `mold` warns on a symbol specified by a version script or by
`--export-dynamic-symbol` if it is not defined. You can silence the warning
by `--undefined-version`.
* `--unique`=_pattern_:
Don't merge input sections that match the given glob pattern _pattern_.
* `--unresolved-symbols`=[ `report-all` | `ignore-all` | `ignore-in-object-files` | `ignore-in-shared-libs` ]:
How to handle undefined symbols.
* `--version-script`=_file_:
Read version script from _file_. If _file_ does not exist in the current
directory, it is searched from library search paths for the sake of
compatibility with GNU ld.
* `--warn-common`, `--no-warn-common`:
Warn about common symbols.
* `--warn-once`:
Only warn once for each undefined symbol instead of warn for each relocation
referring an undefined symbol.
* `--warn-unresolved-symbols`, `--error-unresolved-symbols`:
Normally, the linker reports an error for unresolved symbols.
`--warn-unresolved-symbols` option turns it into a warning.
`--error-unresolved-symbols` option restores the default behavior.
* `--whole-archive`, `--no-whole-archive`:
When archive files (`.a` files) are given to the linker, only object files
that are needed to resolve undefined symbols are extracted from them and
linked to an output file. `--whole-archive` changes that behavior for
subsequent archives so that the linker extracts all object files and links
them to an output. For example, if you are creating a shared object file and
you want to include all archive members to the output, you should pass
`--whole-archive`. `--no-whole-archive` restores the default behavior for
subsequent archives.
* `--wrap`=_symbol_:
Make _symbol_ be resolved to `__wrap_`_symbol_. The original symbol can be
resolved as `__real_`_symbol_. This option is typically used for wrapping an
existing function.
* `-z cet-report`=[ `warning` | `error` | `none` ]:
Intel Control-flow Enforcement Technology (CET) is a new x86 feature
available since Tiger Lake which is released in 2020. It defines new
instructions to harden security to protect programs from control hijacking
attacks. You can tell the compiler to use the feature by specifying the
`-fcf-protection` flag.
`-z cet-report` flag is used to make sure that all object files were
compiled with a correct `-fcf-protection` flag. If `warning` or `error` are
given, `mold` prints out a warning or an error message if an object file was
not compiled with the compiler flag.
`mold` looks for `GNU_PROPERTY_X86_FEATURE_1_IBT` bit and
`GNU_PROPERTY_X86_FEATURE_1_SHSTK` bit in `.note.gnu.property` section to
determine whether or not an object file was compiled with `-fcf-protection`.
* `-z now`, `-z lazy`:
By default, functions referring to other ELF modules are resolved by the
dynamic linker when they are called for the first time. `-z now` marks an
executable or a shared library file so that all dynamic symbols are resolved
when a file is loaded to memory. `-z lazy` restores the default behavior.
* `-z origin`:
Mark object requiring immediate `$ORIGIN` processing at runtime.
* `-z ibt`:
Turn on `GNU_PROPERTY_X86_FEATURE_1_IBT` bit in `.note.gnu.property` section
to indicate that the output uses IBT-enabled PLT. This option implies `-z
ibtplt`.
* `-z ibtplt`:
Generate Intel Branch Tracking (IBT)-enabled PLT which is the default on
x86-64. This is the default.
* `-z execstack`, `-z noexecstack`:
By default, the pages for the stack area (i.e. the pages where local
variables reside) are not executable for security reasons. `-z execstack`
makes it executable. `-z noexecstack` restores the default behavior.
* `-z keep-text-section-prefix`, `-z nokeep-text-section-prefix`:
Keep `.text.hot`, `.text.unknown`, `.text.unlikely`, `.text.startup`, and
`.text.exit` as separate sections in the final binary instead of merging
them as `.text`.
* `-z rodynamic`:
Make the `.dynamic` section read-only.
* `-z relro`, `-z norelro`:
Some sections such as `.dynamic` have to be writable only during a module is
being loaded to memory. Once the dynamic linker finishes its job, such
sections won't be mutated by anyone. As a security mitigation, it is
preferred to make such segments read-only during program execution.
`-z relro` puts such sections into a special segment called `relro`. The
dynamic linker makes a relro segment read-only after it finishes its job.
By default, `mold` generates a relro segment. `-z norelro` disables the
feature.
* `-z sectionheader`, `-z nosectionheader`:
`-z nosectionheader` tell the linker to omit the section header.
By default, the linker does not omit the section header.
* `-z separate-loadable-segments`, `-z separate-code`, `-z noseparate-code`:
If one memory page contains multiple segments, the page protection bits are
set in such a way that the needed attributes (writable or executable) are
satisfied for all segments. This usually happens at a boundary of two
segments with two different attributes.
`separate-loadable-segments` adds paddings between segments with different
attributes so that they do not share the same page.
`separate-code` adds paddings only between executable and non-executable
segments. This is the default.
`noseparate-code` does not add any paddings between segments.
* `-z defs`, `-z nodefs`:
Report undefined symbols (even with `--shared`).
* `-z shstk`:
Enforce shadow stack by turning `GNU_PROPERTY_X86_FEATURE_1_SHSTK` bit in
`.note.gnu.property` output section. Shadow stack is part of Intel
Control-flow Enforcement Technology (CET), which is available since Tiger
Lake (2020).
* `-z start_stop_visibility`=[ `hidden` | `protected` ]:
If a section name is valid as a C identifier (i.e., it matches
`/^[_a-zA-Z][_a-zA-Z0-9]*$/`), mold creates `__start_SECNAME` and
`__stop_SECNAME` symbols to mark the beginning and end of the section,
where `SECNAME` is the section name.
You can make these marker symbols visible from other ELF modules by passing
`-z start_stop_visibility=protected`. Default is `hidden`.
* `-z text`, `-z notext`, `-z textoff`:
`mold` by default reports an error if dynamic relocations are created in
read-only sections. If `-z notext` or `-z textoff` are given, `mold` creates
such dynamic relocations without reporting an error. `-z text` restores the
default behavior.
* `-z max-page-size`=_number_:
Some CPU ISAs support multiple memory page sizes. This option specifies the
maximum page size that an output binary can run on. In general, binaries
built for a larger page size can run on a system with a smaller page size,
but not vice versa. The default value is 4 KiB for i386, x86-64, and RISC-V,
and 64 KiB for ARM64.
* `-z nodefaultlib`:
Make the dynamic loader ignore default search paths.
* `-z nodelete`:
Mark DSO non-deletable at runtime.
* `-z nodlopen`:
Mark DSO not available to dlopen(3). This option makes it possible for the
linker to optimize thread-local variable accesses by rewriting instructions
for some targets.
* `-z nodump`:
Mark DSO not available to dldump(3).
* `-z nocopyreloc`:
Do not create copy relocations.
* `-z initfirst`:
Mark DSO to be initialized first at runtime.
* `-z interpose`:
Mark object to interpose all DSOs but executable.
* `-(`, `-)`, `-EL`, `-O`_number_, `--dc`, `--dp`, `--end-group`, `--no-add-needed`, `--no-copy-dt-needed-entries`, `--nostdlib`, `--rpath-link=Ar dir`, `--sort-common`, `--sort-section`, `--start-group`, `--warn-constructors`, `--warn-once`, `--fix-cortex-a53-835769`, `--fix-cortex-a53-843419`, `-z combreloc`, `-z common-page-size`, `-z nocombreloc`:
Ignored
## ENVIRONMENT VARIABLES
* `MOLD_JOBS`:
If this variable is set to `1`, only one `mold` process will run at a time.
If a new mold process is initiated while another is already active, the new
process will wait until the active one completes before starting.
The primary reason for this environment variable is to minimize peak memory
usage. Since mold is designed to operate with high parallelism, running
multiple mold instances simultaneously may not be beneficial. If you execute
N instances of mold concurrently, it could require N times the time and N
times the memory. On the other hand, running them one after the other might
still take N times longer, but the peak memory usage would be the same as
running just a single instance.
If your build system invokes multiple linker processes simultaneously and
some of them often get killed due to out-of-memory errors, you might
consider setting this environment variable to `1` to see if it addresses the
OOM issue.
Currently, any value other than `1` is silently ignored.
* `MOLD_DEBUG`:
If this variable is set to a non-empty string, `mold` embeds its
command-line options in the output file's `.comment` section.
* `MOLD_REPRO`:
Setting this variable to a non-empty string has the same effect as passing
the `--repro` option.
## SEE ALSO
gold(1), ld(1), elf(5), ld.so(8)
## AUTHOR
Rui Ueyama <ruiu@cs.stanford.edu>
## BUGS
Report bugs to <https://github.com/rui314/mold/issues>.
================================================
FILE: install-build-deps.sh
================================================
#!/bin/sh
# This script installs binary packages needed to build mold.
# Feel free to send me a PR if your OS is not on this list.
set -e
. /etc/os-release
set -x
case "$ID" in
ubuntu | pop | linuxmint | debian | raspbian | neon | zorin)
apt-get update
apt-get install -y cmake gcc g++ clang gdb
;;
fedora | fedora-* | amzn | rhel | centos)
dnf install -y gcc-c++ cmake glibc-static libstdc++-static diffutils util-linux tar
;;
rocky | ol)
dnf install -y gcc-c++ cmake diffutils util-linux
;;
opensuse-*)
zypper install -y make cmake gcc-c++ glibc-devel-static tar diffutils util-linux
;;
gentoo)
emerge-webrsync
FEATURES='getbinpkg binpkg-request-signature' emerge dev-build/cmake
;;
arch | archarm | artix | endeavouros | manjaro | cachyos)
pacman -Sy --needed --noconfirm base-devel cmake util-linux
;;
void)
xbps-install -Sy xbps bash make cmake gcc tar diffutils util-linux
;;
alpine)
apk update
apk add bash make linux-headers cmake gcc g++
;;
clear-linux-os)
swupd update
swupd bundle-add c-basic diffutils
;;
almalinux)
dnf install -y gcc-toolset-13-gcc-c++ gcc-toolset-13-libstdc++-devel cmake diffutils
;;
altlinux)
apt-get update
apt-get install -y gcc-c++ make cmake ctest diffutils util-linux
;;
freebsd)
pkg update
pkg install -y cmake bash binutils gcc
;;
*)
echo "Error: don't know anything about build dependencies on $ID-$VERSION_ID"
exit 1
esac
================================================
FILE: install-cross-tools.sh
================================================
#!/bin/bash
set -e
. /etc/os-release
set -x
# This script install packages for -DMOLD_ENABLE_QEMU_TESTS=1
# to enable cross-target tests.
#
# Feel free to send me a PR if your OS is not on this list.
case "$ID" in
ubuntu | pop | linuxmint | debian | raspbian)
apt-get install -y qemu-user {gcc,g++}-{i686,aarch64,riscv64,powerpc,powerpc64,powerpc64le,s390x,sparc64,m68k,sh4}-linux-gnu {gcc,g++}-arm-linux-gnueabihf
;;
*)
echo "Error: don't know anything about build dependencies on $ID-$VERSION_ID"
exit 1
esac
================================================
FILE: lib/aho-corasick.cc
================================================
// This file implements the Aho-Corasick algorithm to search multiple
// strings within an input string simultaneously. It is essentially a
// trie with additional links. For details, see
// https://en.wikipedia.org/wiki/Aho-Corasick_algorithm.
//
// We use it for simple glob patterns in version scripts or dynamic
// list files. Here are some examples of glob patterns:
//
// qt_private_api_tag*
// *16QAccessibleCache*
// *32QAbstractFileIconProviderPrivate*
// *17QPixmapIconEngine*
//
// Aho-Corasick can do only substring search, so it cannot handle
// complex glob patterns such as `*foo*bar*`. We handle such patterns
// with the Glob class.
#include "lib.h"
#include <queue>
namespace mold {
bool AhoCorasick::can_handle(std::string_view pat) {
if (pat.starts_with('*'))
pat.remove_prefix(1);
if (pat.ends_with('*'))
pat.remove_suffix(1);
return pat.find_first_of("*?[") == pat.npos;
}
i64 AhoCorasick::find(std::string_view str) {
if (nodes.empty())
return -1;
i64 idx = 0;
i64 val = -1;
auto walk = [&](u8 c) {
for (i64 j = idx; j != -1; j = nodes[j].suffix_link) {
i64 child = nodes[j].children[c];
if (child != -1) {
idx = child;
val = std::max(val, nodes[child].value);
return;
}
}
idx = 0;
};
walk('\0');
for (u8 c : str)
walk(c);
walk('\0');
return val;
}
bool AhoCorasick::add(std::string_view pat, i64 val) {
assert(can_handle(pat));
if (nodes.empty())
nodes.resize(1);
i64 idx = 0;
auto walk = [&](u8 c) {
if (nodes[idx].children[c] == -1) {
nodes[idx].children[c] = nodes.size();
nodes.resize(nodes.size() + 1);
}
idx = nodes[idx].children[c];
};
// We handle "foo" as if "\0foo\0", "*foo" as if "foo\0", "foo*" as
// if "\0foo", and "*foo*" as if "foo". Aho-Corasick can do only
// substring matching, so we use \0 as a beginning/end-of-string
// markers.
if (!pat.starts_with('*'))
walk('\0');
for (u8 c : pat)
if (c != '*')
walk(c);
if (!pat.ends_with('*'))
walk('\0');
nodes[idx].value = std::max(nodes[idx].value, val);
return true;
}
void AhoCorasick::compile() {
if (nodes.empty())
return;
fix_suffix_links(0);
fix_values();
}
void AhoCorasick::fix_suffix_links(i64 idx) {
for (i64 i = 0; i < 256; i++) {
i64 child = nodes[idx].children[i];
if (child == -1)
continue;
i64 j = nodes[idx].suffix_link;
for (; j != -1; j = nodes[j].suffix_link) {
if (nodes[j].children[i] != -1) {
nodes[child].suffix_link = j;
break;
}
}
if (j == -1)
nodes[child].suffix_link = 0;
fix_suffix_links(child);
}
}
void AhoCorasick::fix_values() {
std::queue<i64> queue;
queue.push(0);
do {
i64 idx = queue.front();
queue.pop();
for (i64 child : nodes[idx].children) {
if (child != -1) {
i64 suffix = nodes[child].suffix_link;
nodes[child].value = std::max(nodes[child].value, nodes[suffix].value);
queue.push(child);
}
}
} while (!queue.empty());
}
} // namespace mold
================================================
FILE: lib/atomics.h
================================================
// This is the same as std::atomic except that the default memory
// order is relaxed instead of sequential consistency.
#pragma once
#include <atomic>
namespace mold {
template <typename T>
struct Atomic : std::atomic<T> {
static constexpr std::memory_order relaxed = std::memory_order_relaxed;
using std::atomic<T>::atomic;
Atomic(const Atomic<T> &other) : std::atomic<T>(other.load()) {}
Atomic<T> &operator=(const Atomic<T> &other) {
store(other.load());
return *this;
}
void operator=(T val) { store(val); }
operator T() const { return load(); }
void store(T val, std::memory_order order = relaxed) {
std::atomic<T>::store(val, order);
}
T load(std::memory_order order = relaxed) const {
return std::atomic<T>::load(order);
}
T exchange(T val) { return std::atomic<T>::exchange(val, relaxed); }
T operator|=(T val) { return std::atomic<T>::fetch_or(val, relaxed); }
T operator++() { return std::atomic<T>::fetch_add(1, relaxed) + 1; }
T operator--() { return std::atomic<T>::fetch_sub(1, relaxed) - 1; }
T operator++(int) { return std::atomic<T>::fetch_add(1, relaxed); }
T operator--(int) { return std::atomic<T>::fetch_sub(1, relaxed); }
bool test_and_set() {
// A relaxed load + branch (assuming miss) takes only around 20 cycles,
// while an atomic RMW can easily take hundreds on x86. We note that it's
// common that another thread beat us in marking, so doing an optimistic
// early test tends to improve performance in the ~20% ballpark.
return load() || exchange(true);
}
};
} // namespace mold
================================================
FILE: lib/bitvector.h
================================================
#pragma once
#include "integers.h"
#include <cassert>
#include <vector>
namespace mold {
class BitvectorProxy {
public:
BitvectorProxy(u64 &word, size_t pos)
: word(word), mask(1
gitextract_f0ho13on/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── build-all.yml
│ ├── build-native.yml
│ ├── ci.yml
│ ├── install-extras.sh
│ ├── release-assets.yml
│ ├── run-msan.sh
│ └── update-manpage.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── dist.sh
├── docs/
│ ├── bugs.md
│ ├── coding-guidelines.md
│ ├── design.md
│ ├── execstack.md
│ ├── glossary.md
│ ├── memory-sanitizer.md
│ ├── mold.1
│ └── mold.md
├── install-build-deps.sh
├── install-cross-tools.sh
├── lib/
│ ├── aho-corasick.cc
│ ├── atomics.h
│ ├── bitvector.h
│ ├── compress.cc
│ ├── config.h.in
│ ├── crc32.cc
│ ├── demangle.cc
│ ├── filepath.cc
│ ├── gentoo-test.sh
│ ├── glob.cc
│ ├── hyperloglog.cc
│ ├── integers.h
│ ├── lib.h
│ ├── perf.cc
│ ├── random.cc
│ ├── siphash.h
│ ├── tar.cc
│ └── update-git-hash.cmake
├── src/
│ ├── arch-arm32.cc
│ ├── arch-arm64.cc
│ ├── arch-i386.cc
│ ├── arch-loongarch.cc
│ ├── arch-m68k.cc
│ ├── arch-ppc32.cc
│ ├── arch-ppc64v1.cc
│ ├── arch-ppc64v2.cc
│ ├── arch-riscv.cc
│ ├── arch-s390x.cc
│ ├── arch-sh4.cc
│ ├── arch-sparc64.cc
│ ├── arch-x86-64.cc
│ ├── archive-file.cc
│ ├── cmdline.cc
│ ├── elf.cc
│ ├── elf.h
│ ├── entry.cc
│ ├── error.cc
│ ├── filetype.cc
│ ├── gc-sections.cc
│ ├── gdb-index.cc
│ ├── icf.cc
│ ├── input-files.cc
│ ├── input-sections.cc
│ ├── jobs-unix.cc
│ ├── jobs-win32.cc
│ ├── linker-script.cc
│ ├── lto-unix.cc
│ ├── lto-win32.cc
│ ├── lto.h
│ ├── main.cc
│ ├── mapfile.cc
│ ├── mapped-file-unix.cc
│ ├── mapped-file-win32.cc
│ ├── mold-wrapper.c
│ ├── mold.h
│ ├── output-chunks.cc
│ ├── output-file-unix.cc
│ ├── output-file-win32.cc
│ ├── passes.cc
│ ├── relocatable.cc
│ ├── shrink-sections.cc
│ ├── signal-unix.cc
│ ├── signal-win32.cc
│ ├── subprocess-unix.cc
│ ├── subprocess-win32.cc
│ ├── thunks.cc
│ └── tls.cc
├── test/
│ ├── CMakeLists.txt
│ ├── abs-error.sh
│ ├── absolute-symbols.sh
│ ├── allow-multiple-definition.sh
│ ├── ar-alignment.sh
│ ├── arch-aarch64-long-thunk.sh
│ ├── arch-aarch64-range-extension-thunk-disassembly.sh
│ ├── arch-aarch64-variant-pcs.sh
│ ├── arch-arm-abs-error.sh
│ ├── arch-arm-exidx-sentinel.sh
│ ├── arch-arm-range-extension-thunk-disassembly.sh
│ ├── arch-arm-range-extension-thunk.sh
│ ├── arch-arm-target1.sh
│ ├── arch-arm-thm-jump19.sh
│ ├── arch-arm-thm-jump8.sh
│ ├── arch-arm-thumb-interwork.sh
│ ├── arch-arm-tlsdesc.sh
│ ├── arch-armeb-be32.sh
│ ├── arch-i686-tls-module-base.sh
│ ├── arch-i686-tlsdesc.sh
│ ├── arch-loongarch64-mcmodel-extreme.sh
│ ├── arch-loongarch64-relax-call36.sh
│ ├── arch-loongarch64-relax-got-load.sh
│ ├── arch-loongarch64-relax-pcala-addi.sh
│ ├── arch-loongarch64-relax-tlsdesc.sh
│ ├── arch-ppc64le-save-restore-gprs.sh
│ ├── arch-riscv64-attributes.sh
│ ├── arch-riscv64-attributes2.sh
│ ├── arch-riscv64-global-pointer-dso.sh
│ ├── arch-riscv64-global-pointer.sh
│ ├── arch-riscv64-obj-compatible.sh
│ ├── arch-riscv64-relax-align.sh
│ ├── arch-riscv64-relax-got.sh
│ ├── arch-riscv64-relax-hi20.sh
│ ├── arch-riscv64-relax-j.sh
│ ├── arch-riscv64-reloc-overflow.sh
│ ├── arch-riscv64-symbol-size.sh
│ ├── arch-riscv64-variant-cc.sh
│ ├── arch-riscv64-weak-undef.sh
│ ├── arch-s390x-got.sh
│ ├── arch-x86_64-address-equality.sh
│ ├── arch-x86_64-apx-gotpcrelx.sh
│ ├── arch-x86_64-apx-gottpoff.sh
│ ├── arch-x86_64-apx-gottpoff2.sh
│ ├── arch-x86_64-apx-tlsdesc.sh
│ ├── arch-x86_64-empty-arg.sh
│ ├── arch-x86_64-empty-mergeable-section.sh
│ ├── arch-x86_64-emulation-deduction.sh
│ ├── arch-x86_64-exception-mcmodel-large.sh
│ ├── arch-x86_64-execstack-if-needed.sh
│ ├── arch-x86_64-function-multiversion.sh
│ ├── arch-x86_64-gnu-linkonce.sh
│ ├── arch-x86_64-gnu-retain.sh
│ ├── arch-x86_64-gotpcrelx.sh
│ ├── arch-x86_64-ifunc-alias.sh
│ ├── arch-x86_64-ifunc-export.sh
│ ├── arch-x86_64-incompatible-libs-linker-script.sh
│ ├── arch-x86_64-incompatible-libs-linker-script2.sh
│ ├── arch-x86_64-incompatible-libs.sh
│ ├── arch-x86_64-incompatible-libs2.sh
│ ├── arch-x86_64-incompatible-obj.sh
│ ├── arch-x86_64-init-array-readonly.sh
│ ├── arch-x86_64-init-array.sh
│ ├── arch-x86_64-isa-level.sh
│ ├── arch-x86_64-large-bss.sh
│ ├── arch-x86_64-mergeable-records.sh
│ ├── arch-x86_64-mergeable-strings-nonalloc.sh
│ ├── arch-x86_64-mergeable-strings.sh
│ ├── arch-x86_64-note-property.sh
│ ├── arch-x86_64-note-property2.sh
│ ├── arch-x86_64-note.sh
│ ├── arch-x86_64-note2.sh
│ ├── arch-x86_64-plt.sh
│ ├── arch-x86_64-preinit-array.sh
│ ├── arch-x86_64-relax.sh
│ ├── arch-x86_64-reloc-overflow.sh
│ ├── arch-x86_64-reloc-zero.sh
│ ├── arch-x86_64-reloc.sh
│ ├── arch-x86_64-section-alignment.sh
│ ├── arch-x86_64-section-name.sh
│ ├── arch-x86_64-tbss-only.sh
│ ├── arch-x86_64-tls-gd-mcmodel-large.sh
│ ├── arch-x86_64-tls-gd-to-ie.sh
│ ├── arch-x86_64-tls-large-tbss.sh
│ ├── arch-x86_64-tls-ld-mcmodel-large.sh
│ ├── arch-x86_64-tls-module-base.sh
│ ├── arch-x86_64-tlsdesc.sh
│ ├── arch-x86_64-unique.sh
│ ├── arch-x86_64-warn-execstack.sh
│ ├── arch-x86_64-warn-shared-textrel.sh
│ ├── arch-x86_64-warn-textrel.sh
│ ├── arch-x86_64-z-dynamic-undefined-weak.sh
│ ├── arch-x86_64-z-ibt.sh
│ ├── arch-x86_64-z-ibtplt.sh
│ ├── arch-x86_64-z-rewrite-endbr.sh
│ ├── arch-x86_64-z-rewrite-endbr2.sh
│ ├── arch-x86_64-z-rewrite-endbr3.sh
│ ├── arch-x86_64-z-shstk.sh
│ ├── arch-x86_64-z-text.sh
│ ├── as-needed-dso.sh
│ ├── as-needed-dso2.sh
│ ├── as-needed-weak.sh
│ ├── as-needed.sh
│ ├── audit.sh
│ ├── auxiliary.sh
│ ├── bno-symbolic.sh
│ ├── bsymbolic-functions.sh
│ ├── bsymbolic-non-weak-functions.sh
│ ├── bsymbolic-non-weak.sh
│ ├── bsymbolic.sh
│ ├── build-id.sh
│ ├── canonical-plt.sh
│ ├── cmdline.sh
│ ├── color-diagnostics.sh
│ ├── comment.sh
│ ├── common-archive.sh
│ ├── common-ref.sh
│ ├── common-symbols.sh
│ ├── common.inc
│ ├── compress-debug-sections-zstd.sh
│ ├── compress-debug-sections.sh
│ ├── compressed-debug-info.sh
│ ├── copyrel-alignment.sh
│ ├── copyrel-norelro.sh
│ ├── copyrel-protected.sh
│ ├── copyrel-relro.sh
│ ├── copyrel-relro2.sh
│ ├── copyrel.sh
│ ├── crel.sh
│ ├── ctors-in-init-array.sh
│ ├── dead-debug-sections.sh
│ ├── debug-macro-section.sh
│ ├── default-symver-version-script.sh
│ ├── default-symver.sh
│ ├── defsym-lto.sh
│ ├── defsym-missing-symbol.sh
│ ├── defsym.sh
│ ├── defsym2.sh
│ ├── demangle-cpp.sh
│ ├── demangle-rust.sh
│ ├── demangle.sh
│ ├── depaudit.sh
│ ├── depaudit2.sh
│ ├── dependency-file-lto.sh
│ ├── dependency-file-response-file.sh
│ ├── dependency-file.sh
│ ├── disable-new-dtags.sh
│ ├── discard-section.sh
│ ├── discard.sh
│ ├── dso-undef.sh
│ ├── dt-init.sh
│ ├── dt-needed.sh
│ ├── duplicate-error-archive.sh
│ ├── duplicate-error-gc-sections.sh
│ ├── duplicate-error-lto.sh
│ ├── duplicate-error.sh
│ ├── dynamic-dt-debug.sh
│ ├── dynamic-linker.sh
│ ├── dynamic-list-data.sh
│ ├── dynamic-list.sh
│ ├── dynamic-list2.sh
│ ├── dynamic-list3.sh
│ ├── dynamic-list4.sh
│ ├── dynamic.sh
│ ├── emit-relocs-cpp.sh
│ ├── emit-relocs-dead-sections.sh
│ ├── emit-relocs.sh
│ ├── empty-dso.sh
│ ├── empty-file.sh
│ ├── empty-input.sh
│ ├── empty-version.sh
│ ├── entry.sh
│ ├── exception-multiple-ehframe.sh
│ ├── exception.sh
│ ├── exclude-libs.sh
│ ├── exclude-libs2.sh
│ ├── exclude-libs3.sh
│ ├── execstack.sh
│ ├── execute-only.sh
│ ├── export-dynamic.sh
│ ├── export-from-exe.sh
│ ├── fatal-warnings.sh
│ ├── filler.sh
│ ├── filter.sh
│ ├── func-addr.sh
│ ├── gc-sections.sh
│ ├── gdb-index-compress-output.sh
│ ├── gdb-index-dwarf2.sh
│ ├── gdb-index-dwarf3.sh
│ ├── gdb-index-dwarf4.sh
│ ├── gdb-index-dwarf5.sh
│ ├── gdb-index-dwarf64.sh
│ ├── gdb-index-empty.sh
│ ├── gdb-index-split-dwarf.sh
│ ├── glibc-2.22-bug.sh
│ ├── global-offset-table.sh
│ ├── gnu-hash.sh
│ ├── gnu-property.sh
│ ├── gnu-retain.sh
│ ├── gnu-unique.sh
│ ├── gnu-warning.sh
│ ├── hash-style-sysv.sh
│ ├── hash-style.sh
│ ├── hello-dynamic.sh
│ ├── hello-static.sh
│ ├── help.sh
│ ├── hidden-archive.sh
│ ├── hidden-undef.sh
│ ├── hidden-weak-undef.sh
│ ├── icf-gcc-except-table.sh
│ ├── icf-safe.sh
│ ├── icf-small.sh
│ ├── icf.sh
│ ├── ifunc-address-equality-exported.sh
│ ├── ifunc-address-equality.sh
│ ├── ifunc-alias.sh
│ ├── ifunc-dlopen.sh
│ ├── ifunc-dso.sh
│ ├── ifunc-dynamic.sh
│ ├── ifunc-export.sh
│ ├── ifunc-funcptr.sh
│ ├── ifunc-noplt.sh
│ ├── ifunc-static-pie.sh
│ ├── ifunc-static.sh
│ ├── image-base.sh
│ ├── init-array-priorities.sh
│ ├── init-in-dso.sh
│ ├── init.sh
│ ├── initfirst.sh
│ ├── interpose.sh
│ ├── invalid-version-script.sh
│ ├── issue646.sh
│ ├── large-alignment-dso.sh
│ ├── large-alignment.sh
│ ├── large-max-page-size-strip.sh
│ ├── large-max-page-size.sh
│ ├── large-text.sh
│ ├── library.sh
│ ├── link-order.sh
│ ├── linker-script-defsym.sh
│ ├── linker-script-error.sh
│ ├── linker-script-relocatable.sh
│ ├── linker-script.sh
│ ├── linker-script2.sh
│ ├── linker-script3.sh
│ ├── linker-script4.sh
│ ├── linker-script5.sh
│ ├── linker-script6.sh
│ ├── lto-archive.sh
│ ├── lto-archive2.sh
│ ├── lto-archive3.sh
│ ├── lto-comdat.sh
│ ├── lto-dso.sh
│ ├── lto-gcc.sh
│ ├── lto-llvm.sh
│ ├── lto-llvm2.sh
│ ├── lto-no-plugin.sh
│ ├── lto-nostdlib.sh
│ ├── lto-version-script.sh
│ ├── main-in-dso.sh
│ ├── many-input-sections.sh
│ ├── many-input-sections2.sh
│ ├── many-output-sections.sh
│ ├── mcmodel-large.sh
│ ├── mergeable-strings.sh
│ ├── missing-but-ok.sh
│ ├── missing-error.sh
│ ├── mold-wrapper.sh
│ ├── mold-wrapper2.sh
│ ├── nmagic.sh
│ ├── no-allow-shlib-undefined-circular.sh
│ ├── no-allow-shlib-undefined.sh
│ ├── no-allow-shlib-undefined2.sh
│ ├── no-allow-shlib-undefined3.sh
│ ├── no-allow-shlib-undefined4.sh
│ ├── no-eh-frame-header.sh
│ ├── no-object-file.sh
│ ├── no-quick-exit.sh
│ ├── no-undefined-version.sh
│ ├── nocopyreloc.sh
│ ├── noinhibit-exec.sh
│ ├── non-canonical-plt.sh
│ ├── nostdlib.sh
│ ├── oformat-binary.sh
│ ├── omagic.sh
│ ├── package-metadata.sh
│ ├── physical-image-base.sh
│ ├── pie.sh
│ ├── plt-dso.sh
│ ├── plt-symbols.sh
│ ├── pltgot.sh
│ ├── preinit-array.sh
│ ├── print-dependencies.sh
│ ├── protected-dynsym.sh
│ ├── protected.sh
│ ├── push-pop-state.sh
│ ├── range-extension-thunk.sh
│ ├── range-extension-thunk2.sh
│ ├── range-extension-thunk3.sh
│ ├── range-extension-thunk4.sh
│ ├── relax-got-load.sh
│ ├── reloc-rodata.sh
│ ├── relocatable-archive.sh
│ ├── relocatable-c++.sh
│ ├── relocatable-compressed-debug-info.sh
│ ├── relocatable-debug-info.sh
│ ├── relocatable-exception.sh
│ ├── relocatable-many-sections.sh
│ ├── relocatable-merge-sections.sh
│ ├── relocatable-mergeable-sections.sh
│ ├── relocatable.sh
│ ├── relro-alignment.sh
│ ├── relro.sh
│ ├── repro.sh
│ ├── require-defined.sh
│ ├── response-file-quoting.sh
│ ├── response-file.sh
│ ├── response-file2.sh
│ ├── retain-symbols-file.sh
│ ├── reverse-sections.sh
│ ├── rodata-name.sh
│ ├── rosegment.sh
│ ├── rpath.sh
│ ├── run-clang.sh
│ ├── run.sh
│ ├── section-align.sh
│ ├── section-attributes.sh
│ ├── section-order.sh
│ ├── section-start.sh
│ ├── separate-debug-file-sort.sh
│ ├── separate-debug-file.sh
│ ├── shared-abs-sym.sh
│ ├── shared.sh
│ ├── shuffle-sections-seed.sh
│ ├── shuffle-sections.sh
│ ├── soname.sh
│ ├── sort-debug-info-compressed.sh
│ ├── sort-debug-info-merged.sh
│ ├── sort-debug-info.sh
│ ├── spare-program-headers.sh
│ ├── start-lib.sh
│ ├── start-stop-symbol.sh
│ ├── start-stop.sh
│ ├── static-archive.sh
│ ├── static-pie.sh
│ ├── stdout.sh
│ ├── strip-debug.sh
│ ├── strip.sh
│ ├── stt-common.sh
│ ├── symbol-rank.sh
│ ├── symbol-version-as-needed.sh
│ ├── symbol-version-lto.sh
│ ├── symbol-version-multi.sh
│ ├── symbol-version.sh
│ ├── symbol-version2.sh
│ ├── symbol-version3.sh
│ ├── symbol-version4.sh
│ ├── symbol-version5.sh
│ ├── symtab-dso.sh
│ ├── symtab-section-symbols.sh
│ ├── symtab.sh
│ ├── synthetic-symbols.sh
│ ├── sysroot-linker-script.sh
│ ├── sysroot.sh
│ ├── sysroot2.sh
│ ├── tail-call.sh
│ ├── tbss-only.sh
│ ├── textrel.sh
│ ├── textrel2.sh
│ ├── thin-archive.sh
│ ├── thread-count.sh
│ ├── tls-alignment-multi.sh
│ ├── tls-common.sh
│ ├── tls-df-static-tls.sh
│ ├── tls-dso.sh
│ ├── tls-gd-dlopen.sh
│ ├── tls-gd-noplt.sh
│ ├── tls-gd-to-ie.sh
│ ├── tls-gd.sh
│ ├── tls-ie.sh
│ ├── tls-irregular-start-addr.sh
│ ├── tls-large-alignment.sh
│ ├── tls-large-static-image.sh
│ ├── tls-ld-noplt.sh
│ ├── tls-ld.sh
│ ├── tls-le-error.sh
│ ├── tls-le.sh
│ ├── tls-nopic.sh
│ ├── tls-pic.sh
│ ├── tls-small-alignment.sh
│ ├── tlsdesc-dlopen.sh
│ ├── tlsdesc-import.sh
│ ├── tlsdesc-initial-exec.sh
│ ├── tlsdesc-local-dynamic.sh
│ ├── tlsdesc-static.sh
│ ├── tlsdesc.sh
│ ├── trace-symbol-symver.sh
│ ├── trace-symbol.sh
│ ├── trace.sh
│ ├── undefined-glob-gc-sections.sh
│ ├── undefined-glob.sh
│ ├── undefined.sh
│ ├── undefined2.sh
│ ├── unknown-section-type.sh
│ ├── unresolved-symbols.sh
│ ├── unresolved-symbols2.sh
│ ├── verbose.sh
│ ├── version-script-search-paths.sh
│ ├── version-script.sh
│ ├── version-script10.sh
│ ├── version-script11.sh
│ ├── version-script12.sh
│ ├── version-script13.sh
│ ├── version-script14.sh
│ ├── version-script15.sh
│ ├── version-script16.sh
│ ├── version-script17.sh
│ ├── version-script18.sh
│ ├── version-script19.sh
│ ├── version-script2.sh
│ ├── version-script20.sh
│ ├── version-script21.sh
│ ├── version-script22.sh
│ ├── version-script23.sh
│ ├── version-script3.sh
│ ├── version-script4.sh
│ ├── version-script5.sh
│ ├── version-script6.sh
│ ├── version-script7.sh
│ ├── version-script8.sh
│ ├── version-script9.sh
│ ├── version.sh
│ ├── versioned-undef.sh
│ ├── visibility.sh
│ ├── warn-common.sh
│ ├── warn-once.sh
│ ├── warn-symbol-type.sh
│ ├── warn-unresolved-symbols.sh
│ ├── weak-export-dso.sh
│ ├── weak-export-dso2.sh
│ ├── weak-export-exe.sh
│ ├── weak-undef-dso.sh
│ ├── weak-undef.sh
│ ├── weak-undef2.sh
│ ├── weak-undef4.sh
│ ├── weak-undef5.sh
│ ├── whole-archive.sh
│ ├── wrap-lto.sh
│ ├── wrap.sh
│ ├── z-cet-report.sh
│ ├── z-defs.sh
│ ├── z-dynamic-undefined-weak-exe.sh
│ ├── z-dynamic-undefined-weak.sh
│ ├── z-dynamic-undefined-weak2.sh
│ ├── z-max-page-size.sh
│ ├── z-nodefaultlib.sh
│ ├── z-nodump.sh
│ ├── z-now.sh
│ ├── z-origin.sh
│ ├── z-pack-relative-relocs.sh
│ ├── z-rodynamic.sh
│ ├── z-sectionheader.sh
│ ├── z-separate-code.sh
│ ├── z-stack-size.sh
│ ├── z-start-stop-visibility.sh
│ └── zero-to-bss.sh
└── third-party/
├── blake3/
│ ├── .cargo/
│ │ └── config.toml
│ ├── .git-blame-ignore-revs
│ ├── .github/
│ │ └── workflows/
│ │ ├── build_b3sum.py
│ │ ├── ci.yml
│ │ ├── tag.yml
│ │ └── upload_github_release_asset.py
│ ├── .gitignore
│ ├── CONTRIBUTING.md
│ ├── Cargo.toml
│ ├── LICENSE_A2
│ ├── LICENSE_A2LLVM
│ ├── LICENSE_CC0
│ ├── README.md
│ ├── b3sum/
│ │ ├── .gitignore
│ │ ├── Cargo.lock
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── main.rs
│ │ │ └── unit_tests.rs
│ │ ├── tests/
│ │ │ └── cli_tests.rs
│ │ └── what_does_check_do.md
│ ├── benches/
│ │ └── bench.rs
│ ├── build.rs
│ ├── reference_impl/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── reference_impl.rs
│ ├── src/
│ │ ├── ffi_avx2.rs
│ │ ├── ffi_avx512.rs
│ │ ├── ffi_neon.rs
│ │ ├── ffi_sse2.rs
│ │ ├── ffi_sse41.rs
│ │ ├── guts.rs
│ │ ├── hazmat.rs
│ │ ├── io.rs
│ │ ├── join.rs
│ │ ├── lib.rs
│ │ ├── platform.rs
│ │ ├── portable.rs
│ │ ├── rust_avx2.rs
│ │ ├── rust_sse2.rs
│ │ ├── rust_sse41.rs
│ │ ├── test.rs
│ │ ├── traits.rs
│ │ └── wasm32_simd.rs
│ ├── test_vectors/
│ │ ├── Cargo.toml
│ │ ├── cross_test.sh
│ │ ├── src/
│ │ │ ├── bin/
│ │ │ │ └── generate.rs
│ │ │ └── lib.rs
│ │ └── test_vectors.json
│ └── tools/
│ ├── compiler_version/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── main.rs
│ ├── instruction_set_support/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── release.md
├── mimalloc/
│ ├── .gitattributes
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── SECURITY.md
│ ├── azure-pipelines.yml
│ ├── bin/
│ │ ├── mimalloc-redirect-arm64.lib
│ │ ├── mimalloc-redirect-arm64ec.lib
│ │ ├── mimalloc-redirect.lib
│ │ ├── mimalloc-redirect32.lib
│ │ └── readme.md
│ ├── cmake/
│ │ ├── JoinPaths.cmake
│ │ ├── mimalloc-config-version.cmake
│ │ └── mimalloc-config.cmake
│ ├── contrib/
│ │ ├── docker/
│ │ │ ├── alpine/
│ │ │ │ └── Dockerfile
│ │ │ ├── alpine-arm32v7/
│ │ │ │ └── Dockerfile
│ │ │ ├── manylinux-x64/
│ │ │ │ └── Dockerfile
│ │ │ └── readme.md
│ │ └── vcpkg/
│ │ ├── portfile.cmake
│ │ ├── readme.md
│ │ ├── usage
│ │ ├── vcpkg-cmake-wrapper.cmake
│ │ └── vcpkg.json
│ ├── doc/
│ │ ├── doxyfile
│ │ ├── mimalloc-doc.h
│ │ └── mimalloc-doxygen.css
│ ├── ide/
│ │ └── vs2022/
│ │ ├── mimalloc-lib.vcxproj
│ │ ├── mimalloc-lib.vcxproj.filters
│ │ ├── mimalloc-override-dll.vcxproj
│ │ ├── mimalloc-override-dll.vcxproj.filters
│ │ ├── mimalloc-override-test-dep.vcxproj
│ │ ├── mimalloc-override-test.vcxproj
│ │ ├── mimalloc-test-api.vcxproj
│ │ ├── mimalloc-test-stress.vcxproj
│ │ ├── mimalloc-test.vcxproj
│ │ └── mimalloc.sln
│ ├── include/
│ │ ├── mimalloc/
│ │ │ ├── atomic.h
│ │ │ ├── internal.h
│ │ │ ├── prim.h
│ │ │ ├── track.h
│ │ │ └── types.h
│ │ ├── mimalloc-new-delete.h
│ │ ├── mimalloc-override.h
│ │ ├── mimalloc-stats.h
│ │ └── mimalloc.h
│ ├── mimalloc.pc.in
│ ├── readme.md
│ ├── src/
│ │ ├── alloc-aligned.c
│ │ ├── alloc-override.c
│ │ ├── alloc-posix.c
│ │ ├── alloc.c
│ │ ├── arena-abandon.c
│ │ ├── arena.c
│ │ ├── bitmap.c
│ │ ├── bitmap.h
│ │ ├── free.c
│ │ ├── heap.c
│ │ ├── init.c
│ │ ├── libc.c
│ │ ├── options.c
│ │ ├── os.c
│ │ ├── page-queue.c
│ │ ├── page.c
│ │ ├── prim/
│ │ │ ├── emscripten/
│ │ │ │ └── prim.c
│ │ │ ├── osx/
│ │ │ │ ├── alloc-override-zone.c
│ │ │ │ └── prim.c
│ │ │ ├── prim.c
│ │ │ ├── readme.md
│ │ │ ├── unix/
│ │ │ │ └── prim.c
│ │ │ ├── wasi/
│ │ │ │ └── prim.c
│ │ │ └── windows/
│ │ │ ├── etw-mimalloc.wprp
│ │ │ ├── etw.h
│ │ │ ├── etw.man
│ │ │ ├── prim.c
│ │ │ └── readme.md
│ │ ├── random.c
│ │ ├── segment-map.c
│ │ ├── segment.c
│ │ ├── static.c
│ │ └── stats.c
│ └── test/
│ ├── CMakeLists.txt
│ ├── main-override-dep.cpp
│ ├── main-override-dep.h
│ ├── main-override-static.c
│ ├── main-override.c
│ ├── main-override.cpp
│ ├── main.c
│ ├── readme.md
│ ├── test-api-fill.c
│ ├── test-api.c
│ ├── test-stress.c
│ ├── test-wrong.c
│ └── testhelper.h
├── rust-demangle/
│ ├── .clang-format
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── LICENSE-APACHE
│ ├── LICENSE-MIT
│ ├── README.md
│ ├── rust-demangle.c
│ ├── rust-demangle.h
│ └── test-harness/
│ ├── Cargo.toml
│ ├── build.rs
│ ├── examples/
│ │ └── check-csv-dataset.rs
│ ├── src/
│ │ └── lib.rs
│ └── tests/
│ ├── legacy.rs
│ ├── top_level.rs
│ └── v0.rs
├── tbb/
│ ├── .bazelrc
│ ├── .bazelversion
│ ├── .gitattributes
│ ├── .github/
│ │ ├── CODEOWNERS
│ │ ├── ISSUE_TEMPLATE/
│ │ │ ├── 1_question.md
│ │ │ ├── 2_bug_report.md
│ │ │ ├── 3_feature_request.md
│ │ │ └── 4_documentation.md
│ │ ├── dependabot.yml
│ │ ├── issue_labeler.yml
│ │ ├── labeler.yml
│ │ ├── pull_request_template.md
│ │ ├── scripts/
│ │ │ └── codespell.sh
│ │ └── workflows/
│ │ ├── ci.yml
│ │ ├── codeql.yml
│ │ ├── coverity.yml
│ │ ├── issue_labeler.yml
│ │ ├── labeler.yml
│ │ └── ossf-scorecard.yml
│ ├── .gitignore
│ ├── BUILD.bazel
│ ├── Bazel.md
│ ├── CMakeLists.txt
│ ├── CODEOWNERS
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── INSTALL.md
│ ├── LICENSE.txt
│ ├── MAINTAINERS.md
│ ├── MODULE.bazel
│ ├── README.md
│ ├── RELEASE_NOTES.md
│ ├── SECURITY.md
│ ├── SUPPORT.md
│ ├── SYSTEM_REQUIREMENTS.md
│ ├── WASM_Support.md
│ ├── WORKSPACE.bazel
│ ├── cmake/
│ │ ├── README.md
│ │ ├── android/
│ │ │ ├── device_environment_cleanup.cmake
│ │ │ ├── environment.cmake
│ │ │ └── test_launcher.cmake
│ │ ├── compilers/
│ │ │ ├── AppleClang.cmake
│ │ │ ├── Clang.cmake
│ │ │ ├── GNU.cmake
│ │ │ ├── Intel.cmake
│ │ │ ├── IntelLLVM.cmake
│ │ │ ├── MSVC.cmake
│ │ │ └── QCC.cmake
│ │ ├── config_generation.cmake
│ │ ├── hwloc_detection.cmake
│ │ ├── memcheck.cmake
│ │ ├── packaging.cmake
│ │ ├── post_install/
│ │ │ └── CMakeLists.txt
│ │ ├── python/
│ │ │ └── test_launcher.cmake
│ │ ├── resumable_tasks.cmake
│ │ ├── sanitize.cmake
│ │ ├── scripts/
│ │ │ └── cmake_gen_github_configs.cmake
│ │ ├── suppressions/
│ │ │ ├── lsan.suppressions
│ │ │ └── tsan.suppressions
│ │ ├── templates/
│ │ │ ├── TBBConfig.cmake.in
│ │ │ └── TBBConfigVersion.cmake.in
│ │ ├── test_spec.cmake
│ │ ├── toolchains/
│ │ │ ├── mips.cmake
│ │ │ └── riscv64.cmake
│ │ ├── utils.cmake
│ │ └── vars_utils.cmake
│ ├── doc/
│ │ ├── Doxyfile.in
│ │ ├── DoxygenLayout.xml
│ │ ├── GSG/
│ │ │ ├── get_started.rst
│ │ │ ├── installation.rst
│ │ │ ├── integrate.rst
│ │ │ ├── intro_gsg.rst
│ │ │ ├── next_steps.rst
│ │ │ ├── samples.rst
│ │ │ └── system_requirements.rst
│ │ ├── README.md
│ │ ├── _static/
│ │ │ ├── custom.js
│ │ │ └── theme_overrides.css
│ │ ├── conf.py
│ │ ├── index/
│ │ │ ├── index_intro.rst
│ │ │ ├── toctree.rst
│ │ │ └── useful_topics.rst
│ │ ├── index.rst
│ │ ├── main/
│ │ │ ├── _templates/
│ │ │ │ └── layout.html
│ │ │ ├── examples_testing/
│ │ │ │ └── CMakeLists.txt
│ │ │ ├── intro/
│ │ │ │ ├── Benefits.rst
│ │ │ │ ├── help_support.rst
│ │ │ │ ├── intro_os.rst
│ │ │ │ ├── limitations.rst
│ │ │ │ ├── notation.rst
│ │ │ │ └── testing_approach.rst
│ │ │ ├── reference/
│ │ │ │ ├── blocked_nd_range_ctad.rst
│ │ │ │ ├── blocking_terminate.rst
│ │ │ │ ├── concurrent_lru_cache_cls.rst
│ │ │ │ ├── constraints_extensions.rst
│ │ │ │ ├── constructors_for_nodes.rst
│ │ │ │ ├── custom_mutex_chmap.rst
│ │ │ │ ├── examples/
│ │ │ │ │ ├── blocked_nd_range_ctad_example.cpp
│ │ │ │ │ ├── custom_mutex_chmap_example.cpp
│ │ │ │ │ ├── fixed_pool_example.cpp
│ │ │ │ │ ├── helpers_for_expressing_graphs_preview_api_example.cpp
│ │ │ │ │ ├── helpers_for_expressing_graphs_regular_api_example.cpp
│ │ │ │ │ ├── make_edges_function_example.cpp
│ │ │ │ │ ├── malloc_replacement_log_example.cpp
│ │ │ │ │ ├── memory_pool_allocator_example.cpp
│ │ │ │ │ ├── memory_pool_example.cpp
│ │ │ │ │ ├── parallel_phase_example.cpp
│ │ │ │ │ ├── parallel_sort_ranges_extension_example.cpp
│ │ │ │ │ ├── rvalue_reduce.cpp
│ │ │ │ │ └── try_put_and_wait_example.cpp
│ │ │ │ ├── follows_and_precedes_functions.rst
│ │ │ │ ├── helpers_for_expressing_graphs.rst
│ │ │ │ ├── heterogeneous_extensions_chmap.rst
│ │ │ │ ├── info_namespace.rst
│ │ │ │ ├── info_namespace_extensions.rst
│ │ │ │ ├── make_edges_function.rst
│ │ │ │ ├── make_node_set_function.rst
│ │ │ │ ├── mutex_cls.rst
│ │ │ │ ├── parallel_for_each_semantics.rst
│ │ │ │ ├── parallel_phase_for_task_arena.rst
│ │ │ │ ├── parallel_sort_ranges_extension.rst
│ │ │ │ ├── reference.rst
│ │ │ │ ├── rvalue_reduce.rst
│ │ │ │ ├── rw_mutex_cls.rst
│ │ │ │ ├── scalable_memory_pools/
│ │ │ │ │ ├── fixed_pool_cls.rst
│ │ │ │ │ ├── malloc_replacement_log.rst
│ │ │ │ │ ├── memory_pool_allocator_cls.rst
│ │ │ │ │ └── memory_pool_cls.rst
│ │ │ │ ├── scalable_memory_pools.rst
│ │ │ │ ├── task_group_extensions.rst
│ │ │ │ ├── try_put_and_wait.rst
│ │ │ │ └── type_specified_message_keys.rst
│ │ │ └── tbb_userguide/
│ │ │ ├── Advanced_Example.rst
│ │ │ ├── Advanced_Topic_Other_Kinds_of_Iteration_Spaces.rst
│ │ │ ├── Allocator_Configuration.rst
│ │ │ ├── Automatic_Chunking.rst
│ │ │ ├── Automically_Replacing_malloc.rst
│ │ │ ├── Bandwidth_and_Cache_Affinity_os.rst
│ │ │ ├── Basic_Flow_Graph_concepts.rst
│ │ │ ├── Cancellation_Without_An_Exception.rst
│ │ │ ├── Cancellation_and_Nested_Parallelism.rst
│ │ │ ├── Concurrent_Queue_Classes.rst
│ │ │ ├── Constraints.rst
│ │ │ ├── Containers.rst
│ │ │ ├── Controlling_Chunking_os.rst
│ │ │ ├── Cook_Until_Done_parallel_do.rst
│ │ │ ├── Data_Flow_Graph.rst
│ │ │ ├── Debug_Versus_Release_Libraries.rst
│ │ │ ├── Dependence_Graph.rst
│ │ │ ├── Edges.rst
│ │ │ ├── Exceptions_and_Cancellation.rst
│ │ │ ├── Floating_Point_Settings.rst
│ │ │ ├── Flow-Graph-exception-tips.rst
│ │ │ ├── Flow-Graph-waiting-tips.rst
│ │ │ ├── Flow_Graph.rst
│ │ │ ├── Flow_Graph_Buffering_in_Nodes.rst
│ │ │ ├── Flow_Graph_Message_Passing_Protocol.rst
│ │ │ ├── Flow_Graph_Reservation.rst
│ │ │ ├── Flow_Graph_Single_Vs_Broadcast.rst
│ │ │ ├── Flow_Graph_Tips.rst
│ │ │ ├── Flow_Graph_exception_tips.rst
│ │ │ ├── Flow_Graph_making_edges_tips.rst
│ │ │ ├── Flow_Graph_nested_parallelism_tips.rst
│ │ │ ├── Flow_Graph_resource_tips.rst
│ │ │ ├── Flow_Graph_waiting_tips.rst
│ │ │ ├── Graph_Main_Categories.rst
│ │ │ ├── Graph_Object.rst
│ │ │ ├── Guiding_Task_Scheduler_Execution.rst
│ │ │ ├── How_Task_Scheduler_Works.rst
│ │ │ ├── Initializing_and_Terminating_the_Library.rst
│ │ │ ├── Iterating_Over_a_Concurrent_Queue_for_Debugging.rst
│ │ │ ├── Lambda_Expressions.rst
│ │ │ ├── Linux_C_Dynamic_Memory_Interface_Replacement.rst
│ │ │ ├── Linux_OS.rst
│ │ │ ├── Lock_Pathologies.rst
│ │ │ ├── Mac_OS.rst
│ │ │ ├── Mapping_Nodes2Tasks.rst
│ │ │ ├── Memory_Allocation.rst
│ │ │ ├── Migration_Guide/
│ │ │ │ ├── Mixing_Two_Runtimes.rst
│ │ │ │ ├── Task_API.rst
│ │ │ │ └── Task_Scheduler_Init.rst
│ │ │ ├── Migration_Guide.rst
│ │ │ ├── More_on_HashCompare.rst
│ │ │ ├── Mutex_Flavors.rst
│ │ │ ├── Mutual_Exclusion.rst
│ │ │ ├── Nodes.rst
│ │ │ ├── Non-Linear_Pipelines.rst
│ │ │ ├── Package_Contents_os.rst
│ │ │ ├── Parallelizing_Complex_Loops.rst
│ │ │ ├── Parallelizing_Flow_Graph.rst
│ │ │ ├── Parallelizing_Simple_Loops_os.rst
│ │ │ ├── Parallelizing_Simple_Loops_toctree.rst
│ │ │ ├── Partitioner_Summary.rst
│ │ │ ├── Predefined_Node_Types.rst
│ │ │ ├── Reader_Writer_Mutexes.rst
│ │ │ ├── References.rst
│ │ │ ├── Scalable_Memory_Allocator.rst
│ │ │ ├── Summary_of_Containers.rst
│ │ │ ├── Summary_of_Loops_and_Pipelines.rst
│ │ │ ├── Task-Based_Programming.rst
│ │ │ ├── Task_Scheduler_Bypass.rst
│ │ │ ├── The_Task_Scheduler.rst
│ │ │ ├── Throughput_of_pipeline.rst
│ │ │ ├── Timing.rst
│ │ │ ├── UpgradeDowngrade.rst
│ │ │ ├── Using_Circular_Buffers.rst
│ │ │ ├── When_Not_to_Use_Queues.rst
│ │ │ ├── When_Task-Based_Programming_Is_Inappropriate.rst
│ │ │ ├── Which_Dynamic_Libraries_to_Use.rst
│ │ │ ├── Windows_C_Dynamic_Memory_Interface_Replacement.rst
│ │ │ ├── Windows_OS_ug.rst
│ │ │ ├── Working_on_the_Assembly_Line_pipeline.rst
│ │ │ ├── always_use_wait_for_all.rst
│ │ │ ├── appendix_A.rst
│ │ │ ├── appendix_B.rst
│ │ │ ├── attach_flow_graph_to_arena.rst
│ │ │ ├── automatically-replacing-malloc.rst
│ │ │ ├── avoid_dynamic_node_removal.rst
│ │ │ ├── avoiding_data_races.rst
│ │ │ ├── broadcast_or_send.rst
│ │ │ ├── cancel_a_graph.rst
│ │ │ ├── cancelling_nested_parallelism.rst
│ │ │ ├── catching_exceptions.rst
│ │ │ ├── communicate_with_nodes.rst
│ │ │ ├── concurrent_hash_map.rst
│ │ │ ├── concurrent_vector_ug.rst
│ │ │ ├── create_token_based_system.rst
│ │ │ ├── design_patterns/
│ │ │ │ ├── Agglomeration.rst
│ │ │ │ ├── Design_Patterns.rst
│ │ │ │ ├── Divide_and_Conquer.rst
│ │ │ │ ├── Elementwise.rst
│ │ │ │ ├── Fenced_Data_Transfer.rst
│ │ │ │ ├── GUI_Thread.rst
│ │ │ │ ├── General_References.rst
│ │ │ │ ├── Lazy_Initialization.rst
│ │ │ │ ├── Local_Serializer.rst
│ │ │ │ ├── Non-Preemptive_Priorities.rst
│ │ │ │ ├── Odd-Even_Communication.rst
│ │ │ │ ├── Reduction.rst
│ │ │ │ ├── Reference_Counting.rst
│ │ │ │ └── Wavefront.rst
│ │ │ ├── destroy_graphs_outside_main_thread.rst
│ │ │ ├── estimate_flow_graph_performance.rst
│ │ │ ├── examples/
│ │ │ │ ├── blocked_nd_range_example.cpp
│ │ │ │ ├── flow_graph_examples.cpp
│ │ │ │ ├── parallel_for_lambda_example_1.cpp
│ │ │ │ ├── parallel_for_lambda_example_2.cpp
│ │ │ │ └── parallel_for_os_example.cpp
│ │ │ ├── parallel_for_os.rst
│ │ │ ├── parallel_for_toctree.rst
│ │ │ ├── parallel_reduce.rst
│ │ │ ├── snippets/
│ │ │ │ ├── blocked_nd_range_example.cpp
│ │ │ │ ├── blocked_nd_range_example.h
│ │ │ │ └── flow_graph_examples.cpp
│ │ │ ├── std_invoke.rst
│ │ │ ├── title.rst
│ │ │ ├── use_concurrency_limits.rst
│ │ │ ├── use_graph_reset.rst
│ │ │ ├── use_input_node.rst
│ │ │ ├── use_limiter_node.rst
│ │ │ ├── use_make_edge.rst
│ │ │ ├── use_nested_algorithms.rst
│ │ │ ├── use_nested_flow_graphs.rst
│ │ │ └── work_isolation.rst
│ │ ├── make.bat
│ │ └── test_classification.dox
│ ├── examples/
│ │ ├── .clang-format
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── common/
│ │ │ ├── cmake/
│ │ │ │ ├── common.cmake
│ │ │ │ └── modules/
│ │ │ │ └── FindTBB.cmake
│ │ │ ├── gui/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── convideo.cpp
│ │ │ │ ├── d2dvideo.cpp
│ │ │ │ ├── gdivideo.cpp
│ │ │ │ ├── macvideo.cpp
│ │ │ │ ├── video.hpp
│ │ │ │ ├── winvideo.hpp
│ │ │ │ ├── xcode/
│ │ │ │ │ └── tbbExample/
│ │ │ │ │ ├── OpenGLView.h
│ │ │ │ │ ├── OpenGLView.m
│ │ │ │ │ ├── PkgInfo
│ │ │ │ │ ├── en.lproj/
│ │ │ │ │ │ ├── InfoPlist.strings
│ │ │ │ │ │ ├── MainMenu.nib
│ │ │ │ │ │ └── MainMenu.xib
│ │ │ │ │ ├── iOS.storyboard
│ │ │ │ │ ├── main.m
│ │ │ │ │ ├── tbbAppDelegate.h
│ │ │ │ │ ├── tbbAppDelegate.m
│ │ │ │ │ ├── tbbExample-Info.ios.plist
│ │ │ │ │ └── tbbExample-Info.plist
│ │ │ │ └── xvideo.cpp
│ │ │ └── utility/
│ │ │ ├── fast_random.hpp
│ │ │ ├── get_default_num_threads.hpp
│ │ │ └── utility.hpp
│ │ ├── concurrent_hash_map/
│ │ │ ├── README.md
│ │ │ └── count_strings/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ └── count_strings.cpp
│ │ ├── concurrent_priority_queue/
│ │ │ ├── README.md
│ │ │ └── shortpath/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ └── shortpath.cpp
│ │ ├── getting_started/
│ │ │ ├── README.md
│ │ │ └── sub_string_finder/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── sub_string_finder.cpp
│ │ │ ├── sub_string_finder_extended.cpp
│ │ │ └── sub_string_finder_pretty.cpp
│ │ ├── graph/
│ │ │ ├── README.md
│ │ │ ├── binpack/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ └── binpack.cpp
│ │ │ ├── cholesky/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── cholesky.cpp
│ │ │ │ └── init.cpp
│ │ │ ├── dining_philosophers/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ └── dining_philosophers.cpp
│ │ │ ├── fgbzip2/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── blocksort.cpp
│ │ │ │ ├── bzlib.cpp
│ │ │ │ ├── bzlib.hpp
│ │ │ │ ├── bzlib_private.hpp
│ │ │ │ ├── compress.cpp
│ │ │ │ ├── crctable.cpp
│ │ │ │ ├── decompress.cpp
│ │ │ │ ├── fgbzip2.cpp
│ │ │ │ ├── huffman.cpp
│ │ │ │ └── randtable.cpp
│ │ │ ├── logic_sim/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── D_latch.hpp
│ │ │ │ ├── README.md
│ │ │ │ ├── basics.hpp
│ │ │ │ ├── four_bit_adder.hpp
│ │ │ │ ├── one_bit_adder.hpp
│ │ │ │ ├── test_all.cpp
│ │ │ │ └── two_bit_adder.hpp
│ │ │ └── som/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── som.cpp
│ │ │ ├── som.hpp
│ │ │ └── som_graph.cpp
│ │ ├── migration/
│ │ │ ├── README.md
│ │ │ └── recursive_fibonacci/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── fibonacci.cpp
│ │ │ ├── fibonacci_single_task.h
│ │ │ ├── fibonacci_two_tasks.h
│ │ │ └── task_emulation_layer.h
│ │ ├── parallel_for/
│ │ │ ├── README.md
│ │ │ ├── game_of_life/
│ │ │ │ ├── Board.hpp
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── Evolution.cpp
│ │ │ │ ├── Evolution.hpp
│ │ │ │ ├── Game_of_life.cpp
│ │ │ │ ├── README.md
│ │ │ │ └── Update_state.cpp
│ │ │ ├── polygon_overlay/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── gui/
│ │ │ │ │ ├── polygon_overlay.rc
│ │ │ │ │ └── resource.h
│ │ │ │ ├── polymain.cpp
│ │ │ │ ├── polymain.hpp
│ │ │ │ ├── polyover.cpp
│ │ │ │ ├── polyover.hpp
│ │ │ │ ├── pover_global.hpp
│ │ │ │ ├── pover_video.cpp
│ │ │ │ ├── pover_video.hpp
│ │ │ │ └── rpolygon.hpp
│ │ │ ├── seismic/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── gui/
│ │ │ │ │ ├── resource.h
│ │ │ │ │ └── seismic.rc
│ │ │ │ ├── main.cpp
│ │ │ │ ├── resource.hpp
│ │ │ │ ├── seismic_video.cpp
│ │ │ │ ├── seismic_video.hpp
│ │ │ │ ├── universe.cpp
│ │ │ │ └── universe.hpp
│ │ │ └── tachyon/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── gui/
│ │ │ │ ├── resource.h
│ │ │ │ └── tachyon.rc
│ │ │ └── src/
│ │ │ ├── api.cpp
│ │ │ ├── api.hpp
│ │ │ ├── apigeom.cpp
│ │ │ ├── apitrigeom.cpp
│ │ │ ├── apitrigeom.hpp
│ │ │ ├── bndbox.cpp
│ │ │ ├── bndbox.hpp
│ │ │ ├── box.cpp
│ │ │ ├── box.hpp
│ │ │ ├── camera.cpp
│ │ │ ├── camera.hpp
│ │ │ ├── coordsys.cpp
│ │ │ ├── coordsys.hpp
│ │ │ ├── cylinder.cpp
│ │ │ ├── cylinder.hpp
│ │ │ ├── extvol.cpp
│ │ │ ├── extvol.hpp
│ │ │ ├── global.cpp
│ │ │ ├── global.hpp
│ │ │ ├── grid.cpp
│ │ │ ├── grid.hpp
│ │ │ ├── imageio.cpp
│ │ │ ├── imageio.hpp
│ │ │ ├── imap.cpp
│ │ │ ├── imap.hpp
│ │ │ ├── intersect.cpp
│ │ │ ├── intersect.hpp
│ │ │ ├── jpeg.cpp
│ │ │ ├── jpeg.hpp
│ │ │ ├── light.cpp
│ │ │ ├── light.hpp
│ │ │ ├── machine.hpp
│ │ │ ├── macros.hpp
│ │ │ ├── main.cpp
│ │ │ ├── objbound.cpp
│ │ │ ├── objbound.hpp
│ │ │ ├── parse.cpp
│ │ │ ├── parse.hpp
│ │ │ ├── plane.cpp
│ │ │ ├── plane.hpp
│ │ │ ├── ppm.cpp
│ │ │ ├── ppm.hpp
│ │ │ ├── pthread.cpp
│ │ │ ├── pthread_w.hpp
│ │ │ ├── quadric.cpp
│ │ │ ├── quadric.hpp
│ │ │ ├── render.cpp
│ │ │ ├── render.hpp
│ │ │ ├── ring.cpp
│ │ │ ├── ring.hpp
│ │ │ ├── shade.cpp
│ │ │ ├── shade.hpp
│ │ │ ├── sphere.cpp
│ │ │ ├── sphere.hpp
│ │ │ ├── tachyon_video.cpp
│ │ │ ├── tachyon_video.hpp
│ │ │ ├── texture.cpp
│ │ │ ├── texture.hpp
│ │ │ ├── tgafile.cpp
│ │ │ ├── tgafile.hpp
│ │ │ ├── trace.hpp
│ │ │ ├── trace.omp.cpp
│ │ │ ├── trace.serial.cpp
│ │ │ ├── trace.simple.cpp
│ │ │ ├── trace.taskq.cpp
│ │ │ ├── trace.tbb.cpp
│ │ │ ├── trace.tbb1d.cpp
│ │ │ ├── trace.threads.cpp
│ │ │ ├── trace.threads2d.cpp
│ │ │ ├── trace_rest.cpp
│ │ │ ├── triangle.cpp
│ │ │ ├── triangle.hpp
│ │ │ ├── types.hpp
│ │ │ ├── ui.cpp
│ │ │ ├── ui.hpp
│ │ │ ├── util.cpp
│ │ │ ├── util.hpp
│ │ │ ├── vector.cpp
│ │ │ ├── vector.hpp
│ │ │ ├── vol.cpp
│ │ │ └── vol.hpp
│ │ ├── parallel_for_each/
│ │ │ ├── README.md
│ │ │ └── parallel_preorder/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Graph.cpp
│ │ │ ├── Graph.hpp
│ │ │ ├── Matrix.hpp
│ │ │ ├── README.md
│ │ │ ├── main.cpp
│ │ │ └── parallel_preorder.cpp
│ │ ├── parallel_pipeline/
│ │ │ ├── README.md
│ │ │ └── square/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── gen_input.cpp
│ │ │ └── square.cpp
│ │ ├── parallel_reduce/
│ │ │ ├── README.md
│ │ │ ├── convex_hull/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── convex_hull.hpp
│ │ │ │ ├── convex_hull_bench.cpp
│ │ │ │ └── convex_hull_sample.cpp
│ │ │ ├── pi/
│ │ │ │ ├── CMakeLists.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── common.h
│ │ │ │ ├── main.cpp
│ │ │ │ └── pi.cpp
│ │ │ └── primes/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── main.cpp
│ │ │ ├── primes.cpp
│ │ │ └── primes.hpp
│ │ ├── task_arena/
│ │ │ ├── README.md
│ │ │ └── fractal/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── fractal.cpp
│ │ │ ├── fractal.hpp
│ │ │ ├── fractal_video.hpp
│ │ │ ├── gui/
│ │ │ │ ├── fractal.rc
│ │ │ │ └── resource.h
│ │ │ └── main.cpp
│ │ ├── task_group/
│ │ │ ├── README.md
│ │ │ └── sudoku/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── README.md
│ │ │ ├── input1
│ │ │ ├── input2
│ │ │ ├── input3
│ │ │ ├── input4
│ │ │ └── sudoku.cpp
│ │ └── test_all/
│ │ ├── README.md
│ │ └── fibonacci/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ └── fibonacci.cpp
│ ├── include/
│ │ ├── oneapi/
│ │ │ ├── tbb/
│ │ │ │ ├── blocked_nd_range.h
│ │ │ │ ├── blocked_range.h
│ │ │ │ ├── blocked_range2d.h
│ │ │ │ ├── blocked_range3d.h
│ │ │ │ ├── blocked_rangeNd.h
│ │ │ │ ├── cache_aligned_allocator.h
│ │ │ │ ├── collaborative_call_once.h
│ │ │ │ ├── combinable.h
│ │ │ │ ├── concurrent_hash_map.h
│ │ │ │ ├── concurrent_lru_cache.h
│ │ │ │ ├── concurrent_map.h
│ │ │ │ ├── concurrent_priority_queue.h
│ │ │ │ ├── concurrent_queue.h
│ │ │ │ ├── concurrent_set.h
│ │ │ │ ├── concurrent_unordered_map.h
│ │ │ │ ├── concurrent_unordered_set.h
│ │ │ │ ├── concurrent_vector.h
│ │ │ │ ├── detail/
│ │ │ │ │ ├── _aggregator.h
│ │ │ │ │ ├── _aligned_space.h
│ │ │ │ │ ├── _allocator_traits.h
│ │ │ │ │ ├── _assert.h
│ │ │ │ │ ├── _attach.h
│ │ │ │ │ ├── _concurrent_queue_base.h
│ │ │ │ │ ├── _concurrent_skip_list.h
│ │ │ │ │ ├── _concurrent_unordered_base.h
│ │ │ │ │ ├── _config.h
│ │ │ │ │ ├── _containers_helpers.h
│ │ │ │ │ ├── _exception.h
│ │ │ │ │ ├── _export.h
│ │ │ │ │ ├── _flow_graph_body_impl.h
│ │ │ │ │ ├── _flow_graph_cache_impl.h
│ │ │ │ │ ├── _flow_graph_impl.h
│ │ │ │ │ ├── _flow_graph_indexer_impl.h
│ │ │ │ │ ├── _flow_graph_item_buffer_impl.h
│ │ │ │ │ ├── _flow_graph_join_impl.h
│ │ │ │ │ ├── _flow_graph_node_impl.h
│ │ │ │ │ ├── _flow_graph_node_set_impl.h
│ │ │ │ │ ├── _flow_graph_nodes_deduction.h
│ │ │ │ │ ├── _flow_graph_tagged_buffer_impl.h
│ │ │ │ │ ├── _flow_graph_trace_impl.h
│ │ │ │ │ ├── _flow_graph_types_impl.h
│ │ │ │ │ ├── _hash_compare.h
│ │ │ │ │ ├── _intrusive_list_node.h
│ │ │ │ │ ├── _machine.h
│ │ │ │ │ ├── _mutex_common.h
│ │ │ │ │ ├── _namespace_injection.h
│ │ │ │ │ ├── _node_handle.h
│ │ │ │ │ ├── _pipeline_filters.h
│ │ │ │ │ ├── _pipeline_filters_deduction.h
│ │ │ │ │ ├── _range_common.h
│ │ │ │ │ ├── _rtm_mutex.h
│ │ │ │ │ ├── _rtm_rw_mutex.h
│ │ │ │ │ ├── _scoped_lock.h
│ │ │ │ │ ├── _segment_table.h
│ │ │ │ │ ├── _small_object_pool.h
│ │ │ │ │ ├── _string_resource.h
│ │ │ │ │ ├── _task.h
│ │ │ │ │ ├── _task_handle.h
│ │ │ │ │ ├── _template_helpers.h
│ │ │ │ │ ├── _utils.h
│ │ │ │ │ └── _waitable_atomic.h
│ │ │ │ ├── enumerable_thread_specific.h
│ │ │ │ ├── flow_graph.h
│ │ │ │ ├── flow_graph_abstractions.h
│ │ │ │ ├── global_control.h
│ │ │ │ ├── info.h
│ │ │ │ ├── memory_pool.h
│ │ │ │ ├── mutex.h
│ │ │ │ ├── null_mutex.h
│ │ │ │ ├── null_rw_mutex.h
│ │ │ │ ├── parallel_for.h
│ │ │ │ ├── parallel_for_each.h
│ │ │ │ ├── parallel_invoke.h
│ │ │ │ ├── parallel_pipeline.h
│ │ │ │ ├── parallel_reduce.h
│ │ │ │ ├── parallel_scan.h
│ │ │ │ ├── parallel_sort.h
│ │ │ │ ├── partitioner.h
│ │ │ │ ├── profiling.h
│ │ │ │ ├── queuing_mutex.h
│ │ │ │ ├── queuing_rw_mutex.h
│ │ │ │ ├── rw_mutex.h
│ │ │ │ ├── scalable_allocator.h
│ │ │ │ ├── spin_mutex.h
│ │ │ │ ├── spin_rw_mutex.h
│ │ │ │ ├── task.h
│ │ │ │ ├── task_arena.h
│ │ │ │ ├── task_group.h
│ │ │ │ ├── task_scheduler_observer.h
│ │ │ │ ├── tbb_allocator.h
│ │ │ │ ├── tbbmalloc_proxy.h
│ │ │ │ ├── tick_count.h
│ │ │ │ └── version.h
│ │ │ └── tbb.h
│ │ └── tbb/
│ │ ├── blocked_nd_range.h
│ │ ├── blocked_range.h
│ │ ├── blocked_range2d.h
│ │ ├── blocked_range3d.h
│ │ ├── blocked_rangeNd.h
│ │ ├── cache_aligned_allocator.h
│ │ ├── collaborative_call_once.h
│ │ ├── combinable.h
│ │ ├── concurrent_hash_map.h
│ │ ├── concurrent_lru_cache.h
│ │ ├── concurrent_map.h
│ │ ├── concurrent_priority_queue.h
│ │ ├── concurrent_queue.h
│ │ ├── concurrent_set.h
│ │ ├── concurrent_unordered_map.h
│ │ ├── concurrent_unordered_set.h
│ │ ├── concurrent_vector.h
│ │ ├── enumerable_thread_specific.h
│ │ ├── flow_graph.h
│ │ ├── flow_graph_abstractions.h
│ │ ├── global_control.h
│ │ ├── info.h
│ │ ├── memory_pool.h
│ │ ├── mutex.h
│ │ ├── null_mutex.h
│ │ ├── null_rw_mutex.h
│ │ ├── parallel_for.h
│ │ ├── parallel_for_each.h
│ │ ├── parallel_invoke.h
│ │ ├── parallel_pipeline.h
│ │ ├── parallel_reduce.h
│ │ ├── parallel_scan.h
│ │ ├── parallel_sort.h
│ │ ├── partitioner.h
│ │ ├── profiling.h
│ │ ├── queuing_mutex.h
│ │ ├── queuing_rw_mutex.h
│ │ ├── rw_mutex.h
│ │ ├── scalable_allocator.h
│ │ ├── spin_mutex.h
│ │ ├── spin_rw_mutex.h
│ │ ├── task.h
│ │ ├── task_arena.h
│ │ ├── task_group.h
│ │ ├── task_scheduler_observer.h
│ │ ├── tbb.h
│ │ ├── tbb_allocator.h
│ │ ├── tbbmalloc_proxy.h
│ │ ├── tick_count.h
│ │ └── version.h
│ ├── integration/
│ │ ├── cmake/
│ │ │ └── generate_vars.cmake
│ │ ├── linux/
│ │ │ ├── env/
│ │ │ │ ├── vars.sh
│ │ │ │ └── vars.sh.in
│ │ │ ├── modulefiles/
│ │ │ │ ├── tbb
│ │ │ │ └── tbb32
│ │ │ ├── oneapi/
│ │ │ │ └── vars.sh
│ │ │ └── sys_check/
│ │ │ └── sys_check.sh
│ │ ├── mac/
│ │ │ └── env/
│ │ │ ├── vars.sh
│ │ │ └── vars.sh.in
│ │ ├── pkg-config/
│ │ │ └── tbb.pc.in
│ │ └── windows/
│ │ ├── env/
│ │ │ ├── vars.bat
│ │ │ └── vars.bat.in
│ │ ├── nuget/
│ │ │ ├── inteltbb.devel.win.targets
│ │ │ └── inteltbb.redist.win.targets
│ │ ├── oneapi/
│ │ │ └── vars.bat
│ │ └── sys_check/
│ │ └── sys_check.bat
│ ├── python/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── TBB.py
│ │ ├── rml/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── ipc_server.cpp
│ │ │ ├── ipc_utils.cpp
│ │ │ └── ipc_utils.h
│ │ ├── setup.py
│ │ └── tbb/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── api.i
│ │ ├── pool.py
│ │ └── test.py
│ ├── rfcs/
│ │ ├── README.md
│ │ ├── archived/
│ │ │ └── README.md
│ │ ├── experimental/
│ │ │ ├── README.md
│ │ │ ├── blocked_nd_range_ctad/
│ │ │ │ └── README.md
│ │ │ └── parallel_phase_for_task_arena/
│ │ │ └── README.md
│ │ ├── proposed/
│ │ │ ├── README.md
│ │ │ ├── loading-dependencies/
│ │ │ │ └── loading-dependencies-by-module-name.org
│ │ │ └── numa_support/
│ │ │ ├── README.md
│ │ │ └── tbbbind-link-static-hwloc.org
│ │ ├── supported/
│ │ │ └── README.md
│ │ └── template.md
│ ├── src/
│ │ ├── tbb/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── address_waiter.cpp
│ │ │ ├── allocator.cpp
│ │ │ ├── arena.cpp
│ │ │ ├── arena.h
│ │ │ ├── arena_slot.cpp
│ │ │ ├── arena_slot.h
│ │ │ ├── assert_impl.h
│ │ │ ├── cancellation_disseminator.h
│ │ │ ├── co_context.h
│ │ │ ├── concurrent_bounded_queue.cpp
│ │ │ ├── concurrent_monitor.h
│ │ │ ├── concurrent_monitor_mutex.h
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbb.def
│ │ │ │ ├── lin64-tbb.def
│ │ │ │ ├── mac64-tbb.def
│ │ │ │ ├── win32-tbb.def
│ │ │ │ └── win64-tbb.def
│ │ │ ├── dynamic_link.cpp
│ │ │ ├── dynamic_link.h
│ │ │ ├── environment.h
│ │ │ ├── exception.cpp
│ │ │ ├── global_control.cpp
│ │ │ ├── governor.cpp
│ │ │ ├── governor.h
│ │ │ ├── intrusive_list.h
│ │ │ ├── itt_notify.cpp
│ │ │ ├── itt_notify.h
│ │ │ ├── mailbox.h
│ │ │ ├── main.cpp
│ │ │ ├── main.h
│ │ │ ├── market.cpp
│ │ │ ├── market.h
│ │ │ ├── market_concurrent_monitor.h
│ │ │ ├── misc.cpp
│ │ │ ├── misc.h
│ │ │ ├── misc_ex.cpp
│ │ │ ├── observer_proxy.cpp
│ │ │ ├── observer_proxy.h
│ │ │ ├── parallel_pipeline.cpp
│ │ │ ├── permit_manager.h
│ │ │ ├── pm_client.h
│ │ │ ├── private_server.cpp
│ │ │ ├── profiling.cpp
│ │ │ ├── queuing_rw_mutex.cpp
│ │ │ ├── rml_base.h
│ │ │ ├── rml_tbb.cpp
│ │ │ ├── rml_tbb.h
│ │ │ ├── rml_thread_monitor.h
│ │ │ ├── rtm_mutex.cpp
│ │ │ ├── rtm_rw_mutex.cpp
│ │ │ ├── scheduler_common.h
│ │ │ ├── semaphore.cpp
│ │ │ ├── semaphore.h
│ │ │ ├── small_object_pool.cpp
│ │ │ ├── small_object_pool_impl.h
│ │ │ ├── task.cpp
│ │ │ ├── task_dispatcher.cpp
│ │ │ ├── task_dispatcher.h
│ │ │ ├── task_group_context.cpp
│ │ │ ├── task_stream.h
│ │ │ ├── tbb.rc
│ │ │ ├── tcm.h
│ │ │ ├── tcm_adaptor.cpp
│ │ │ ├── tcm_adaptor.h
│ │ │ ├── thread_control_monitor.h
│ │ │ ├── thread_data.h
│ │ │ ├── thread_dispatcher.cpp
│ │ │ ├── thread_dispatcher.h
│ │ │ ├── thread_dispatcher_client.h
│ │ │ ├── thread_request_serializer.cpp
│ │ │ ├── thread_request_serializer.h
│ │ │ ├── threading_control.cpp
│ │ │ ├── threading_control.h
│ │ │ ├── threading_control_client.h
│ │ │ ├── tls.h
│ │ │ ├── tools_api/
│ │ │ │ ├── disable_warnings.h
│ │ │ │ ├── ittnotify.h
│ │ │ │ ├── ittnotify_config.h
│ │ │ │ ├── ittnotify_static.c
│ │ │ │ ├── ittnotify_static.h
│ │ │ │ ├── ittnotify_types.h
│ │ │ │ └── legacy/
│ │ │ │ └── ittnotify.h
│ │ │ ├── version.cpp
│ │ │ └── waiters.h
│ │ ├── tbbbind/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbbbind.def
│ │ │ │ ├── lin64-tbbbind.def
│ │ │ │ ├── mac64-tbbbind.def
│ │ │ │ ├── win32-tbbbind.def
│ │ │ │ └── win64-tbbbind.def
│ │ │ ├── tbb_bind.cpp
│ │ │ └── tbb_bind.rc
│ │ ├── tbbmalloc/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Customize.h
│ │ │ ├── MapMemory.h
│ │ │ ├── Statistics.h
│ │ │ ├── Synchronize.h
│ │ │ ├── TypeDefinitions.h
│ │ │ ├── backend.cpp
│ │ │ ├── backend.h
│ │ │ ├── backref.cpp
│ │ │ ├── def/
│ │ │ │ ├── lin32-tbbmalloc.def
│ │ │ │ ├── lin64-tbbmalloc.def
│ │ │ │ ├── mac64-tbbmalloc.def
│ │ │ │ ├── win32-tbbmalloc.def
│ │ │ │ └── win64-tbbmalloc.def
│ │ │ ├── frontend.cpp
│ │ │ ├── large_objects.cpp
│ │ │ ├── large_objects.h
│ │ │ ├── shared_utils.h
│ │ │ ├── tbbmalloc.cpp
│ │ │ ├── tbbmalloc.rc
│ │ │ ├── tbbmalloc_internal.h
│ │ │ └── tbbmalloc_internal_api.h
│ │ └── tbbmalloc_proxy/
│ │ ├── CMakeLists.txt
│ │ ├── def/
│ │ │ ├── lin32-proxy.def
│ │ │ └── lin64-proxy.def
│ │ ├── function_replacement.cpp
│ │ ├── function_replacement.h
│ │ ├── proxy.cpp
│ │ ├── proxy.h
│ │ ├── proxy_overload_osx.h
│ │ └── tbbmalloc_proxy.rc
│ ├── test/
│ │ ├── CMakeLists.txt
│ │ ├── common/
│ │ │ ├── allocator_overload.h
│ │ │ ├── allocator_stl_test_common.h
│ │ │ ├── allocator_test_common.h
│ │ │ ├── checktype.h
│ │ │ ├── common_arena_constraints.h
│ │ │ ├── concepts_common.h
│ │ │ ├── concurrency_tracker.h
│ │ │ ├── concurrent_associative_common.h
│ │ │ ├── concurrent_lru_cache_common.h
│ │ │ ├── concurrent_ordered_common.h
│ │ │ ├── concurrent_priority_queue_common.h
│ │ │ ├── concurrent_unordered_common.h
│ │ │ ├── config.h
│ │ │ ├── container_move_support.h
│ │ │ ├── containers_common.h
│ │ │ ├── cpu_usertime.h
│ │ │ ├── custom_allocators.h
│ │ │ ├── doctest.h
│ │ │ ├── dummy_body.h
│ │ │ ├── exception_handling.h
│ │ │ ├── fp_control.h
│ │ │ ├── graph_utils.h
│ │ │ ├── initializer_list_support.h
│ │ │ ├── inject_scheduler.h
│ │ │ ├── iterator.h
│ │ │ ├── memory_usage.h
│ │ │ ├── node_handling_support.h
│ │ │ ├── parallel_for_each_common.h
│ │ │ ├── parallel_invoke_common.h
│ │ │ ├── parallel_reduce_common.h
│ │ │ ├── range_based_for_support.h
│ │ │ ├── rwm_upgrade_downgrade.h
│ │ │ ├── spin_barrier.h
│ │ │ ├── state_trackable.h
│ │ │ ├── test.h
│ │ │ ├── test_comparisons.h
│ │ │ ├── test_follows_and_precedes_api.h
│ │ │ ├── test_invoke.h
│ │ │ ├── test_join_node_multiple_predecessors.h
│ │ │ ├── tls_limit.h
│ │ │ ├── utils.h
│ │ │ ├── utils_assert.h
│ │ │ ├── utils_concurrency_limit.h
│ │ │ ├── utils_dynamic_libs.h
│ │ │ ├── utils_env.h
│ │ │ ├── utils_report.h
│ │ │ ├── utils_yield.h
│ │ │ └── vector_types.h
│ │ ├── conformance/
│ │ │ ├── conformance_allocators.cpp
│ │ │ ├── conformance_arena_constraints.cpp
│ │ │ ├── conformance_async_node.cpp
│ │ │ ├── conformance_blocked_nd_range.cpp
│ │ │ ├── conformance_blocked_range.cpp
│ │ │ ├── conformance_blocked_range2d.cpp
│ │ │ ├── conformance_blocked_range3d.cpp
│ │ │ ├── conformance_blocked_rangeNd.cpp
│ │ │ ├── conformance_broadcast_node.cpp
│ │ │ ├── conformance_buffer_node.cpp
│ │ │ ├── conformance_collaborative_call_once.cpp
│ │ │ ├── conformance_combinable.cpp
│ │ │ ├── conformance_composite_node.cpp
│ │ │ ├── conformance_concurrent_hash_map.cpp
│ │ │ ├── conformance_concurrent_lru_cache.cpp
│ │ │ ├── conformance_concurrent_map.cpp
│ │ │ ├── conformance_concurrent_priority_queue.cpp
│ │ │ ├── conformance_concurrent_queue.cpp
│ │ │ ├── conformance_concurrent_set.cpp
│ │ │ ├── conformance_concurrent_unordered_map.cpp
│ │ │ ├── conformance_concurrent_unordered_set.cpp
│ │ │ ├── conformance_concurrent_vector.cpp
│ │ │ ├── conformance_continue_node.cpp
│ │ │ ├── conformance_enumerable_thread_specific.cpp
│ │ │ ├── conformance_flowgraph.h
│ │ │ ├── conformance_function_node.cpp
│ │ │ ├── conformance_global_control.cpp
│ │ │ ├── conformance_graph.cpp
│ │ │ ├── conformance_indexer_node.cpp
│ │ │ ├── conformance_input_node.cpp
│ │ │ ├── conformance_join_node.cpp
│ │ │ ├── conformance_limiter_node.cpp
│ │ │ ├── conformance_multifunction_node.cpp
│ │ │ ├── conformance_mutex.cpp
│ │ │ ├── conformance_mutex.h
│ │ │ ├── conformance_overwrite_node.cpp
│ │ │ ├── conformance_parallel_for.cpp
│ │ │ ├── conformance_parallel_for_each.cpp
│ │ │ ├── conformance_parallel_invoke.cpp
│ │ │ ├── conformance_parallel_pipeline.cpp
│ │ │ ├── conformance_parallel_reduce.cpp
│ │ │ ├── conformance_parallel_scan.cpp
│ │ │ ├── conformance_parallel_sort.cpp
│ │ │ ├── conformance_priority_queue_node.cpp
│ │ │ ├── conformance_queue_node.cpp
│ │ │ ├── conformance_resumable_tasks.cpp
│ │ │ ├── conformance_sequencer_node.cpp
│ │ │ ├── conformance_split_node.cpp
│ │ │ ├── conformance_task_arena.cpp
│ │ │ ├── conformance_task_group.cpp
│ │ │ ├── conformance_task_group_context.cpp
│ │ │ ├── conformance_tick_count.cpp
│ │ │ ├── conformance_version.cpp
│ │ │ └── conformance_write_once_node.cpp
│ │ ├── tbb/
│ │ │ ├── test_adaptive_mutex.cpp
│ │ │ ├── test_allocators.cpp
│ │ │ ├── test_arena_constraints.cpp
│ │ │ ├── test_arena_priorities.cpp
│ │ │ ├── test_async_node.cpp
│ │ │ ├── test_blocked_range.cpp
│ │ │ ├── test_broadcast_node.cpp
│ │ │ ├── test_buffer_node.cpp
│ │ │ ├── test_buffering_try_put_and_wait.h
│ │ │ ├── test_collaborative_call_once.cpp
│ │ │ ├── test_composite_node.cpp
│ │ │ ├── test_concurrent_hash_map.cpp
│ │ │ ├── test_concurrent_lru_cache.cpp
│ │ │ ├── test_concurrent_map.cpp
│ │ │ ├── test_concurrent_monitor.cpp
│ │ │ ├── test_concurrent_priority_queue.cpp
│ │ │ ├── test_concurrent_queue.cpp
│ │ │ ├── test_concurrent_queue_whitebox.cpp
│ │ │ ├── test_concurrent_set.cpp
│ │ │ ├── test_concurrent_unordered_map.cpp
│ │ │ ├── test_concurrent_unordered_set.cpp
│ │ │ ├── test_concurrent_vector.cpp
│ │ │ ├── test_continue_node.cpp
│ │ │ ├── test_dynamic_link.cpp
│ │ │ ├── test_eh_algorithms.cpp
│ │ │ ├── test_eh_flow_graph.cpp
│ │ │ ├── test_eh_thread.cpp
│ │ │ ├── test_enumerable_thread_specific.cpp
│ │ │ ├── test_environment_whitebox.cpp
│ │ │ ├── test_flow_graph.cpp
│ │ │ ├── test_flow_graph_priorities.cpp
│ │ │ ├── test_flow_graph_whitebox.cpp
│ │ │ ├── test_function_node.cpp
│ │ │ ├── test_fuzzing.cpp
│ │ │ ├── test_global_control.cpp
│ │ │ ├── test_handle_perror.cpp
│ │ │ ├── test_hw_concurrency.cpp
│ │ │ ├── test_implicit_linkage_on_windows.cpp
│ │ │ ├── test_indexer_node.cpp
│ │ │ ├── test_input_node.cpp
│ │ │ ├── test_intrusive_list.cpp
│ │ │ ├── test_join_node.cpp
│ │ │ ├── test_join_node.h
│ │ │ ├── test_join_node_key_matching.cpp
│ │ │ ├── test_join_node_key_matching_n_args.cpp
│ │ │ ├── test_join_node_msg_key_matching.cpp
│ │ │ ├── test_join_node_msg_key_matching_n_args.cpp
│ │ │ ├── test_join_node_preview.cpp
│ │ │ ├── test_limiter_node.cpp
│ │ │ ├── test_multifunction_node.cpp
│ │ │ ├── test_mutex.cpp
│ │ │ ├── test_mutex.h
│ │ │ ├── test_numa_dist.cpp
│ │ │ ├── test_openmp.cpp
│ │ │ ├── test_overwrite_node.cpp
│ │ │ ├── test_parallel_for.cpp
│ │ │ ├── test_parallel_for_each.cpp
│ │ │ ├── test_parallel_invoke.cpp
│ │ │ ├── test_parallel_phase.cpp
│ │ │ ├── test_parallel_pipeline.cpp
│ │ │ ├── test_parallel_reduce.cpp
│ │ │ ├── test_parallel_scan.cpp
│ │ │ ├── test_parallel_sort.cpp
│ │ │ ├── test_partitioner.cpp
│ │ │ ├── test_partitioner.h
│ │ │ ├── test_priority_queue_node.cpp
│ │ │ ├── test_profiling.cpp
│ │ │ ├── test_queue_node.cpp
│ │ │ ├── test_resumable_tasks.cpp
│ │ │ ├── test_scheduler_mix.cpp
│ │ │ ├── test_semaphore.cpp
│ │ │ ├── test_sequencer_node.cpp
│ │ │ ├── test_split_node.cpp
│ │ │ ├── test_tagged_msg.cpp
│ │ │ ├── test_task.cpp
│ │ │ ├── test_task_arena.cpp
│ │ │ ├── test_task_group.cpp
│ │ │ ├── test_tbb_fork.cpp
│ │ │ ├── test_tbb_header.cpp
│ │ │ ├── test_tbb_header_secondary.cpp
│ │ │ ├── test_tick_count.cpp
│ │ │ └── test_write_once_node.cpp
│ │ └── tbbmalloc/
│ │ ├── test_malloc_atexit.cpp
│ │ ├── test_malloc_compliance.cpp
│ │ ├── test_malloc_init_shutdown.cpp
│ │ ├── test_malloc_lib_unload.cpp
│ │ ├── test_malloc_new_handler.cpp
│ │ ├── test_malloc_overload.cpp
│ │ ├── test_malloc_overload_disable.cpp
│ │ ├── test_malloc_pools.cpp
│ │ ├── test_malloc_pure_c.c
│ │ ├── test_malloc_regression.cpp
│ │ ├── test_malloc_shutdown_hang.cpp
│ │ ├── test_malloc_used_by_lib.cpp
│ │ ├── test_malloc_whitebox.cpp
│ │ └── test_scalable_allocator.cpp
│ └── third-party-programs.txt
├── xxhash/
│ ├── .gitattributes
│ ├── .github/
│ │ ├── dependabot.yml
│ │ └── workflows/
│ │ ├── ci.yml
│ │ └── scorecard.yml
│ ├── .gitignore
│ ├── CHANGELOG
│ ├── Doxyfile
│ ├── Doxyfile-internal
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── SECURITY.md
│ ├── appveyor.yml
│ ├── cli/
│ │ ├── .tipi/
│ │ │ ├── deps
│ │ │ └── opts
│ │ ├── COPYING
│ │ ├── README.md
│ │ ├── xsum_arch.c
│ │ ├── xsum_arch.h
│ │ ├── xsum_bench.c
│ │ ├── xsum_bench.h
│ │ ├── xsum_config.h
│ │ ├── xsum_os_specific.c
│ │ ├── xsum_os_specific.h
│ │ ├── xsum_output.c
│ │ ├── xsum_output.h
│ │ ├── xsum_sanity_check.c
│ │ ├── xsum_sanity_check.h
│ │ ├── xxhsum.1
│ │ ├── xxhsum.1.md
│ │ └── xxhsum.c
│ ├── clib.json
│ ├── cmake_unofficial/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── JoinPaths.cmake
│ │ ├── README.md
│ │ └── xxHashConfig.cmake.in
│ ├── doc/
│ │ ├── README.md
│ │ ├── xxhash.cry
│ │ └── xxhash_spec.md
│ ├── fuzz/
│ │ └── fuzzer.c
│ ├── libxxhash.pc.in
│ ├── tests/
│ │ ├── Makefile
│ │ ├── cli-comment-line.sh
│ │ ├── cli-ignore-missing.sh
│ │ ├── collisions/
│ │ │ ├── .gitignore
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── allcodecs/
│ │ │ │ ├── README.md
│ │ │ │ ├── dummy.c
│ │ │ │ └── dummy.h
│ │ │ ├── hashes.h
│ │ │ ├── main.c
│ │ │ ├── pool.c
│ │ │ ├── pool.h
│ │ │ ├── sort.cc
│ │ │ ├── sort.hh
│ │ │ ├── threading.c
│ │ │ └── threading.h
│ │ ├── filename-escape.sh
│ │ ├── generate_unicode_test.c
│ │ ├── multiInclude.c
│ │ ├── ppc_define.c
│ │ ├── sanity_test.c
│ │ ├── sanity_test_vectors.h
│ │ ├── sanity_test_vectors_generator.c
│ │ └── unicode_lint.sh
│ ├── xxh3.h
│ ├── xxh_x86dispatch.c
│ ├── xxh_x86dispatch.h
│ ├── xxhash.c
│ └── xxhash.h
├── zlib/
│ ├── CMakeFiles/
│ │ ├── zlib.dir/
│ │ │ └── build.make
│ │ └── zlibstatic.dir/
│ │ └── build.make
│ ├── CMakeLists.txt
│ ├── ChangeLog
│ ├── FAQ
│ ├── INDEX
│ ├── LICENSE
│ ├── Makefile
│ ├── Makefile.in
│ ├── README
│ ├── adler32.c
│ ├── amiga/
│ │ ├── Makefile.pup
│ │ └── Makefile.sas
│ ├── compress.c
│ ├── configure
│ ├── contrib/
│ │ ├── README.contrib
│ │ ├── ada/
│ │ │ ├── buffer_demo.adb
│ │ │ ├── mtest.adb
│ │ │ ├── read.adb
│ │ │ ├── readme.txt
│ │ │ ├── test.adb
│ │ │ ├── zlib-streams.adb
│ │ │ ├── zlib-streams.ads
│ │ │ ├── zlib-thin.adb
│ │ │ ├── zlib-thin.ads
│ │ │ ├── zlib.adb
│ │ │ ├── zlib.ads
│ │ │ └── zlib.gpr
│ │ ├── blast/
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── blast.c
│ │ │ ├── blast.h
│ │ │ ├── test.pk
│ │ │ └── test.txt
│ │ ├── delphi/
│ │ │ ├── ZLib.pas
│ │ │ ├── ZLibConst.pas
│ │ │ ├── readme.txt
│ │ │ └── zlibd32.mak
│ │ ├── dotzlib/
│ │ │ ├── DotZLib/
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── ChecksumImpl.cs
│ │ │ │ ├── CircularBuffer.cs
│ │ │ │ ├── CodecBase.cs
│ │ │ │ ├── Deflater.cs
│ │ │ │ ├── DotZLib.cs
│ │ │ │ ├── DotZLib.csproj
│ │ │ │ ├── GZipStream.cs
│ │ │ │ ├── Inflater.cs
│ │ │ │ └── UnitTests.cs
│ │ │ ├── DotZLib.build
│ │ │ ├── DotZLib.chm
│ │ │ ├── DotZLib.sln
│ │ │ ├── LICENSE_1_0.txt
│ │ │ └── readme.txt
│ │ ├── gcc_gvmat64/
│ │ │ └── gvmat64.S
│ │ ├── infback9/
│ │ │ ├── README
│ │ │ ├── infback9.c
│ │ │ ├── infback9.h
│ │ │ ├── inffix9.h
│ │ │ ├── inflate9.h
│ │ │ ├── inftree9.c
│ │ │ └── inftree9.h
│ │ ├── iostream/
│ │ │ ├── test.cpp
│ │ │ ├── zfstream.cpp
│ │ │ └── zfstream.h
│ │ ├── iostream2/
│ │ │ ├── zstream.h
│ │ │ └── zstream_test.cpp
│ │ ├── iostream3/
│ │ │ ├── README
│ │ │ ├── TODO
│ │ │ ├── test.cc
│ │ │ ├── zfstream.cc
│ │ │ └── zfstream.h
│ │ ├── minizip/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.am
│ │ │ ├── MiniZip64_Changes.txt
│ │ │ ├── MiniZip64_info.txt
│ │ │ ├── configure.ac
│ │ │ ├── crypt.h
│ │ │ ├── ioapi.c
│ │ │ ├── ioapi.h
│ │ │ ├── iowin32.c
│ │ │ ├── iowin32.h
│ │ │ ├── make_vms.com
│ │ │ ├── miniunz.c
│ │ │ ├── miniunzip.1
│ │ │ ├── minizip.1
│ │ │ ├── minizip.c
│ │ │ ├── minizip.pc.in
│ │ │ ├── mztools.c
│ │ │ ├── mztools.h
│ │ │ ├── unzip.c
│ │ │ ├── unzip.h
│ │ │ ├── zip.c
│ │ │ └── zip.h
│ │ ├── nuget/
│ │ │ ├── nuget.csproj
│ │ │ └── nuget.sln
│ │ ├── pascal/
│ │ │ ├── example.pas
│ │ │ ├── readme.txt
│ │ │ ├── zlibd32.mak
│ │ │ └── zlibpas.pas
│ │ ├── puff/
│ │ │ ├── Makefile
│ │ │ ├── README
│ │ │ ├── puff.c
│ │ │ ├── puff.h
│ │ │ ├── pufftest.c
│ │ │ └── zeros.raw
│ │ ├── testzlib/
│ │ │ ├── testzlib.c
│ │ │ └── testzlib.txt
│ │ ├── untgz/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.msc
│ │ │ └── untgz.c
│ │ └── vstudio/
│ │ ├── readme.txt
│ │ ├── vc10/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── miniunz.vcxproj.filters
│ │ │ ├── minizip.vcxproj
│ │ │ ├── minizip.vcxproj.filters
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlib.vcxproj.filters
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── testzlibdll.vcxproj.filters
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibstat.vcxproj.filters
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ ├── zlibvc.vcxproj
│ │ │ └── zlibvc.vcxproj.filters
│ │ ├── vc11/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc12/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc14/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ ├── vc17/
│ │ │ ├── miniunz.vcxproj
│ │ │ ├── minizip.vcxproj
│ │ │ ├── testzlib.vcxproj
│ │ │ ├── testzlibdll.vcxproj
│ │ │ ├── zlib.rc
│ │ │ ├── zlibstat.vcxproj
│ │ │ ├── zlibvc.def
│ │ │ ├── zlibvc.sln
│ │ │ └── zlibvc.vcxproj
│ │ └── vc9/
│ │ ├── miniunz.vcproj
│ │ ├── minizip.vcproj
│ │ ├── testzlib.vcproj
│ │ ├── testzlibdll.vcproj
│ │ ├── zlib.rc
│ │ ├── zlibstat.vcproj
│ │ ├── zlibvc.def
│ │ ├── zlibvc.sln
│ │ └── zlibvc.vcproj
│ ├── crc32.c
│ ├── crc32.h
│ ├── deflate.c
│ ├── deflate.h
│ ├── doc/
│ │ ├── algorithm.txt
│ │ ├── rfc1950.txt
│ │ ├── rfc1951.txt
│ │ ├── rfc1952.txt
│ │ └── txtvsbin.txt
│ ├── examples/
│ │ ├── README.examples
│ │ ├── enough.c
│ │ ├── fitblk.c
│ │ ├── gun.c
│ │ ├── gzappend.c
│ │ ├── gzjoin.c
│ │ ├── gzlog.c
│ │ ├── gzlog.h
│ │ ├── gznorm.c
│ │ ├── zlib_how.html
│ │ ├── zpipe.c
│ │ ├── zran.c
│ │ └── zran.h
│ ├── gzclose.c
│ ├── gzguts.h
│ ├── gzlib.c
│ ├── gzread.c
│ ├── gzwrite.c
│ ├── infback.c
│ ├── inffast.c
│ ├── inffast.h
│ ├── inffixed.h
│ ├── inflate.c
│ ├── inflate.h
│ ├── inftrees.c
│ ├── inftrees.h
│ ├── make_vms.com
│ ├── msdos/
│ │ ├── Makefile.bor
│ │ ├── Makefile.dj2
│ │ ├── Makefile.emx
│ │ ├── Makefile.msc
│ │ └── Makefile.tc
│ ├── nintendods/
│ │ ├── Makefile
│ │ └── README
│ ├── old/
│ │ ├── Makefile.emx
│ │ ├── Makefile.riscos
│ │ ├── README
│ │ ├── descrip.mms
│ │ ├── os2/
│ │ │ ├── Makefile.os2
│ │ │ └── zlib.def
│ │ └── visual-basic.txt
│ ├── os400/
│ │ ├── README400
│ │ ├── bndsrc
│ │ ├── make.sh
│ │ └── zlib.inc
│ ├── qnx/
│ │ └── package.qpg
│ ├── test/
│ │ ├── example.c
│ │ ├── infcover.c
│ │ └── minigzip.c
│ ├── treebuild.xml
│ ├── trees.c
│ ├── trees.h
│ ├── uncompr.c
│ ├── watcom/
│ │ ├── watcom_f.mak
│ │ └── watcom_l.mak
│ ├── win32/
│ │ ├── DLL_FAQ.txt
│ │ ├── Makefile.bor
│ │ ├── Makefile.gcc
│ │ ├── Makefile.msc
│ │ ├── README-WIN32.txt
│ │ ├── VisualC.txt
│ │ ├── zlib.def
│ │ └── zlib1.rc
│ ├── zconf.h.cmakein
│ ├── zconf.h.in
│ ├── zconf.h.included
│ ├── zlib.3
│ ├── zlib.h
│ ├── zlib.pc.cmakein
│ ├── zlib.pc.in
│ ├── zutil.c
│ └── zutil.h
└── zstd/
├── .buckconfig
├── .buckversion
├── .cirrus.yml
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── android-ndk-build.yml
│ ├── commit.yml
│ ├── dev-long-tests.yml
│ ├── dev-short-tests.yml
│ ├── nightly.yml
│ ├── publish-release-artifacts.yml
│ ├── scorecards.yml
│ └── windows-artifacts.yml
├── .gitignore
├── CHANGELOG
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── COPYING
├── LICENSE
├── Makefile
├── Package.swift
├── README.md
├── SECURITY.md
├── TESTING.md
├── contrib/
│ ├── VS2005/
│ │ ├── README.md
│ │ ├── fullbench/
│ │ │ └── fullbench.vcproj
│ │ ├── fuzzer/
│ │ │ └── fuzzer.vcproj
│ │ ├── zstd/
│ │ │ └── zstd.vcproj
│ │ ├── zstd.sln
│ │ └── zstdlib/
│ │ └── zstdlib.vcproj
│ ├── cleanTabs
│ ├── diagnose_corruption/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ └── check_flipped_bits.c
│ ├── docker/
│ │ ├── Dockerfile
│ │ └── README.md
│ ├── freestanding_lib/
│ │ └── freestanding.py
│ ├── linux-kernel/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── btrfs-benchmark.sh
│ │ ├── btrfs-extract-benchmark.sh
│ │ ├── decompress_sources.h
│ │ ├── linux.mk
│ │ ├── linux_zstd.h
│ │ ├── mem.h
│ │ ├── squashfs-benchmark.sh
│ │ ├── test/
│ │ │ ├── Makefile
│ │ │ ├── include/
│ │ │ │ └── linux/
│ │ │ │ ├── compiler.h
│ │ │ │ ├── errno.h
│ │ │ │ ├── kernel.h
│ │ │ │ ├── limits.h
│ │ │ │ ├── math64.h
│ │ │ │ ├── module.h
│ │ │ │ ├── printk.h
│ │ │ │ ├── stddef.h
│ │ │ │ ├── swab.h
│ │ │ │ ├── types.h
│ │ │ │ ├── unaligned.h
│ │ │ │ └── xxhash.h
│ │ │ ├── macro-test.sh
│ │ │ ├── static_test.c
│ │ │ └── test.c
│ │ ├── zstd_common_module.c
│ │ ├── zstd_compress_module.c
│ │ ├── zstd_decompress_module.c
│ │ └── zstd_deps.h
│ ├── match_finders/
│ │ ├── README.md
│ │ ├── zstd_edist.c
│ │ └── zstd_edist.h
│ ├── premake/
│ │ ├── premake4.lua
│ │ └── zstd.lua
│ ├── recovery/
│ │ ├── Makefile
│ │ └── recover_directory.c
│ ├── seekable_format/
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ ├── parallel_compression.c
│ │ │ ├── parallel_processing.c
│ │ │ ├── seekable_compression.c
│ │ │ ├── seekable_decompression.c
│ │ │ └── seekable_decompression_mem.c
│ │ ├── tests/
│ │ │ ├── .gitignore
│ │ │ ├── Makefile
│ │ │ └── seekable_tests.c
│ │ ├── zstd_seekable.h
│ │ ├── zstd_seekable_compression_format.md
│ │ ├── zstdseek_compress.c
│ │ └── zstdseek_decompress.c
│ ├── seqBench/
│ │ ├── Makefile
│ │ └── seqBench.c
│ └── snap/
│ └── snapcraft.yaml
├── doc/
│ ├── README.md
│ ├── decompressor_errata.md
│ ├── decompressor_permissive.md
│ ├── educational_decoder/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── harness.c
│ │ ├── zstd_decompress.c
│ │ └── zstd_decompress.h
│ ├── zstd_compression_format.md
│ └── zstd_manual.html
├── examples/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common.h
│ ├── dictionary_compression.c
│ ├── dictionary_decompression.c
│ ├── multiple_simple_compression.c
│ ├── multiple_streaming_compression.c
│ ├── simple_compression.c
│ ├── simple_decompression.c
│ ├── streaming_compression.c
│ ├── streaming_compression_thread_pool.c
│ ├── streaming_decompression.c
│ └── streaming_memory_usage.c
├── lib/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── common/
│ │ ├── allocations.h
│ │ ├── bits.h
│ │ ├── bitstream.h
│ │ ├── compiler.h
│ │ ├── cpu.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── entropy_common.c
│ │ ├── error_private.c
│ │ ├── error_private.h
│ │ ├── fse.h
│ │ ├── fse_decompress.c
│ │ ├── huf.h
│ │ ├── mem.h
│ │ ├── pool.c
│ │ ├── pool.h
│ │ ├── portability_macros.h
│ │ ├── threading.c
│ │ ├── threading.h
│ │ ├── xxhash.c
│ │ ├── xxhash.h
│ │ ├── zstd_common.c
│ │ ├── zstd_deps.h
│ │ ├── zstd_internal.h
│ │ └── zstd_trace.h
│ ├── compress/
│ │ ├── clevels.h
│ │ ├── fse_compress.c
│ │ ├── hist.c
│ │ ├── hist.h
│ │ ├── huf_compress.c
│ │ ├── zstd_compress.c
│ │ ├── zstd_compress_internal.h
│ │ ├── zstd_compress_literals.c
│ │ ├── zstd_compress_literals.h
│ │ ├── zstd_compress_sequences.c
│ │ ├── zstd_compress_sequences.h
│ │ ├── zstd_compress_superblock.c
│ │ ├── zstd_compress_superblock.h
│ │ ├── zstd_cwksp.h
│ │ ├── zstd_double_fast.c
│ │ ├── zstd_double_fast.h
│ │ ├── zstd_fast.c
│ │ ├── zstd_fast.h
│ │ ├── zstd_lazy.c
│ │ ├── zstd_lazy.h
│ │ ├── zstd_ldm.c
│ │ ├── zstd_ldm.h
│ │ ├── zstd_ldm_geartab.h
│ │ ├── zstd_opt.c
│ │ ├── zstd_opt.h
│ │ ├── zstd_preSplit.c
│ │ ├── zstd_preSplit.h
│ │ ├── zstdmt_compress.c
│ │ └── zstdmt_compress.h
│ ├── decompress/
│ │ ├── huf_decompress.c
│ │ ├── huf_decompress_amd64.S
│ │ ├── zstd_ddict.c
│ │ ├── zstd_ddict.h
│ │ ├── zstd_decompress.c
│ │ ├── zstd_decompress_block.c
│ │ ├── zstd_decompress_block.h
│ │ └── zstd_decompress_internal.h
│ ├── deprecated/
│ │ ├── zbuff.h
│ │ ├── zbuff_common.c
│ │ ├── zbuff_compress.c
│ │ └── zbuff_decompress.c
│ ├── dictBuilder/
│ │ ├── cover.c
│ │ ├── cover.h
│ │ ├── divsufsort.c
│ │ ├── divsufsort.h
│ │ ├── fastcover.c
│ │ └── zdict.c
│ ├── dll/
│ │ └── example/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── build_package.bat
│ │ ├── fullbench-dll.sln
│ │ └── fullbench-dll.vcxproj
│ ├── legacy/
│ │ ├── zstd_legacy.h
│ │ ├── zstd_v01.c
│ │ ├── zstd_v01.h
│ │ ├── zstd_v02.c
│ │ ├── zstd_v02.h
│ │ ├── zstd_v03.c
│ │ ├── zstd_v03.h
│ │ ├── zstd_v04.c
│ │ ├── zstd_v04.h
│ │ ├── zstd_v05.c
│ │ ├── zstd_v05.h
│ │ ├── zstd_v06.c
│ │ ├── zstd_v06.h
│ │ ├── zstd_v07.c
│ │ └── zstd_v07.h
│ ├── libzstd.mk
│ ├── libzstd.pc.in
│ ├── module.modulemap
│ ├── zdict.h
│ ├── zstd.h
│ └── zstd_errors.h
├── tests/
│ ├── .gitignore
│ ├── DEPRECATED-test-zstd-speed.py
│ ├── Makefile
│ ├── README.md
│ ├── automated_benchmarking.py
│ ├── bigdict.c
│ ├── checkTag.c
│ ├── check_size.py
│ ├── cli-tests/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── basic/
│ │ │ ├── args.sh
│ │ │ ├── args.sh.exit
│ │ │ ├── args.sh.stderr.glob
│ │ │ ├── help.sh
│ │ │ ├── help.sh.stdout.glob
│ │ │ ├── memlimit.sh
│ │ │ ├── memlimit.sh.stderr.exact
│ │ │ ├── memlimit.sh.stdout.exact
│ │ │ ├── output_dir.sh
│ │ │ ├── output_dir.sh.stderr.exact
│ │ │ ├── output_dir.sh.stdout.exact
│ │ │ ├── version.sh
│ │ │ └── version.sh.stdout.glob
│ │ ├── bin/
│ │ │ ├── cmp_size
│ │ │ ├── datagen
│ │ │ ├── die
│ │ │ ├── println
│ │ │ ├── zstd
│ │ │ ├── zstdgrep
│ │ │ └── zstdless
│ │ ├── cltools/
│ │ │ ├── setup
│ │ │ ├── zstdgrep.sh
│ │ │ ├── zstdgrep.sh.exit
│ │ │ ├── zstdgrep.sh.stderr.exact
│ │ │ ├── zstdgrep.sh.stdout.glob
│ │ │ ├── zstdless.sh
│ │ │ ├── zstdless.sh.stderr.exact
│ │ │ └── zstdless.sh.stdout.glob
│ │ ├── common/
│ │ │ ├── format.sh
│ │ │ ├── mtime.sh
│ │ │ ├── permissions.sh
│ │ │ └── platform.sh
│ │ ├── compression/
│ │ │ ├── adapt.sh
│ │ │ ├── basic.sh
│ │ │ ├── compress-literals.sh
│ │ │ ├── format.sh
│ │ │ ├── golden.sh
│ │ │ ├── gzip-compat.sh
│ │ │ ├── levels.sh
│ │ │ ├── levels.sh.stderr.exact
│ │ │ ├── long-distance-matcher.sh
│ │ │ ├── multi-threaded.sh
│ │ │ ├── multi-threaded.sh.stderr.exact
│ │ │ ├── multiple-files.sh
│ │ │ ├── multiple-files.sh.stdout.exact
│ │ │ ├── row-match-finder.sh
│ │ │ ├── setup
│ │ │ ├── stream-size.sh
│ │ │ ├── verbose-wlog.sh
│ │ │ ├── verbose-wlog.sh.stderr.glob
│ │ │ ├── verbose-wlog.sh.stdout.glob
│ │ │ ├── window-resize.sh
│ │ │ ├── window-resize.sh.stderr.ignore
│ │ │ └── window-resize.sh.stdout.glob
│ │ ├── decompression/
│ │ │ ├── detectErrors.sh
│ │ │ ├── golden.sh
│ │ │ ├── pass-through.sh
│ │ │ ├── pass-through.sh.stderr.exact
│ │ │ └── pass-through.sh.stdout.exact
│ │ ├── dict-builder/
│ │ │ ├── empty-input.sh
│ │ │ ├── empty-input.sh.stderr.exact
│ │ │ ├── no-inputs.sh
│ │ │ ├── no-inputs.sh.exit
│ │ │ └── no-inputs.sh.stderr.exact
│ │ ├── dictionaries/
│ │ │ ├── dictionary-mismatch.sh
│ │ │ ├── dictionary-mismatch.sh.stderr.exact
│ │ │ ├── golden.sh
│ │ │ ├── setup
│ │ │ └── setup_once
│ │ ├── file-handling/
│ │ │ ├── directory-mirror.sh
│ │ │ ├── directory-mirror.sh.stderr.exact
│ │ │ └── directory-mirror.sh.stdout.exact
│ │ ├── file-stat/
│ │ │ ├── compress-file-to-dir-without-write-perm.sh
│ │ │ ├── compress-file-to-dir-without-write-perm.sh.stderr.exact
│ │ │ ├── compress-file-to-file.sh
│ │ │ ├── compress-file-to-file.sh.stderr.exact
│ │ │ ├── compress-file-to-stdout.sh
│ │ │ ├── compress-file-to-stdout.sh.stderr.exact
│ │ │ ├── compress-stdin-to-file.sh
│ │ │ ├── compress-stdin-to-file.sh.stderr.exact
│ │ │ ├── compress-stdin-to-stdout.sh
│ │ │ ├── compress-stdin-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-file-to-file.sh
│ │ │ ├── decompress-file-to-file.sh.stderr.exact
│ │ │ ├── decompress-file-to-stdout.sh
│ │ │ ├── decompress-file-to-stdout.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-file.sh
│ │ │ ├── decompress-stdin-to-file.sh.stderr.exact
│ │ │ ├── decompress-stdin-to-stdout.sh
│ │ │ └── decompress-stdin-to-stdout.sh.stderr.exact
│ │ ├── progress/
│ │ │ ├── no-progress.sh
│ │ │ ├── no-progress.sh.stderr.glob
│ │ │ ├── progress.sh
│ │ │ └── progress.sh.stderr.glob
│ │ ├── run.py
│ │ └── zstd-symlinks/
│ │ ├── setup
│ │ ├── zstdcat.sh
│ │ └── zstdcat.sh.stdout.exact
│ ├── datagencli.c
│ ├── decodecorpus.c
│ ├── dict-files/
│ │ └── zero-weight-dict
│ ├── external_matchfinder.c
│ ├── external_matchfinder.h
│ ├── fullbench.c
│ ├── fuzz/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── block_decompress.c
│ │ ├── block_round_trip.c
│ │ ├── decompress_cross_format.c
│ │ ├── decompress_dstSize_tooSmall.c
│ │ ├── dictionary_decompress.c
│ │ ├── dictionary_loader.c
│ │ ├── dictionary_round_trip.c
│ │ ├── dictionary_stream_round_trip.c
│ │ ├── fse_read_ncount.c
│ │ ├── fuzz.h
│ │ ├── fuzz.py
│ │ ├── fuzz_data_producer.c
│ │ ├── fuzz_data_producer.h
│ │ ├── fuzz_helpers.c
│ │ ├── fuzz_helpers.h
│ │ ├── fuzz_third_party_seq_prod.h
│ │ ├── generate_sequences.c
│ │ ├── huf_decompress.c
│ │ ├── huf_round_trip.c
│ │ ├── raw_dictionary_round_trip.c
│ │ ├── regression_driver.c
│ │ ├── seekable_roundtrip.c
│ │ ├── seq_prod_fuzz_example/
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ └── example_seq_prod.c
│ │ ├── sequence_compression_api.c
│ │ ├── simple_compress.c
│ │ ├── simple_decompress.c
│ │ ├── simple_round_trip.c
│ │ ├── stream_decompress.c
│ │ ├── stream_round_trip.c
│ │ ├── zstd_frame_info.c
│ │ ├── zstd_helpers.c
│ │ └── zstd_helpers.h
│ ├── fuzzer.c
│ ├── golden-compression/
│ │ ├── PR-3517-block-splitter-corruption-test
│ │ ├── http
│ │ ├── huffman-compressed-larger
│ │ └── large-literal-and-match-lengths
│ ├── golden-decompression-errors/
│ │ ├── .gitignore
│ │ ├── off0.bin.zst
│ │ ├── truncated_huff_state.zst
│ │ └── zeroSeq_extraneous.zst
│ ├── golden-dictionaries/
│ │ └── http-dict-missing-symbols
│ ├── gzip/
│ │ ├── Makefile
│ │ ├── gzip-env.sh
│ │ ├── helin-segv.sh
│ │ ├── help-version.sh
│ │ ├── hufts.sh
│ │ ├── init.cfg
│ │ ├── init.sh
│ │ ├── keep.sh
│ │ ├── list.sh
│ │ ├── memcpy-abuse.sh
│ │ ├── mixed.sh
│ │ ├── null-suffix-clobber.sh
│ │ ├── stdin.sh
│ │ ├── test-driver.sh
│ │ ├── trailing-nul.sh
│ │ ├── unpack-invalid.sh
│ │ ├── z-suffix.sh
│ │ ├── zdiff.sh
│ │ ├── zgrep-context.sh
│ │ ├── zgrep-f.sh
│ │ ├── zgrep-signal.sh
│ │ └── znew-k.sh
│ ├── invalidDictionaries.c
│ ├── largeDictionary.c
│ ├── legacy.c
│ ├── libzstd_builds.sh
│ ├── longmatch.c
│ ├── loremOut.c
│ ├── loremOut.h
│ ├── paramgrill.c
│ ├── playTests.sh
│ ├── poolTests.c
│ ├── rateLimiter.py
│ ├── regression/
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── data.c
│ │ ├── data.h
│ │ ├── levels.h
│ │ ├── method.c
│ │ ├── method.h
│ │ ├── result.c
│ │ ├── result.h
│ │ ├── results.csv
│ │ └── test.c
│ ├── roundTripCrash.c
│ ├── seqgen.c
│ ├── seqgen.h
│ ├── test-license.py
│ ├── test-variants.sh
│ ├── test-zstd-versions.py
│ └── zstreamtest.c
└── zlibWrapper/
├── .gitignore
├── Makefile
├── README.md
├── examples/
│ ├── example.c
│ ├── example_original.c
│ ├── fitblk.c
│ ├── fitblk_original.c
│ ├── minigzip.c
│ └── zwrapbench.c
├── gzclose.c
├── gzcompatibility.h
├── gzguts.h
├── gzlib.c
├── gzread.c
├── gzwrite.c
├── zstd_zlibwrapper.c
└── zstd_zlibwrapper.h
Showing preview only (887K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (9680 symbols across 668 files)
FILE: lib/aho-corasick.cc
type mold (line 22) | namespace mold {
function i64 (line 32) | i64 AhoCorasick::find(std::string_view str) {
FILE: lib/atomics.h
function namespace (line 8) | namespace mold {
function T (line 34) | T exchange(T val) { return std::atomic<T>::exchange(val, relaxed); }
function T (line 35) | T operator|=(T val) { return std::atomic<T>::fetch_or(val, relaxed); }
FILE: lib/bitvector.h
function namespace (line 8) | namespace mold {
function class (line 36) | class Bitvector {
function resize (line 41) | void resize(i64 n) {
FILE: lib/compress.cc
type mold (line 29) | namespace mold {
function split (line 38) | static std::vector<std::span<u8>> split(std::span<u8> input) {
function zlib_compress (line 48) | static std::span<u8> zlib_compress(std::span<u8> input) {
function zstd_compress (line 142) | static std::span<u8> zstd_compress(std::span<u8> input) {
FILE: lib/crc32.cc
type mold (line 6) | namespace mold {
function crc32_solve (line 13) | std::vector<u8> crc32_solve(u32 current, u32 desired) {
function u32 (line 34) | u32 compute_crc32(u32 crc, u8 *buf, i64 len) {
FILE: lib/demangle.cc
type mold (line 11) | namespace mold {
function demangle_cpp (line 13) | std::optional<std::string_view> demangle_cpp(std::string_view name) {
function demangle_rust (line 33) | std::optional<std::string_view> demangle_rust(std::string_view name) {
FILE: lib/filepath.cc
type mold (line 14) | namespace mold {
function get_self_path (line 17) | std::string get_self_path() {
FILE: lib/glob.cc
type mold (line 69) | namespace mold {
function parse_glob (line 71) | static std::vector<MultiGlob::State> parse_glob(std::string_view pat) {
function i64 (line 202) | i64 MultiGlob::find(std::string_view str) {
function i64 (line 242) | i64 Glob::find(std::string_view str) {
FILE: lib/hyperloglog.cc
type mold (line 11) | namespace mold {
function i64 (line 13) | i64 HyperLogLog::get_cardinality() const {
FILE: lib/integers.h
function namespace (line 43) | namespace mold {
function T (line 87) | static T bswap(T v) {
FILE: lib/lib.h
function hash_string (line 47) | inline uint64_t hash_string(std::string_view str) {
function class (line 51) | class HashCmp {
function namespace (line 62) | namespace mold {
type TimerRecord (line 112) | struct TimerRecord {
function stop (line 143) | void stop() {
function has_single_bit (line 156) | inline bool has_single_bit(u64 val) {
function u64 (line 161) | inline u64 bit_ceil(u64 val) {
function u64 (line 167) | inline u64 align_to(u64 val, u64 align) {
function u64 (line 174) | inline u64 align_down(u64 val, u64 align) {
function u64 (line 179) | inline u64 bit(u64 val, i64 pos) {
function u64 (line 184) | inline u64 bits(u64 val, u64 hi, u64 lo) {
function i64 (line 190) | inline i64 sign_extend(u64 val, i64 n) {
function is_int (line 194) | inline bool is_int(u64 val, i64 n) {
type alignas (line 387) | struct alignas
function resize (line 393) | void resize(i64 nbuckets) {
function i64 (line 458) | i64 get_idx(T *value) const {
function class (line 531) | class HyperLogLog {
function i64 (line 537) | i64 get_cardinality() const;
function class (line 582) | class MultiGlob {
function class (line 606) | class Glob {
function std (line 624) | inline std::filesystem::path path_dirname(std::string_view path) {
function std (line 628) | inline std::string path_filename(std::string_view path) {
function std (line 632) | inline std::string path_clean(std::string_view path) {
function class (line 656) | class Compressor {
function class (line 666) | class ZlibCompressor : public Compressor {
function class (line 675) | class ZstdCompressor : public Compressor {
function class (line 690) | class TarWriter {
FILE: lib/perf.cc
type mold (line 13) | namespace mold {
function i64 (line 15) | i64 Counter::get_value() {
function i64 (line 27) | static i64 now_nsec() {
function get_usage (line 31) | static std::pair<i64, i64> get_usage() {
function print_rec (line 73) | static void print_rec(TimerRecord &rec, i64 indent) {
function print_timer_records (line 87) | void print_timer_records(
FILE: lib/random.cc
type mold (line 5) | namespace mold {
function get_random_bytes (line 7) | void get_random_bytes(u8 *buf, i64 size) {
FILE: lib/siphash.h
function update (line 29) | void update(void *msgp, int64_t msglen) {
function finish (line 59) | void finish(void *out) {
function hash (line 74) | static void hash(void *out, void *key, void *in, int inlen) {
function read64 (line 86) | uint64_t read64(void *loc) {
function write64 (line 94) | void write64(void *loc, uint64_t val) {
function bswap (line 100) | uint64_t bswap(uint64_t val) {
function round (line 111) | void round() {
function compress (line 128) | void compress(uint64_t m) {
function finalize (line 135) | void finalize() {
FILE: lib/tar.cc
type mold (line 9) | namespace mold {
type UstarHeader (line 21) | struct UstarHeader {
function finalize (line 43) | static void finalize(UstarHeader &hdr) {
function encode_path (line 60) | static std::string encode_path(std::string basedir, std::string path) {
FILE: src/arch-arm32.cc
type mold (line 41) | namespace mold {
function i64 (line 46) | i64 get_addend(u8 *loc, const ElfRel<E> &rel) {
function write_arm_mov (line 128) | static void write_arm_mov(u8 *loc, u32 val) {
function write_thm_b21 (line 134) | static void write_thm_b21(u8 *loc, u32 val) {
function write_thm_b25 (line 146) | static void write_thm_b25(u8 *loc, u32 val) {
function write_thm_mov (line 160) | static void write_thm_mov(u8 *loc, u32 val) {
function write_addend (line 172) | void write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {
function write_plt_header (line 229) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 253) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 259) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function u64 (line 710) | u64 get_eflags(Context<E> &ctx) {
function u64 (line 750) | static u64 get_text_end(Context<E> &ctx) {
type Entry (line 783) | struct Entry {
function arm32be_swap_bytes (line 871) | void arm32be_swap_bytes(Context<E> &ctx) {
FILE: src/arch-arm64.cc
type mold (line 24) | namespace mold {
function write_adrp (line 28) | static void write_adrp(u8 *buf, u64 val) {
function write_adr (line 32) | static void write_adr(u8 *buf, u64 val) {
function write_movn_movz (line 36) | static void write_movn_movz(u8 *buf, i64 val) {
function u64 (line 45) | static u64 page(u64 val) {
function write_plt_header (line 50) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 72) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 90) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function is_adrp (line 128) | static bool is_adrp(u8 *loc) {
function is_ldr (line 134) | static bool is_ldr(u8 *loc) {
function is_add (line 140) | static bool is_add(u8 *loc) {
class Thunk<E> (line 663) | class Thunk<E>
FILE: src/arch-i386.cc
type mold (line 40) | namespace mold {
function i64 (line 45) | i64 get_addend(u8 *loc, const ElfRel<E> &rel) {
function write_addend (line 75) | void write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {
function write_plt_header (line 110) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 135) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 158) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function u32 (line 195) | static u32 relax_got32x(u8 *loc) {
function relax_gd_to_le (line 203) | static void relax_gd_to_le(u8 *loc, ElfRel<E> rel, u64 val) {
function relax_ld_to_le (line 226) | static void relax_ld_to_le(u8 *loc, ElfRel<E> rel, u64 tls_size) {
function u32 (line 253) | static u32 relax_tlsdesc_to_ie(u8 *loc) {
function u32 (line 267) | static u32 relax_tlsdesc_to_le(u8 *loc) {
FILE: src/arch-loongarch.cc
type mold (line 28) | namespace mold {
function u64 (line 32) | static u64 page(u64 val) {
function u64 (line 36) | static u64 hi20(u64 val, u64 pc) {
function u64 (line 54) | static u64 higher(u64 val, u64 pc) {
function u64 (line 74) | static u64 higher20(u64 val, u64 pc) {
function u64 (line 78) | static u64 highest12(u64 val, u64 pc) {
function write_k12 (line 82) | static void write_k12(u8 *loc, u32 val) {
function write_k16 (line 88) | static void write_k16(u8 *loc, u32 val) {
function write_j20 (line 94) | static void write_j20(u8 *loc, u32 val) {
function write_d5k16 (line 100) | static void write_d5k16(u8 *loc, u32 val) {
function write_d10k16 (line 107) | static void write_d10k16(u8 *loc, u32 val) {
function u32 (line 114) | static u32 get_rd(u32 insn) {
function u32 (line 118) | static u32 get_rj(u32 insn) {
function set_rj (line 122) | static void set_rj(u8 *loc, u32 rj) {
function is_relaxable_got_load (line 133) | static bool is_relaxable_got_load(Context<E> &ctx, InputSection<E> &is...
function shrink_section (line 856) | void shrink_section(Context<E> &ctx, InputSection<E> &isec) {
FILE: src/arch-m68k.cc
type mold (line 21) | namespace mold {
function write_plt_header (line 26) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 39) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 51) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
FILE: src/arch-ppc32.cc
type mold (line 47) | namespace mold {
function u64 (line 51) | static u64 lo(u64 x) { return x & 0xffff; }
function u64 (line 52) | static u64 hi(u64 x) { return x >> 16; }
function u64 (line 53) | static u64 ha(u64 x) { return (x + 0x8000) >> 16; }
function u64 (line 54) | static u64 high(u64 x) { return (x >> 16) & 0xffff; }
function u64 (line 55) | static u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }
function write_plt_header (line 58) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 109) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 120) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
FILE: src/arch-ppc64v1.cc
type mold (line 55) | namespace mold {
function u64 (line 59) | static u64 lo(u64 x) { return x & 0xffff; }
function u64 (line 60) | static u64 hi(u64 x) { return x >> 16; }
function u64 (line 61) | static u64 ha(u64 x) { return (x + 0x8000) >> 16; }
function u64 (line 62) | static u64 high(u64 x) { return (x >> 16) & 0xffff; }
function u64 (line 63) | static u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }
function write_plt_header (line 72) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 96) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 131) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {}
type OpdSymbol (line 506) | struct OpdSymbol {
function ppc64v1_rewrite_opd (line 561) | void ppc64v1_rewrite_opd(Context<E> &ctx) {
function ppc64v1_scan_symbols (line 621) | void ppc64v1_scan_symbols(Context<E> &ctx) {
function i64 (line 646) | i64 PPC64OpdSection::get_reldyn_size(Context<E> &ctx) const {
FILE: src/arch-ppc64v2.cc
type mold (line 87) | namespace mold {
function u64 (line 91) | static u64 lo(u64 x) { return x & 0xffff; }
function u64 (line 92) | static u64 hi(u64 x) { return x >> 16; }
function u64 (line 93) | static u64 ha(u64 x) { return (x + 0x8000) >> 16; }
function u64 (line 94) | static u64 high(u64 x) { return (x >> 16) & 0xffff; }
function u64 (line 95) | static u64 higha(u64 x) { return ((x + 0x8000) >> 16) & 0xffff; }
function write34 (line 97) | static void write34(u8 *loc, u64 x) {
function write_plt_header (line 110) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 142) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 152) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {}
function u64 (line 176) | static u64 get_local_entry_offset(Context<E> &ctx, Symbol<E> &sym) {
function u64 (line 676) | u64 get_eflags(Context<E> &ctx) {
FILE: src/arch-riscv.cc
type mold (line 26) | namespace mold {
function write_itype (line 30) | static void write_itype(u8 *loc, u32 val) {
function write_stype (line 35) | static void write_stype(u8 *loc, u32 val) {
function write_btype (line 40) | static void write_btype(u8 *loc, u32 val) {
function write_utype (line 46) | static void write_utype(u8 *loc, u32 val) {
function write_jtype (line 57) | static void write_jtype(u8 *loc, u32 val) {
function write_citype (line 63) | static void write_citype(u8 *loc, u32 val) {
function write_cbtype (line 68) | static void write_cbtype(u8 *loc, u32 val) {
function write_cjtype (line 75) | static void write_cjtype(u8 *loc, u32 val) {
function set_rs1 (line 83) | static void set_rs1(u8 *loc, u32 rs1) {
function u32 (line 89) | static u32 get_rd(u8 *loc) {
function is_got_load_pair (line 253) | static bool is_got_load_pair(Context<E> &ctx, InputSection<E> &isec,
function u64 (line 815) | u64 get_eflags(Context<E> &ctx) {
function shrink_section (line 841) | void shrink_section(Context<E> &ctx, InputSection<E> &isec) {
type Extn (line 1027) | struct Extn {
function extn_name_less (line 1041) | static bool extn_name_less(std::string_view x, std::string_view y) {
function parse_arch_string (line 1066) | static std::vector<Extn> parse_arch_string(std::string_view str) {
function merge_extensions (line 1085) | static std::vector<Extn> merge_extensions(std::span<Extn> x, std::span...
function to_string (line 1115) | static std::string to_string(std::span<Extn> v) {
FILE: src/arch-s390x.cc
type mold (line 42) | namespace mold {
function write_mid20 (line 46) | static void write_mid20(u8 *loc, u64 val) {
function write_plt_header (line 51) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 79) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 92) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
FILE: src/arch-sh4.cc
type mold (line 65) | namespace mold {
function i64 (line 72) | i64 get_addend(u8 *loc, const ElfRel<E> &rel) {
function write_addend (line 96) | void write_addend(u8 *loc, i64 val, const ElfRel<E> &rel) {
function write_plt_header (line 118) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 151) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 184) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
FILE: src/arch-sparc64.cc
type mold (line 60) | namespace mold {
function write_plt_header (line 77) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 82) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 104) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
FILE: src/arch-x86-64.cc
type mold (line 33) | namespace mold {
function write_plt_header (line 50) | void write_plt_header(Context<E> &ctx, u8 *buf) {
function write_plt_entry (line 68) | void write_plt_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function write_pltgot_entry (line 96) | void write_pltgot_entry(Context<E> &ctx, u8 *buf, Symbol<E> &sym) {
function u32 (line 131) | static u32 relax_gotpcrelx(u8 *loc, const ElfRel<E> &rel) {
function u32 (line 162) | static u32 relax_gottpoff(u8 *loc, const ElfRel<E> &rel) {
function u32 (line 206) | static u32 relax_tlsdesc_to_ie(u8 *loc, const ElfRel<E> &rel) {
function u32 (line 250) | static u32 relax_tlsdesc_to_le(u8 *loc, const ElfRel<E> &rel) {
function relax_gd_to_le (line 297) | static void relax_gd_to_le(u8 *loc, const ElfRel<E> &rel, u64 val) {
function relax_gd_to_ie (line 341) | static void relax_gd_to_ie(u8 *loc, const ElfRel<E> &rel, u64 val) {
function relax_ld_to_le (line 374) | static void relax_ld_to_le(u8 *loc, const ElfRel<E> &rel, i64 tls_size) {
function rewrite_endbr (line 881) | void rewrite_endbr(Context<E> &ctx) {
FILE: src/archive-file.cc
type mold (line 28) | namespace mold {
type ArHdr (line 31) | struct ArHdr {
method starts_with (line 40) | bool starts_with(std::string_view s) const {
method is_strtab (line 44) | bool is_strtab() const {
method is_symtab (line 48) | bool is_symtab() const {
method read_name (line 52) | std::string read_name(std::string_view strtab, u8 *&ptr) const {
function read_thin_archive_members (line 79) | std::vector<MappedFile *>
function read_fat_archive_members (line 127) | std::vector<MappedFile *>
function read_archive_members (line 166) | std::vector<MappedFile *>
FILE: src/cmdline.cc
type mold (line 25) | namespace mold {
function read_response_file (line 251) | static std::vector<std::string_view>
function expand_response_files (line 350) | std::vector<std::string_view>
function string_trim (line 362) | static std::string_view string_trim(std::string_view str) {
function add_dashes (line 374) | static std::vector<std::string> add_dashes(std::string name) {
function i64 (line 390) | static i64 parse_hex(Context<E> &ctx, std::string opt, std::string_vie...
function i64 (line 401) | static i64 parse_number(Context<E> &ctx, std::string opt,
function from_hex (line 418) | static char from_hex(char c) {
function parse_hex_build_id (line 428) | static std::vector<u8> parse_hex_build_id(Context<E> &ctx, std::string...
function parse_package_metadata (line 442) | static std::string
function split_string (line 463) | static std::vector<std::string_view>
function read_retain_symbols_file (line 480) | static void read_retain_symbols_file(Context<E> &ctx, std::string_view...
function is_file (line 505) | static bool is_file(const std::filesystem::path& path) {
function parse_section_order (line 511) | static std::vector<SectionOrder>
function parse_defsym_value (line 568) | static std::variant<Symbol<E> *, u64>
function parse_kernel_version (line 584) | static std::tuple<int, int, int>
function returns_etxtbsy (line 599) | static bool returns_etxtbsy() {
function parse_nonpositional_args (line 611) | std::vector<std::string> parse_nonpositional_args(Context<E> &ctx) {
FILE: src/elf.cc
type mold (line 4) | namespace mold {
function unknown_type (line 6) | static std::string unknown_type(u32 r_type) {
FILE: src/elf.h
function namespace (line 10) | namespace mold {
function E (line 1737) | struct ElfChdr<E> {
function SPARC64 (line 1763) | struct ElfRel<SPARC64> {
function SH4LE (line 1777) | struct ElfRel<SH4LE> {
function SH4BE (line 1793) | struct ElfRel<SH4BE> {
type I386 (line 1871) | struct I386 {
type ARM64LE (line 1896) | struct ARM64LE {
function ARM64LE (line 1923) | struct ARM64BE : ARM64LE {
type ARM32LE (line 1928) | struct ARM32LE {
function ARM32LE (line 1958) | struct ARM32BE : ARM32LE {
type RV64LE (line 1963) | struct RV64LE {
function RV64LE (line 1988) | struct RV64BE : RV64LE {
type RV32LE (line 1993) | struct RV32LE {
function RV32LE (line 2018) | struct RV32BE : RV32LE {
type PPC32 (line 2023) | struct PPC32 {
type PPC64 (line 2052) | struct PPC64 {
function PPC64 (line 2070) | struct PPC64V1 : PPC64 {
function PPC64 (line 2080) | struct PPC64V2 : PPC64 {
type S390X (line 2091) | struct S390X {
type SPARC64 (line 2115) | struct SPARC64 {
type M68K (line 2139) | struct M68K {
type SH4LE (line 2162) | struct SH4LE {
function SH4LE (line 2185) | struct SH4BE : SH4LE {
type LOONGARCH64 (line 2191) | struct LOONGARCH64 {
type LOONGARCH32 (line 2216) | struct LOONGARCH32 {
FILE: src/entry.cc
function main (line 24) | int main(int argc, char **argv) {
FILE: src/error.cc
type mold (line 3) | namespace mold {
class Fatal<E> (line 51) | class Fatal<E>
class Error<E> (line 52) | class Error<E>
class Warn<E> (line 53) | class Warn<E>
FILE: src/filetype.cc
type mold (line 3) | namespace mold {
function is_text_file (line 5) | static bool is_text_file(MappedFile *mf) {
function is_gcc_lto_obj (line 16) | static bool is_gcc_lto_obj(MappedFile *mf, bool has_plugin) {
function FileType (line 69) | FileType get_file_type(Context<E> &ctx, MappedFile *mf) {
function get_elf_type (line 128) | static std::string_view get_elf_type(u8 *buf) {
function get_machine_type (line 170) | std::string_view
FILE: src/gc-sections.cc
type mold (line 11) | namespace mold {
function should_keep (line 14) | static bool should_keep(const InputSection<E> &isec) {
function mark_section (line 36) | static bool mark_section(InputSection<E> *isec) {
function collect_root_set (line 41) | static tbb::concurrent_vector<InputSection<E> *>
function visit (line 100) | static void visit(Context<E> &ctx, InputSection<E> *isec,
function mark (line 138) | static void mark(Context<E> &ctx,
function sweep (line 150) | static void sweep(Context<E> &ctx) {
function gc_sections (line 190) | void gc_sections(Context<E> &ctx) {
FILE: src/gdb-index.cc
type mold (line 62) | namespace mold {
type DwarfKind (line 64) | enum DwarfKind { DWARF2_32, DWARF5_32, DWARF2_64, DWARF5_64 }
type CuHdrDwarf2_32 (line 67) | struct CuHdrDwarf2_32 {
type CuHdrDwarf5_32 (line 75) | struct CuHdrDwarf5_32 {
type CuHdrDwarf2_64 (line 84) | struct CuHdrDwarf2_64 {
type CuHdrDwarf5_64 (line 93) | struct CuHdrDwarf5_64 {
type PubnamesHdr32 (line 103) | struct PubnamesHdr32 {
type PubnamesHdr64 (line 111) | struct PubnamesHdr64 {
type SectionHeader (line 119) | struct SectionHeader {
type NameType (line 128) | struct NameType {
type MapValue (line 135) | struct MapValue {
type Compunit (line 142) | struct Compunit {
function u32 (line 152) | static u32 gdb_hash(std::string_view name) {
function DwarfKind (line 163) | static DwarfKind get_dwarf_kind(Context<E> &ctx, u8 *p) {
function u8 (line 180) | u8 *find_cu_abbrev(Context<E> &ctx, u8 **p, const CuHdr &hdr) {
function u64 (line 242) | u64 read_scalar(Context<E> &ctx, u8 **p, u64 form) {
function read_debug_range (line 311) | static std::vector<std::pair<u64, u64>>
function read_rnglist_range (line 326) | static void
function read_address_ranges (line 389) | static std::vector<std::pair<u64, u64>>
function i64 (line 511) | static i64 read_pubnames_cu(Context<E> &ctx, const PubnamesHdr &hdr,
function read_pubnames (line 550) | static void read_pubnames(Context<E> &ctx, std::vector<Compunit> &cus,
function read_compunits (line 573) | static std::vector<Compunit> read_compunits(Context<E> &ctx) {
function get_buffer (line 631) | std::span<u8> get_buffer(Context<E> &ctx, Chunk<E> *chunk) {
function write_gdb_index (line 640) | void write_gdb_index(Context<E> &ctx) {
FILE: src/icf.cc
type std (line 84) | namespace std {
type hash<Digest> (line 85) | struct hash<Digest> {
type mold (line 95) | namespace mold {
function uniquify_cies (line 100) | static void uniquify_cies(Context<E> &ctx) {
function is_eligible (line 124) | static bool is_eligible(Context<E> &ctx, InputSection<E> &isec) {
function is_leaf (line 149) | static bool is_leaf(Context<E> &ctx, InputSection<E> &isec) {
type LeafHasher (line 161) | struct LeafHasher {
type LeafEq (line 173) | struct LeafEq {
function merge_leaf_nodes (line 195) | static void merge_leaf_nodes(Context<E> &ctx) {
function Digest (line 243) | static Digest compute_digest(Context<E> &ctx, InputSection<E> &isec) {
function gather_sections (line 314) | static std::vector<InputSection<E> *> gather_sections(Context<E> &ctx) {
function compute_digests (line 349) | static std::vector<Digest>
function gather_edges (line 364) | static void gather_edges(Context<E> &ctx,
function i64 (line 409) | static i64 propagate(std::span<std::vector<Digest>> digests,
function i64 (line 448) | static i64 count_num_classes(std::span<Digest> digests,
function print_icf_sections (line 462) | static void print_icf_sections(Context<E> &ctx) {
function icf_sections (line 511) | void icf_sections(Context<E> &ctx) {
FILE: src/input-files.cc
type mold (line 11) | namespace mold {
function is_rust_symbol (line 31) | static bool is_rust_symbol(const Symbol<E> &sym) {
function demangle (line 44) | std::string_view demangle(const Symbol<E> &sym) {
function is_debug_section (line 114) | static bool is_debug_section(const ElfShdr<E> &shdr, std::string_view ...
function read_riscv_attributes (line 159) | static void read_riscv_attributes(Context<E> &ctx, ObjectFile<E> &file,
function is_known_section_type (line 208) | static bool is_known_section_type(const ElfShdr<E> &shdr) {
function decode_crel (line 239) | std::vector<ElfRel<E>> decode_crel(Context<E> &ctx, ObjectFile<E> &file,
function ComdatGroup (line 286) | ComdatGroup *insert_comdat_group(Context<E> &ctx, std::string_view nam...
function u64 (line 919) | static u64 get_rank(InputFile<E> *file, const ElfSym<E> &esym, bool is...
function u64 (line 938) | static u64 get_rank(const Symbol<E> &sym) {
function print_trace_symbol (line 974) | static void print_trace_symbol(Context<E> &ctx, InputFile<E> &file,
function should_write_to_local_symtab (line 1132) | static bool should_write_to_local_symtab(Context<E> &ctx, Symbol<E> &s...
function i64 (line 1502) | i64 SharedFile<E>::get_alignment(Symbol<E> *sym) {
class InputFile<E> (line 1567) | class InputFile<E>
class ObjectFile<E> (line 1568) | class ObjectFile<E>
class SharedFile<E> (line 1569) | class SharedFile<E>
FILE: src/input-sections.cc
type mold (line 6) | namespace mold {
function i64 (line 8) | static i64 to_p2align(u64 alignment) {
function cie_equals (line 15) | bool cie_equals(const CieRecord<E> &a, const CieRecord<E> &b) {
type u8 (line 124) | enum : u8 { NONE, ERROR, COPYREL, PLT, CPLT }
function do_action (line 127) | static void do_action(Context<E> &ctx, Action action, InputSection<E> ...
function i64 (line 152) | static inline i64 get_output_type(Context<E> &ctx) {
function i64 (line 161) | static inline i64 get_sym_type(Symbol<E> &sym) {
function find_null (line 363) | static size_t find_null(std::string_view data, i64 pos, i64 entsize) {
class InputSection<E> (line 448) | class InputSection<E>
class MergeableSection<E> (line 449) | class MergeableSection<E>
FILE: src/jobs-unix.cc
type mold (line 21) | namespace mold {
function acquire_global_lock (line 25) | void acquire_global_lock() {
function release_global_lock (line 45) | void release_global_lock() {
FILE: src/jobs-win32.cc
type mold (line 1) | namespace mold {
function acquire_global_lock (line 3) | void acquire_global_lock() {}
function release_global_lock (line 4) | void release_global_lock() {}
FILE: src/linker-script.cc
type mold (line 10) | namespace mold {
function get_line (line 12) | static std::string_view get_line(std::string_view input, const char *p...
function unquote (line 106) | static std::string_view unquote(std::string_view s) {
function is_in_sysroot (line 126) | static bool is_in_sysroot(Context<E> &ctx, std::string path) {
function MappedFile (line 136) | MappedFile *Script<E>::resolve_path(std::string_view tok, bool check_t...
function read_label (line 258) | static bool read_label(std::span<std::string_view> &tok, std::string l...
function parse_dynamic_list (line 412) | std::vector<DynamicPattern>
class Script<E> (line 421) | class Script<E>
FILE: src/lto-unix.cc
type mold (line 98) | namespace mold {
function PluginStatus (line 117) | static PluginStatus message(PluginLevel level, const char *fmt, ...) {
function PluginStatus (line 143) | static PluginStatus register_claim_file_hook(ClaimFileHandler fn) {
function PluginStatus (line 150) | static PluginStatus
function PluginStatus (line 158) | static PluginStatus register_cleanup_hook(CleanupHandler fn) {
function PluginStatus (line 164) | static PluginStatus
function PluginStatus (line 173) | static PluginStatus add_input_file(const char *path) {
function PluginStatus (line 193) | static PluginStatus
function PluginStatus (line 200) | static PluginStatus release_input_file(const void *handle) {
function PluginStatus (line 208) | static PluginStatus add_input_library(const char *path) {
function PluginStatus (line 213) | static PluginStatus set_extra_library_path(const char *path) {
function PluginStatus (line 219) | static PluginStatus get_view(const void *handle, const void **view) {
function PluginStatus (line 227) | static PluginStatus
function PluginStatus (line 233) | static PluginStatus
function PluginStatus (line 239) | static PluginStatus
function PluginStatus (line 246) | static PluginStatus
function PluginStatus (line 254) | static PluginStatus
function PluginStatus (line 261) | static PluginStatus allow_section_ordering() {
function PluginStatus (line 266) | static PluginStatus
function PluginStatus (line 280) | static PluginStatus
function restart_process (line 339) | static void restart_process(Context<E> &ctx) {
function PluginStatus (line 363) | static PluginStatus
function PluginStatus (line 370) | static PluginStatus
function PluginStatus (line 376) | static PluginStatus allow_unique_segment_for_sections() {
function PluginStatus (line 381) | static PluginStatus
function PluginStatus (line 391) | static PluginStatus
function PluginStatus (line 398) | static PluginStatus
function PluginStatus (line 405) | static PluginStatus
function PluginStatus (line 411) | static PluginStatus
function PluginLinkerAPIVersion (line 418) | static PluginLinkerAPIVersion
function load_lto_plugin (line 442) | static void load_lto_plugin(Context<E> &ctx) {
function to_elf_sym (line 514) | static ElfSym<E> to_elf_sym(PluginSymbol &psym) {
function is_llvm (line 566) | static bool is_llvm(Context<E> &ctx) {
function supports_v3_api (line 573) | static bool supports_v3_api(Context<E> &ctx) {
function PluginInputFile (line 578) | static PluginInputFile
function run_lto_plugin (line 681) | std::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &ctx) {
function lto_cleanup (line 741) | void lto_cleanup(Context<E> &ctx) {
FILE: src/lto-win32.cc
type mold (line 4) | namespace mold {
function run_lto_plugin (line 12) | std::vector<ObjectFile<E> *> run_lto_plugin(Context<E> &ctx) {
function lto_cleanup (line 17) | void lto_cleanup(Context<E> &ctx) {}
FILE: src/lto.h
function namespace (line 5) | namespace mold {
FILE: src/main.cc
type mold (line 10) | namespace mold {
function check_file_compatibility (line 13) | static void
function read_file (line 78) | void read_file(Context<E> &ctx, ReaderContext &rctx, MappedFile *mf) {
function detect_machine_type (line 121) | static std::string_view
function MappedFile (line 156) | MappedFile *open_library(Context<E> &ctx, ReaderContext &rctx, std::st...
function MappedFile (line 171) | MappedFile *find_library(Context<E> &ctx, ReaderContext &rctx, std::st...
function read_input_files (line 193) | static void read_input_files(Context<E> &ctx, std::span<std::string> a...
function has_lto_obj (line 256) | static bool has_lto_obj(Context<E> &ctx) {
function i64 (line 264) | static i64 get_thread_count(Context<E> &ctx) {
function mold_main (line 275) | int mold_main(int argc, char **argv) {
FILE: src/mapfile.cc
type mold (line 10) | namespace mold {
function get_map (line 17) | static Map<E> get_map(Context<E> &ctx) {
function print_map (line 43) | void print_map(Context<E> &ctx) {
FILE: src/mapped-file-unix.cc
type mold (line 3) | namespace mold {
function MappedFile (line 5) | MappedFile *open_file_impl(const std::string &path, std::string &error) {
FILE: src/mapped-file-win32.cc
type mold (line 3) | namespace mold {
function MappedFile (line 5) | MappedFile *open_file_impl(const std::string &path, std::string &error) {
FILE: src/mold-wrapper.c
function debug_print (line 26) | static void debug_print(const char *fmt, ...) {
function count_args (line 38) | static int count_args(va_list *ap) {
function copy_args (line 49) | static void copy_args(char **argv, const char *arg0, va_list *ap) {
function is_ld (line 59) | static bool is_ld(const char *path) {
function execvpe (line 69) | int execvpe(const char *file, char *const *argv, char *const *envp) {
function execve (line 82) | int execve(const char *path, char *const *argv, char *const *envp) {
function execl (line 90) | int execl(const char *path, const char *arg0, ...) {
function execlp (line 99) | int execlp(const char *file, const char *arg0, ...) {
function execle (line 108) | int execle(const char *path, const char *arg0, ...) {
function execv (line 118) | int execv(const char *path, char *const *argv) {
function execvp (line 122) | int execvp(const char *file, char *const *argv) {
function posix_spawn (line 126) | int posix_spawn(pid_t *pid, const char *path,
function posix_spawnp (line 137) | int posix_spawnp(pid_t *pid, const char *file,
FILE: src/mold.h
function namespace (line 39) | namespace mold {
function PPC32 (line 2287) | struct ContextExtras<PPC32> {
function PPC64V1 (line 2292) | struct ContextExtras<PPC64V1> {
function PPC64V2 (line 2298) | struct ContextExtras<PPC64V2> {
function SPARC64 (line 2305) | struct ContextExtras<SPARC64> {
function checkpoint (line 2326) | void checkpoint() {
function has_got (line 2687) | bool has_got(Context<E> &ctx) const { return get_got_idx(ctx) != -1; }
function has_gottp (line 2688) | bool has_gottp(Context<E> &ctx) const { return get_gottp_idx(ctx) != -1; }
function has_tlsgd (line 2689) | bool has_tlsgd(Context<E> &ctx) const { return get_tlsgd_idx(ctx) != -1; }
function has_tlsdesc (line 2690) | bool has_tlsdesc(Context<E> &ctx) const { return get_tlsdesc_idx(ctx) !=...
function has_opd (line 2691) | bool has_opd(Context<E> &ctx) const { return get_opd_idx(ctx) != -1; }
function is_remaining_undef_weak (line 2704) | bool is_remaining_undef_weak() const;
function is_c_identifier (line 3586) | inline bool is_c_identifier(std::string_view s) {
FILE: src/output-chunks.cc
type mold (line 11) | namespace mold {
function u32 (line 14) | static u32 elf_hash(std::string_view name) {
function u64 (line 43) | static u64 get_entry_addr(Context<E> &ctx) {
function i64 (line 123) | i64 to_phdr_flags(Context<E> &ctx, Chunk<E> *chunk) {
function create_phdr (line 147) | static std::vector<ElfPhdr<E>> create_phdr(Context<E> &ctx) {
function i64 (line 493) | i64 DynstrSection<E>::add_string(std::string_view str) {
function i64 (line 506) | i64 DynstrSection<E>::find_string(std::string_view str) {
function contains_variant_pcs (line 620) | static bool contains_variant_pcs(Context<E> &ctx) {
function contains_variant_cc (line 629) | static bool contains_variant_cc(Context<E> &ctx) {
function create_dynamic_section (line 637) | static std::vector<Word<E>> create_dynamic_section(Context<E> &ctx) {
type Group (line 850) | struct Group {
function encode_relr (line 1012) | static std::vector<u64> encode_relr(std::span<u64> pos) {
function AbsRelKind (line 1041) | static AbsRelKind get_abs_rel_kind(Context<E> &ctx, Symbol<E> &sym) {
function is_absrel (line 1056) | static bool is_absrel(const ElfRel<E> &r) {
function i64 (line 1127) | i64 OutputSection<E>::get_reldyn_size(Context<E> &ctx) const {
function u64 (line 1264) | u64 GotSection<E>::get_tlsld_addr(Context<E> &ctx) const {
type GotEntry (line 1271) | struct GotEntry {
method is_relr (line 1272) | bool is_relr(Context<E> &ctx) const {
function get_got_entries (line 1299) | static std::vector<GotEntry<E>> get_got_entries(Context<E> &ctx) {
function i64 (line 1398) | i64 GotSection<E>::get_reldyn_size(Context<E> &ctx) const {
function u64 (line 1729) | static u64 get_symbol_size(Symbol<E> &sym) {
function to_output_esym (line 1741) | std::optional<ElfSym<E>>
function get_merged_output_name (line 2003) | std::string_view
function get_cmdline_args (line 2102) | static std::string get_cmdline_args(Context<E> &ctx) {
function add_comment_strings (line 2112) | static void add_comment_strings(Context<E> &ctx) {
type HdrEntry (line 2306) | struct HdrEntry {
function is_glibc2 (line 2565) | static bool is_glibc2(SharedFile<E> &file) {
class Chunk<E> (line 3025) | class Chunk<E>
class OutputEhdr<E> (line 3026) | class OutputEhdr<E>
class OutputShdr<E> (line 3027) | class OutputShdr<E>
class OutputPhdr<E> (line 3028) | class OutputPhdr<E>
class InterpSection<E> (line 3029) | class InterpSection<E>
class OutputSection<E> (line 3030) | class OutputSection<E>
class GotSection<E> (line 3031) | class GotSection<E>
class GotPltSection<E> (line 3032) | class GotPltSection<E>
class PltSection<E> (line 3033) | class PltSection<E>
class PltGotSection<E> (line 3034) | class PltGotSection<E>
class RelPltSection<E> (line 3035) | class RelPltSection<E>
class RelDynSection<E> (line 3036) | class RelDynSection<E>
class RelrDynSection<E> (line 3037) | class RelrDynSection<E>
class StrtabSection<E> (line 3038) | class StrtabSection<E>
class ShstrtabSection<E> (line 3039) | class ShstrtabSection<E>
class DynstrSection<E> (line 3040) | class DynstrSection<E>
class DynamicSection<E> (line 3041) | class DynamicSection<E>
class SymtabSection<E> (line 3042) | class SymtabSection<E>
class DynsymSection<E> (line 3043) | class DynsymSection<E>
class HashSection<E> (line 3044) | class HashSection<E>
class GnuHashSection<E> (line 3045) | class GnuHashSection<E>
class MergedSection<E> (line 3046) | class MergedSection<E>
class EhFrameSection<E> (line 3047) | class EhFrameSection<E>
class EhFrameHdrSection<E> (line 3048) | class EhFrameHdrSection<E>
class EhFrameRelocSection<E> (line 3049) | class EhFrameRelocSection<E>
class CopyrelSection<E> (line 3050) | class CopyrelSection<E>
class VersymSection<E> (line 3051) | class VersymSection<E>
class VerneedSection<E> (line 3052) | class VerneedSection<E>
class VerdefSection<E> (line 3053) | class VerdefSection<E>
class BuildIdSection<E> (line 3054) | class BuildIdSection<E>
class NotePackageSection<E> (line 3055) | class NotePackageSection<E>
class NotePropertySection<E> (line 3056) | class NotePropertySection<E>
class GdbIndexSection<E> (line 3057) | class GdbIndexSection<E>
class CompressedSection<E> (line 3058) | class CompressedSection<E>
class RelocSection<E> (line 3059) | class RelocSection<E>
class ComdatGroupSection<E> (line 3060) | class ComdatGroupSection<E>
class GnuDebuglinkSection<E> (line 3061) | class GnuDebuglinkSection<E>
FILE: src/output-file-unix.cc
type mold (line 14) | namespace mold {
function u32 (line 16) | static u32 get_umask() {
function open_or_create_file (line 23) | static int
class MemoryMappedOutputFile (line 43) | class MemoryMappedOutputFile : public OutputFile<E> {
method MemoryMappedOutputFile (line 45) | MemoryMappedOutputFile(Context<E> &ctx, std::string path, i64 filesi...
method close (line 83) | void close(Context<E> &ctx) override {
class OutputFile<E> (line 200) | class OutputFile<E>
class LockingOutputFile<E> (line 201) | class LockingOutputFile<E>
FILE: src/output-file-win32.cc
type mold (line 6) | namespace mold {
class MemoryMappedOutputFile (line 9) | class MemoryMappedOutputFile : public OutputFile<E> {
method MemoryMappedOutputFile (line 11) | MemoryMappedOutputFile(Context<E> &ctx, std::string path, i64 filesi...
method close (line 42) | void close(Context<E> &ctx) override {
class OutputFile<E> (line 114) | class OutputFile<E>
class LockingOutputFile<E> (line 115) | class LockingOutputFile<E>
FILE: src/passes.cc
type mold (line 15) | namespace mold {
function redo_main (line 21) | int redo_main(std::string_view target, int argc, char **argv) {
function apply_exclude_libs (line 86) | void apply_exclude_libs(Context<E> &ctx) {
function has_debug_info_section (line 98) | static bool has_debug_info_section(Context<E> &ctx) {
function create_synthetic_sections (line 106) | void create_synthetic_sections(Context<E> &ctx) {
function mark_live_objects (line 214) | static void mark_live_objects(Context<E> &ctx) {
function resolve_default_symver (line 270) | static void resolve_default_symver(Context<E> &ctx) {
function clear_symbols (line 284) | static void clear_symbols(Context<E> &ctx) {
function resolve_symbols (line 306) | void resolve_symbols(Context<E> &ctx) {
function do_lto (line 391) | void do_lto(Context<E> &ctx) {
function parse_eh_frame_sections (line 425) | void parse_eh_frame_sections(Context<E> &ctx) {
function create_merged_sections (line 434) | void create_merged_sections(Context<E> &ctx) {
function convert_common_symbols (line 454) | void convert_common_symbols(Context<E> &ctx) {
function has_ctors_and_init_array (line 463) | static bool has_ctors_and_init_array(Context<E> &ctx) {
function u64 (line 470) | static u64 canonicalize_type(std::string_view name, u64 type) {
type OutputSectionKey (line 492) | struct OutputSectionKey {
type Hash (line 497) | struct Hash {
function get_output_name (line 505) | static std::string_view
function OutputSectionKey (line 551) | static OutputSectionKey
type Hash (line 497) | struct Hash {
function is_relro (line 577) | static bool is_relro(OutputSection<E> &osec) {
function create_output_sections (line 607) | void create_output_sections(Context<E> &ctx) {
function create_internal_file (line 725) | void create_internal_file(Context<E> &ctx) {
function get_start_stop_name (line 770) | static std::optional<std::string>
function add_synthetic_symbols (line 797) | void add_synthetic_symbols(Context<E> &ctx) {
function apply_section_align (line 929) | void apply_section_align(Context<E> &ctx) {
function check_cet_errors (line 939) | void check_cet_errors(Context<E> &ctx) {
function print_dependencies (line 975) | void print_dependencies(Context<E> &ctx) {
function create_response_file (line 1031) | static std::string create_response_file(Context<E> &ctx) {
function write_repro_file (line 1055) | void write_repro_file(Context<E> &ctx) {
function check_duplicate_symbols (line 1082) | void check_duplicate_symbols(Context<E> &ctx) {
function convert_zero_to_bss (line 1130) | void convert_zero_to_bss(Context<E> &ctx) {
function check_shlib_undefined (line 1162) | void check_shlib_undefined(Context<E> &ctx) {
function check_symbol_types (line 1220) | void check_symbol_types(Context<E> &ctx) {
function i64 (line 1265) | static i64 get_init_fini_priority(InputSection<E> *isec) {
function i64 (line 1275) | static i64 get_ctor_dtor_priority(InputSection<E> *isec) {
function sort_init_fini (line 1297) | void sort_init_fini(Context<E> &ctx) {
function sort_ctor_dtor (line 1331) | void sort_ctor_dtor(Context<E> &ctx) {
function is_dwarf32 (line 1360) | static bool is_dwarf32(Context<E> &ctx, InputSection<E> *isec) {
function sort_debug_info_sections (line 1432) | void sort_debug_info_sections(Context<E> &ctx) {
function fixup_ctors_in_init_array (line 1504) | void fixup_ctors_in_init_array(Context<E> &ctx) {
function shuffle (line 1535) | static void shuffle(std::vector<InputSection<E> *> &vec, u64 seed) {
function shuffle_sections (line 1561) | void shuffle_sections(Context<E> &ctx) {
function add_dynamic_strings (line 1598) | void add_dynamic_strings(Context<E> &ctx) {
function compute_section_sizes (line 1627) | void compute_section_sizes(Context<E> &ctx) {
function claim_unresolved_symbols (line 1659) | void claim_unresolved_symbols(Context<E> &ctx) {
function scan_relocations (line 1739) | void scan_relocations(Context<E> &ctx) {
function compute_imported_symbol_weakness (line 1838) | void compute_imported_symbol_weakness(Context<E> &ctx) {
function report_undef_errors (line 1856) | void report_undef_errors(Context<E> &ctx) {
function create_reloc_sections (line 1891) | void create_reloc_sections(Context<E> &ctx) {
function copy_chunks (line 1908) | void copy_chunks(Context<E> &ctx) {
function construct_relr (line 1962) | void construct_relr(Context<E> &ctx) {
function u32 (line 1971) | static u32 djb_hash(std::string_view name) {
function sort_dynsyms (line 1979) | void sort_dynsyms(Context<E> &ctx) {
function create_output_symtab (line 2031) | void create_output_symtab(Context<E> &ctx) {
function apply_version_script (line 2056) | void apply_version_script(Context<E> &ctx) {
function parse_symbol_version (line 2133) | void parse_symbol_version(Context<E> &ctx) {
function should_export (line 2191) | static bool should_export(Context<E> &ctx, Symbol<E> &sym) {
function is_protected (line 2211) | static bool is_protected(Context<E> &ctx, Symbol<E> &sym) {
function compute_import_export (line 2232) | void compute_import_export(Context<E> &ctx) {
function compute_address_significance (line 2371) | void compute_address_significance(Context<E> &ctx) {
function sort_output_sections_regular (line 2480) | void sort_output_sections_regular(Context<E> &ctx) {
function get_section_order_group (line 2546) | static std::string_view get_section_order_group(Chunk<E> &chunk) {
function sort_output_sections_by_order (line 2558) | void sort_output_sections_by_order(Context<E> &ctx) {
function sort_output_sections (line 2599) | void sort_output_sections(Context<E> &ctx) {
function i64 (line 2607) | static i64 get_tls_segment_alignment(Context<E> &ctx) {
function set_virtual_addresses_regular (line 2645) | static void set_virtual_addresses_regular(Context<E> &ctx) {
function set_virtual_addresses_by_order (line 2757) | static void set_virtual_addresses_by_order(Context<E> &ctx) {
function u64 (line 2824) | static u64 align_with_skew(u64 val, u64 align, u64 skew) {
function i64 (line 2830) | static i64 set_file_offsets(Context<E> &ctx) {
function separate_debug_sections (line 2900) | void separate_debug_sections(Context<E> &ctx) {
function compute_section_headers (line 2915) | void compute_section_headers(Context<E> &ctx) {
function i64 (line 2957) | i64 set_osec_offsets(Context<E> &ctx) {
function i64 (line 2983) | static i64 get_num_irelative_relocs(Context<E> &ctx) {
function u64 (line 2992) | static u64 to_paddr(Context<E> &ctx, u64 vaddr) {
function fix_synthetic_symbols (line 3001) | void fix_synthetic_symbols(Context<E> &ctx) {
function compress_debug_sections (line 3204) | void compress_debug_sections(Context<E> &ctx) {
function blake3_hash (line 3233) | static void blake3_hash(u8 *buf, i64 size, u8 *out) {
function get_shards (line 3241) | std::vector<std::span<u8>> get_shards(Context<E> &ctx) {
function sort_reldyn (line 3270) | void sort_reldyn(Context<E> &ctx) {
function write_build_id (line 3295) | void write_build_id(Context<E> &ctx) {
function write_gnu_debuglink (line 3359) | void write_gnu_debuglink(Context<E> &ctx) {
function write_separate_debug_file (line 3383) | void write_separate_debug_file(Context<E> &ctx) {
function write_dependency_file (line 3485) | void write_dependency_file(Context<E> &ctx) {
function show_stats (line 3516) | void show_stats(Context<E> &ctx) {
FILE: src/relocatable.cc
type mold (line 38) | namespace mold {
function r_create_synthetic_sections (line 42) | static void r_create_synthetic_sections(Context<E> &ctx) {
function create_comdat_group_sections (line 68) | static void create_comdat_group_sections(Context<E> &ctx) {
function r_claim_unresolved_symbols (line 111) | static void r_claim_unresolved_symbols(Context<E> &ctx) {
function u64 (line 138) | static u64 r_set_osec_offsets(Context<E> &ctx) {
function combine_objects (line 149) | void combine_objects(Context<E> &ctx) {
FILE: src/shrink-sections.cc
type mold (line 65) | namespace mold {
function i64 (line 70) | i64 get_r_delta(InputSection<E> &isec, u64 offset) {
function shrink_sections (line 78) | void shrink_sections(Context<E> &ctx) {
function i64 (line 116) | i64 compute_distance(Context<E> &ctx, Symbol<E> &sym,
FILE: src/signal-unix.cc
type mold (line 11) | namespace mold {
function errno_string (line 13) | std::string errno_string() {
function cleanup (line 20) | void cleanup() {
function sighandler (line 37) | static void sighandler(int signo, siginfo_t *info, void *ucontext) {
function install_signal_handler (line 66) | void install_signal_handler() {
FILE: src/signal-win32.cc
type mold (line 5) | namespace mold {
function cleanup (line 7) | void cleanup() {
function errno_string (line 12) | std::string errno_string() {
function LONG (line 28) | static LONG WINAPI vectored_handler(_EXCEPTION_POINTERS *exception_inf...
function install_signal_handler (line 51) | void install_signal_handler() {
FILE: src/subprocess-unix.cc
type mold (line 12) | namespace mold {
function fork_child (line 20) | void fork_child() {
function notify_parent (line 57) | void notify_parent() {
function find_dso (line 68) | static std::string find_dso(Context<E> &ctx, std::filesystem::path sel...
function process_run_subcommand (line 90) | [[noreturn]]
FILE: src/subprocess-win32.cc
type mold (line 3) | namespace mold {
function fork_child (line 6) | void fork_child() {}
function notify_parent (line 9) | void notify_parent() {}
function process_run_subcommand (line 12) | [[noreturn]]
FILE: src/thunks.cc
type mold (line 31) | namespace mold {
function requires_thunk (line 48) | static bool
function remove_redundant_thunks (line 246) | void remove_redundant_thunks(Context<E> &ctx) {
function gather_thunk_addresses (line 312) | void gather_thunk_addresses(Context<E> &ctx) {
FILE: src/tls.cc
type mold (line 150) | namespace mold {
function u64 (line 157) | u64 get_tp_addr(const ElfPhdr<E> &phdr) {
function u64 (line 191) | u64 get_dtp_addr(const ElfPhdr<E> &phdr) {
FILE: third-party/blake3/.github/workflows/upload_github_release_asset.py
function get_release (line 39) | def get_release():
FILE: third-party/blake3/b3sum/src/main.rs
constant NAME (line 12) | const NAME: &str = "b3sum";
constant DERIVE_KEY_ARG (line 14) | const DERIVE_KEY_ARG: &str = "derive_key";
constant KEYED_ARG (line 15) | const KEYED_ARG: &str = "keyed";
constant LENGTH_ARG (line 16) | const LENGTH_ARG: &str = "length";
constant NO_NAMES_ARG (line 17) | const NO_NAMES_ARG: &str = "no_names";
constant RAW_ARG (line 18) | const RAW_ARG: &str = "raw";
constant TAG_ARG (line 19) | const TAG_ARG: &str = "tag";
constant CHECK_ARG (line 20) | const CHECK_ARG: &str = "check";
type Inner (line 24) | struct Inner {
type Args (line 100) | struct Args {
method parse (line 107) | fn parse() -> anyhow::Result<Self> {
method num_threads (line 135) | fn num_threads(&self) -> Option<usize> {
method check (line 139) | fn check(&self) -> bool {
method raw (line 143) | fn raw(&self) -> bool {
method tag (line 147) | fn tag(&self) -> bool {
method no_mmap (line 151) | fn no_mmap(&self) -> bool {
method no_names (line 155) | fn no_names(&self) -> bool {
method len (line 159) | fn len(&self) -> u64 {
method seek (line 163) | fn seek(&self) -> u64 {
method keyed (line 167) | fn keyed(&self) -> bool {
method quiet (line 171) | fn quiet(&self) -> bool {
function hash_path (line 176) | fn hash_path(args: &Args, path: &Path) -> anyhow::Result<blake3::OutputR...
function write_hex_output (line 194) | fn write_hex_output(mut output: blake3::OutputReader, args: &Args) -> an...
function write_raw_output (line 210) | fn write_raw_output(output: blake3::OutputReader, args: &Args) -> anyhow...
function read_key_from_stdin (line 219) | fn read_key_from_stdin() -> anyhow::Result<[u8; blake3::KEY_LEN]> {
type FilepathString (line 238) | struct FilepathString {
function filepath_to_string (line 244) | fn filepath_to_string(filepath: &Path) -> FilepathString {
function hex_half_byte (line 270) | fn hex_half_byte(c: char) -> anyhow::Result<u8> {
function check_for_invalid_characters (line 287) | fn check_for_invalid_characters(utf8_path: &str) -> anyhow::Result<()> {
function unescape (line 311) | fn unescape(mut path: &str) -> anyhow::Result<String> {
type ParsedCheckLine (line 330) | struct ParsedCheckLine {
function split_untagged_check_line (line 337) | fn split_untagged_check_line(line_after_slash: &str) -> Option<(&str, &s...
function split_tagged_check_line (line 343) | fn split_tagged_check_line(line_after_slash: &str) -> Option<(&str, &str...
function parse_check_line (line 353) | fn parse_check_line(mut line: &str) -> anyhow::Result<ParsedCheckLine> {
function hash_one_input (line 413) | fn hash_one_input(path: &Path, args: &Args) -> anyhow::Result<()> {
function check_one_line (line 445) | fn check_one_line(line: &str, args: &Args) -> bool {
function check_one_checkfile (line 488) | fn check_one_checkfile(path: &Path, args: &Args, files_failed: &mut u64)...
function main (line 519) | fn main() -> anyhow::Result<()> {
function test_args (line 561) | fn test_args() {
FILE: third-party/blake3/b3sum/src/unit_tests.rs
function test_parse_check_line (line 4) | fn test_parse_check_line() {
function test_filepath_to_string (line 222) | fn test_filepath_to_string() {
FILE: third-party/blake3/b3sum/tests/cli_tests.rs
function b3sum_exe (line 7) | pub fn b3sum_exe() -> PathBuf {
function test_hash_one (line 12) | fn test_hash_one() {
function test_hash_one_tag (line 19) | fn test_hash_one_tag() {
function test_hash_one_raw (line 29) | fn test_hash_one_raw() {
function test_hash_many (line 41) | fn test_hash_many() {
function test_hash_many_tag (line 69) | fn test_hash_many_tag() {
function test_missing_files (line 91) | fn test_missing_files() {
function test_hash_length_and_seek (line 122) | fn test_hash_length_and_seek() {
function test_keyed (line 162) | fn test_keyed() {
function test_derive_key (line 193) | fn test_derive_key() {
function test_no_mmap (line 206) | fn test_no_mmap() {
function test_length_without_value_is_an_error (line 219) | fn test_length_without_value_is_an_error() {
function test_raw_with_multi_files_is_an_error (line 228) | fn test_raw_with_multi_files_is_an_error() {
function test_newline_and_backslash_escaping_on_unix (line 245) | fn test_newline_and_backslash_escaping_on_unix() {
function test_slash_normalization_on_windows (line 288) | fn test_slash_normalization_on_windows() {
function test_invalid_unicode_on_unix (line 324) | fn test_invalid_unicode_on_unix() {
function test_invalid_unicode_on_windows (line 366) | fn test_invalid_unicode_on_windows() {
function test_check (line 409) | fn test_check() {
function test_check_invalid_characters (line 573) | fn test_check_invalid_characters() {
function test_globbing (line 647) | fn test_globbing() {
FILE: third-party/blake3/benches/bench.rs
constant KIB (line 13) | const KIB: usize = 1024;
type RandomInput (line 18) | pub struct RandomInput {
method new (line 26) | pub fn new(b: &mut Bencher, len: usize) -> Self {
method get (line 42) | pub fn get(&mut self) -> &[u8] {
function bench_single_compression_fn (line 52) | fn bench_single_compression_fn(b: &mut Bencher, platform: Platform) {
function bench_single_compression_portable (line 60) | fn bench_single_compression_portable(b: &mut Bencher) {
function bench_single_compression_sse2 (line 66) | fn bench_single_compression_sse2(b: &mut Bencher) {
function bench_single_compression_sse41 (line 74) | fn bench_single_compression_sse41(b: &mut Bencher) {
function bench_single_compression_avx512 (line 82) | fn bench_single_compression_avx512(b: &mut Bencher) {
function bench_many_chunks_fn (line 88) | fn bench_many_chunks_fn(b: &mut Bencher, platform: Platform) {
function bench_many_chunks_sse2 (line 116) | fn bench_many_chunks_sse2(b: &mut Bencher) {
function bench_many_chunks_sse41 (line 124) | fn bench_many_chunks_sse41(b: &mut Bencher) {
function bench_many_chunks_avx2 (line 132) | fn bench_many_chunks_avx2(b: &mut Bencher) {
function bench_many_chunks_avx512 (line 140) | fn bench_many_chunks_avx512(b: &mut Bencher) {
function bench_many_chunks_neon (line 148) | fn bench_many_chunks_neon(b: &mut Bencher) {
function bench_many_chunks_wasm (line 154) | fn bench_many_chunks_wasm(b: &mut Bencher) {
function bench_many_parents_fn (line 159) | fn bench_many_parents_fn(b: &mut Bencher, platform: Platform) {
function bench_many_parents_sse2 (line 187) | fn bench_many_parents_sse2(b: &mut Bencher) {
function bench_many_parents_sse41 (line 195) | fn bench_many_parents_sse41(b: &mut Bencher) {
function bench_many_parents_avx2 (line 203) | fn bench_many_parents_avx2(b: &mut Bencher) {
function bench_many_parents_avx512 (line 211) | fn bench_many_parents_avx512(b: &mut Bencher) {
function bench_many_parents_neon (line 219) | fn bench_many_parents_neon(b: &mut Bencher) {
function bench_many_parents_wasm (line 225) | fn bench_many_parents_wasm(b: &mut Bencher) {
function bench_atonce (line 229) | fn bench_atonce(b: &mut Bencher, len: usize) {
function bench_atonce_0001_block (line 235) | fn bench_atonce_0001_block(b: &mut Bencher) {
function bench_atonce_0001_kib (line 240) | fn bench_atonce_0001_kib(b: &mut Bencher) {
function bench_atonce_0002_kib (line 245) | fn bench_atonce_0002_kib(b: &mut Bencher) {
function bench_atonce_0004_kib (line 250) | fn bench_atonce_0004_kib(b: &mut Bencher) {
function bench_atonce_0008_kib (line 255) | fn bench_atonce_0008_kib(b: &mut Bencher) {
function bench_atonce_0016_kib (line 260) | fn bench_atonce_0016_kib(b: &mut Bencher) {
function bench_atonce_0032_kib (line 265) | fn bench_atonce_0032_kib(b: &mut Bencher) {
function bench_atonce_0064_kib (line 270) | fn bench_atonce_0064_kib(b: &mut Bencher) {
function bench_atonce_0128_kib (line 275) | fn bench_atonce_0128_kib(b: &mut Bencher) {
function bench_atonce_0256_kib (line 280) | fn bench_atonce_0256_kib(b: &mut Bencher) {
function bench_atonce_0512_kib (line 285) | fn bench_atonce_0512_kib(b: &mut Bencher) {
function bench_atonce_1024_kib (line 290) | fn bench_atonce_1024_kib(b: &mut Bencher) {
function bench_incremental (line 294) | fn bench_incremental(b: &mut Bencher, len: usize) {
function bench_incremental_0001_block (line 300) | fn bench_incremental_0001_block(b: &mut Bencher) {
function bench_incremental_0001_kib (line 305) | fn bench_incremental_0001_kib(b: &mut Bencher) {
function bench_incremental_0002_kib (line 310) | fn bench_incremental_0002_kib(b: &mut Bencher) {
function bench_incremental_0004_kib (line 315) | fn bench_incremental_0004_kib(b: &mut Bencher) {
function bench_incremental_0008_kib (line 320) | fn bench_incremental_0008_kib(b: &mut Bencher) {
function bench_incremental_0016_kib (line 325) | fn bench_incremental_0016_kib(b: &mut Bencher) {
function bench_incremental_0032_kib (line 330) | fn bench_incremental_0032_kib(b: &mut Bencher) {
function bench_incremental_0064_kib (line 335) | fn bench_incremental_0064_kib(b: &mut Bencher) {
function bench_incremental_0128_kib (line 340) | fn bench_incremental_0128_kib(b: &mut Bencher) {
function bench_incremental_0256_kib (line 345) | fn bench_incremental_0256_kib(b: &mut Bencher) {
function bench_incremental_0512_kib (line 350) | fn bench_incremental_0512_kib(b: &mut Bencher) {
function bench_incremental_1024_kib (line 355) | fn bench_incremental_1024_kib(b: &mut Bencher) {
function bench_reference (line 359) | fn bench_reference(b: &mut Bencher, len: usize) {
function bench_reference_0001_block (line 371) | fn bench_reference_0001_block(b: &mut Bencher) {
function bench_reference_0001_kib (line 376) | fn bench_reference_0001_kib(b: &mut Bencher) {
function bench_reference_0002_kib (line 381) | fn bench_reference_0002_kib(b: &mut Bencher) {
function bench_reference_0004_kib (line 386) | fn bench_reference_0004_kib(b: &mut Bencher) {
function bench_reference_0008_kib (line 391) | fn bench_reference_0008_kib(b: &mut Bencher) {
function bench_reference_0016_kib (line 396) | fn bench_reference_0016_kib(b: &mut Bencher) {
function bench_reference_0032_kib (line 401) | fn bench_reference_0032_kib(b: &mut Bencher) {
function bench_reference_0064_kib (line 406) | fn bench_reference_0064_kib(b: &mut Bencher) {
function bench_reference_0128_kib (line 411) | fn bench_reference_0128_kib(b: &mut Bencher) {
function bench_reference_0256_kib (line 416) | fn bench_reference_0256_kib(b: &mut Bencher) {
function bench_reference_0512_kib (line 421) | fn bench_reference_0512_kib(b: &mut Bencher) {
function bench_reference_1024_kib (line 426) | fn bench_reference_1024_kib(b: &mut Bencher) {
function bench_rayon (line 431) | fn bench_rayon(b: &mut Bencher, len: usize) {
function bench_rayon_0001_block (line 438) | fn bench_rayon_0001_block(b: &mut Bencher) {
function bench_rayon_0001_kib (line 444) | fn bench_rayon_0001_kib(b: &mut Bencher) {
function bench_rayon_0002_kib (line 450) | fn bench_rayon_0002_kib(b: &mut Bencher) {
function bench_rayon_0004_kib (line 456) | fn bench_rayon_0004_kib(b: &mut Bencher) {
function bench_rayon_0008_kib (line 462) | fn bench_rayon_0008_kib(b: &mut Bencher) {
function bench_rayon_0016_kib (line 468) | fn bench_rayon_0016_kib(b: &mut Bencher) {
function bench_rayon_0032_kib (line 474) | fn bench_rayon_0032_kib(b: &mut Bencher) {
function bench_rayon_0064_kib (line 480) | fn bench_rayon_0064_kib(b: &mut Bencher) {
function bench_rayon_0128_kib (line 486) | fn bench_rayon_0128_kib(b: &mut Bencher) {
function bench_rayon_0256_kib (line 492) | fn bench_rayon_0256_kib(b: &mut Bencher) {
function bench_rayon_0512_kib (line 498) | fn bench_rayon_0512_kib(b: &mut Bencher) {
function bench_rayon_1024_kib (line 504) | fn bench_rayon_1024_kib(b: &mut Bencher) {
function bench_two_updates (line 515) | fn bench_two_updates(b: &mut Bencher) {
function bench_xof (line 527) | fn bench_xof(b: &mut Bencher, len: usize) {
function bench_xof_01_block (line 536) | fn bench_xof_01_block(b: &mut Bencher) {
function bench_xof_02_blocks (line 541) | fn bench_xof_02_blocks(b: &mut Bencher) {
function bench_xof_03_blocks (line 546) | fn bench_xof_03_blocks(b: &mut Bencher) {
function bench_xof_04_blocks (line 551) | fn bench_xof_04_blocks(b: &mut Bencher) {
function bench_xof_05_blocks (line 556) | fn bench_xof_05_blocks(b: &mut Bencher) {
function bench_xof_06_blocks (line 561) | fn bench_xof_06_blocks(b: &mut Bencher) {
function bench_xof_07_blocks (line 566) | fn bench_xof_07_blocks(b: &mut Bencher) {
function bench_xof_08_blocks (line 571) | fn bench_xof_08_blocks(b: &mut Bencher) {
function bench_xof_09_blocks (line 576) | fn bench_xof_09_blocks(b: &mut Bencher) {
function bench_xof_10_blocks (line 581) | fn bench_xof_10_blocks(b: &mut Bencher) {
function bench_xof_11_blocks (line 586) | fn bench_xof_11_blocks(b: &mut Bencher) {
function bench_xof_12_blocks (line 591) | fn bench_xof_12_blocks(b: &mut Bencher) {
function bench_xof_13_blocks (line 596) | fn bench_xof_13_blocks(b: &mut Bencher) {
function bench_xof_14_blocks (line 601) | fn bench_xof_14_blocks(b: &mut Bencher) {
function bench_xof_15_blocks (line 606) | fn bench_xof_15_blocks(b: &mut Bencher) {
function bench_xof_16_blocks (line 611) | fn bench_xof_16_blocks(b: &mut Bencher) {
function bench_xof_32_blocks (line 616) | fn bench_xof_32_blocks(b: &mut Bencher) {
function bench_xof_64_blocks (line 621) | fn bench_xof_64_blocks(b: &mut Bencher) {
FILE: third-party/blake3/build.rs
function defined (line 3) | fn defined(var: &str) -> bool {
function is_pure (line 8) | fn is_pure() -> bool {
function should_prefer_intrinsics (line 12) | fn should_prefer_intrinsics() -> bool {
function is_neon (line 16) | fn is_neon() -> bool {
function is_no_neon (line 20) | fn is_no_neon() -> bool {
function is_wasm32_simd (line 24) | fn is_wasm32_simd() -> bool {
function is_ci (line 28) | fn is_ci() -> bool {
function warn (line 32) | fn warn(warning: &str) {
function target_components (line 41) | fn target_components() -> Vec<String> {
function is_x86_64 (line 46) | fn is_x86_64() -> bool {
function is_windows_target (line 50) | fn is_windows_target() -> bool {
function use_msvc_asm (line 54) | fn use_msvc_asm() -> bool {
function is_x86_32 (line 81) | fn is_x86_32() -> bool {
function is_arm (line 86) | fn is_arm() -> bool {
function is_aarch64 (line 90) | fn is_aarch64() -> bool {
function is_armv7 (line 94) | fn is_armv7() -> bool {
function is_wasm32 (line 98) | fn is_wasm32() -> bool {
function endianness (line 102) | fn endianness() -> String {
function is_little_endian (line 108) | fn is_little_endian() -> bool {
function is_big_endian (line 112) | fn is_big_endian() -> bool {
function is_windows_msvc (line 120) | fn is_windows_msvc() -> bool {
function is_windows_gnu (line 132) | fn is_windows_gnu() -> bool {
function new_build (line 140) | fn new_build() -> cc::Build {
type CCompilerSupport (line 154) | enum CCompilerSupport {
function c_compiler_support (line 161) | fn c_compiler_support() -> CCompilerSupport {
function build_sse2_sse41_avx2_rust_intrinsics (line 197) | fn build_sse2_sse41_avx2_rust_intrinsics() {
function build_sse2_sse41_avx2_assembly (line 206) | fn build_sse2_sse41_avx2_assembly() {
function build_avx512_c_intrinsics (line 235) | fn build_avx512_c_intrinsics() {
function build_avx512_assembly (line 254) | fn build_avx512_assembly() {
function build_neon_c_intrinsics (line 281) | fn build_neon_c_intrinsics() {
function build_wasm32_simd (line 296) | fn build_wasm32_simd() {
function main (line 303) | fn main() -> Result<(), Box<dyn std::error::Error>> {
FILE: third-party/blake3/reference_impl/reference_impl.rs
constant OUT_LEN (line 22) | const OUT_LEN: usize = 32;
constant KEY_LEN (line 23) | const KEY_LEN: usize = 32;
constant BLOCK_LEN (line 24) | const BLOCK_LEN: usize = 64;
constant CHUNK_LEN (line 25) | const CHUNK_LEN: usize = 1024;
constant CHUNK_START (line 27) | const CHUNK_START: u32 = 1 << 0;
constant CHUNK_END (line 28) | const CHUNK_END: u32 = 1 << 1;
constant PARENT (line 29) | const PARENT: u32 = 1 << 2;
constant ROOT (line 30) | const ROOT: u32 = 1 << 3;
constant KEYED_HASH (line 31) | const KEYED_HASH: u32 = 1 << 4;
constant DERIVE_KEY_CONTEXT (line 32) | const DERIVE_KEY_CONTEXT: u32 = 1 << 5;
constant DERIVE_KEY_MATERIAL (line 33) | const DERIVE_KEY_MATERIAL: u32 = 1 << 6;
constant IV (line 35) | const IV: [u32; 8] = [
constant MSG_PERMUTATION (line 39) | const MSG_PERMUTATION: [usize; 16] = [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 1...
function g (line 42) | fn g(state: &mut [u32; 16], a: usize, b: usize, c: usize, d: usize, mx: ...
function round (line 53) | fn round(state: &mut [u32; 16], m: &[u32; 16]) {
function permute (line 66) | fn permute(m: &mut [u32; 16]) {
function compress (line 74) | fn compress(
function first_8_words (line 113) | fn first_8_words(compression_output: [u32; 16]) -> [u32; 8] {
function words_from_little_endian_bytes (line 117) | fn words_from_little_endian_bytes(bytes: &[u8], words: &mut [u32]) {
type Output (line 127) | struct Output {
method chaining_value (line 136) | fn chaining_value(&self) -> [u32; 8] {
method root_output_bytes (line 146) | fn root_output_bytes(&self, out_slice: &mut [u8]) {
type ChunkState (line 165) | struct ChunkState {
method new (line 175) | fn new(key_words: [u32; 8], chunk_counter: u64, flags: u32) -> Self {
method len (line 186) | fn len(&self) -> usize {
method start_flag (line 190) | fn start_flag(&self) -> u32 {
method update (line 198) | fn update(&mut self, mut input: &[u8]) {
method output (line 226) | fn output(&self) -> Output {
function parent_output (line 239) | fn parent_output(
function parent_cv (line 257) | fn parent_cv(
type Hasher (line 267) | pub struct Hasher {
method new_internal (line 276) | fn new_internal(key_words: [u32; 8], flags: u32) -> Self {
method new (line 287) | pub fn new() -> Self {
method new_keyed (line 292) | pub fn new_keyed(key: &[u8; KEY_LEN]) -> Self {
method new_derive_key (line 300) | pub fn new_derive_key(context: &str) -> Self {
method push_stack (line 310) | fn push_stack(&mut self, cv: [u32; 8]) {
method pop_stack (line 315) | fn pop_stack(&mut self) -> [u32; 8] {
method add_chunk_chaining_value (line 321) | fn add_chunk_chaining_value(&mut self, mut new_cv: [u32; 8], mut total...
method update (line 337) | pub fn update(&mut self, mut input: &[u8]) {
method finalize (line 357) | pub fn finalize(&self, out_slice: &mut [u8]) {
FILE: third-party/blake3/src/ffi_avx2.rs
function hash_many (line 7) | pub unsafe fn hash_many<const N: usize>(
function blake3_hash_many_avx2 (line 39) | pub fn blake3_hash_many_avx2(
function test_hash_many (line 59) | fn test_hash_many() {
FILE: third-party/blake3/src/ffi_avx512.rs
function compress_in_place (line 4) | pub unsafe fn compress_in_place(
function compress_xof (line 23) | pub unsafe fn compress_xof(
function hash_many (line 45) | pub unsafe fn hash_many<const N: usize>(
function xof_many (line 77) | pub unsafe fn xof_many(
function blake3_compress_in_place_avx512 (line 101) | pub fn blake3_compress_in_place_avx512(
function blake3_compress_xof_avx512 (line 108) | pub fn blake3_compress_xof_avx512(
function blake3_hash_many_avx512 (line 116) | pub fn blake3_hash_many_avx512(
function blake3_xof_many_avx512 (line 129) | pub fn blake3_xof_many_avx512(
function test_compress (line 146) | fn test_compress() {
function test_hash_many (line 154) | fn test_hash_many() {
function test_xof_many (line 163) | fn test_xof_many() {
FILE: third-party/blake3/src/ffi_neon.rs
function hash_many (line 4) | pub unsafe fn hash_many<const N: usize>(
function blake3_compress_in_place_portable (line 37) | pub extern "C" fn blake3_compress_in_place_portable(
function blake3_hash_many_neon (line 57) | pub fn blake3_hash_many_neon(
function test_hash_many (line 77) | fn test_hash_many() {
FILE: third-party/blake3/src/ffi_sse2.rs
function compress_in_place (line 4) | pub unsafe fn compress_in_place(
function compress_xof (line 23) | pub unsafe fn compress_xof(
function hash_many (line 45) | pub unsafe fn hash_many<const N: usize>(
function blake3_compress_in_place_sse2 (line 77) | pub fn blake3_compress_in_place_sse2(
function blake3_compress_xof_sse2 (line 84) | pub fn blake3_compress_xof_sse2(
function blake3_hash_many_sse2 (line 92) | pub fn blake3_hash_many_sse2(
function test_compress (line 112) | fn test_compress() {
function test_hash_many (line 120) | fn test_hash_many() {
FILE: third-party/blake3/src/ffi_sse41.rs
function compress_in_place (line 4) | pub unsafe fn compress_in_place(
function compress_xof (line 23) | pub unsafe fn compress_xof(
function hash_many (line 45) | pub unsafe fn hash_many<const N: usize>(
function blake3_compress_in_place_sse41 (line 77) | pub fn blake3_compress_in_place_sse41(
function blake3_compress_xof_sse41 (line 84) | pub fn blake3_compress_xof_sse41(
function blake3_hash_many_sse41 (line 92) | pub fn blake3_hash_many_sse41(
function test_compress (line 112) | fn test_compress() {
function test_hash_many (line 120) | fn test_hash_many() {
FILE: third-party/blake3/src/guts.rs
type ChunkState (line 6) | pub struct ChunkState(crate::ChunkState);
method new (line 11) | pub fn new(chunk_counter: u64) -> Self {
method len (line 21) | pub fn len(&self) -> usize {
method update (line 26) | pub fn update(&mut self, input: &[u8]) -> &mut Self {
method finalize (line 31) | pub fn finalize(&self, is_root: bool) -> crate::Hash {
function parent_cv (line 43) | pub fn parent_cv(
FILE: third-party/blake3/src/hazmat.rs
type HasherExt (line 156) | pub trait HasherExt {
method new_from_context_key (line 175) | fn new_from_context_key(context_key: &ContextKey) -> Self;
method set_input_offset (line 203) | fn set_input_offset(&mut self, offset: u64) -> &mut Self;
method finalize_non_root (line 214) | fn finalize_non_root(&self) -> ChainingValue;
method new_from_context_key (line 218) | fn new_from_context_key(context_key: &[u8; KEY_LEN]) -> Hasher {
method set_input_offset (line 223) | fn set_input_offset(&mut self, offset: u64) -> &mut Hasher {
method finalize_non_root (line 236) | fn finalize_non_root(&self) -> ChainingValue {
function max_subtree_len (line 291) | pub fn max_subtree_len(input_offset: u64) -> Option<u64> {
function test_max_subtree_len (line 302) | fn test_max_subtree_len() {
function left_subtree_len (line 371) | pub fn left_subtree_len(input_len: u64) -> u64 {
function test_left_subtree_len (line 378) | fn test_left_subtree_len() {
type Mode (line 392) | pub enum Mode<'a> {
function key_words (line 406) | fn key_words(&self) -> CVWords {
function flags_byte (line 414) | fn flags_byte(&self) -> u8 {
type ChainingValue (line 428) | pub type ChainingValue = [u8; OUT_LEN];
function merge_subtrees_inner (line 430) | fn merge_subtrees_inner(
function merge_subtrees_non_root (line 451) | pub fn merge_subtrees_non_root(
function merge_subtrees_root (line 469) | pub fn merge_subtrees_root(
function merge_subtrees_root_xof (line 519) | pub fn merge_subtrees_root_xof(
type ContextKey (line 528) | pub type ContextKey = [u8; KEY_LEN];
function hash_derive_key_context (line 548) | pub fn hash_derive_key_context(context: &str) -> ContextKey {
function test_empty_subtree_should_panic (line 564) | fn test_empty_subtree_should_panic() {
function test_unaligned_offset_should_panic (line 570) | fn test_unaligned_offset_should_panic() {
function test_hasher_already_accepted_input_should_panic (line 576) | fn test_hasher_already_accepted_input_should_panic() {
function test_too_much_input_should_panic (line 582) | fn test_too_much_input_should_panic() {
function test_set_input_offset_cant_finalize (line 590) | fn test_set_input_offset_cant_finalize() {
function test_set_input_offset_cant_finalize_xof (line 596) | fn test_set_input_offset_cant_finalize_xof() {
function test_grouped_hash (line 603) | fn test_grouped_hash() {
function test_keyed_hash_xof (line 662) | fn test_keyed_hash_xof() {
function test_derive_key (line 687) | fn test_derive_key() {
FILE: third-party/blake3/src/io.rs
function copy_wide (line 4) | pub(crate) fn copy_wide(
function maybe_mmap_file (line 50) | pub(crate) fn maybe_mmap_file(file: &std::fs::File) -> std::io::Result<O...
FILE: third-party/blake3/src/join.rs
type Join (line 22) | pub trait Join {
method join (line 23) | fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
method join (line 41) | fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
method join (line 63) | fn join<A, B, RA, RB>(oper_a: A, oper_b: B) -> (RA, RB)
type SerialJoin (line 37) | pub enum SerialJoin {}
type RayonJoin (line 58) | pub enum RayonJoin {}
function test_serial_join (line 79) | fn test_serial_join() {
function test_rayon_join (line 87) | fn test_rayon_join() {
FILE: third-party/blake3/src/lib.rs
constant OUT_LEN (line 152) | pub const OUT_LEN: usize = 32;
constant KEY_LEN (line 155) | pub const KEY_LEN: usize = 32;
constant BLOCK_LEN (line 162) | pub const BLOCK_LEN: usize = 64;
constant CHUNK_LEN (line 168) | pub const CHUNK_LEN: usize = 1024;
constant MAX_DEPTH (line 170) | const MAX_DEPTH: usize = 54;
type CVWords (line 177) | type CVWords = [u32; 8];
type CVBytes (line 178) | type CVBytes = [u8; 32];
constant IV (line 180) | const IV: &CVWords = &[
constant MSG_SCHEDULE (line 184) | const MSG_SCHEDULE: [[usize; 16]; 7] = [
constant CHUNK_START (line 198) | const CHUNK_START: u8 = 1 << 0;
constant CHUNK_END (line 199) | const CHUNK_END: u8 = 1 << 1;
constant PARENT (line 200) | const PARENT: u8 = 1 << 2;
constant ROOT (line 201) | const ROOT: u8 = 1 << 3;
constant KEYED_HASH (line 202) | const KEYED_HASH: u8 = 1 << 4;
constant DERIVE_KEY_CONTEXT (line 203) | const DERIVE_KEY_CONTEXT: u8 = 1 << 5;
constant DERIVE_KEY_MATERIAL (line 204) | const DERIVE_KEY_MATERIAL: u8 = 1 << 6;
function counter_low (line 207) | fn counter_low(counter: u64) -> u32 {
function counter_high (line 212) | fn counter_high(counter: u64) -> u32 {
type Hash (line 242) | pub struct Hash([u8; OUT_LEN]);
method as_bytes (line 249) | pub const fn as_bytes(&self) -> &[u8; OUT_LEN] {
method from_bytes (line 254) | pub const fn from_bytes(bytes: [u8; OUT_LEN]) -> Self {
method from_slice (line 261) | pub fn from_slice(bytes: &[u8]) -> Result<Self, core::array::TryFromSl...
method to_hex (line 273) | pub fn to_hex(&self) -> ArrayString<{ 2 * OUT_LEN }> {
method from_hex (line 292) | pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self, HexError> {
method from (line 315) | fn from(bytes: [u8; OUT_LEN]) -> Self {
type Err (line 328) | type Err = HexError;
method from_str (line 330) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method eq (line 355) | fn eq(&self, other: &[u8; OUT_LEN]) -> bool {
method eq (line 363) | fn eq(&self, other: &[u8]) -> bool {
method fmt (line 369) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
method fmt (line 381) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
function from (line 322) | fn from(hash: Hash) -> Self {
method zeroize (line 337) | fn zeroize(&mut self) {
method eq (line 347) | fn eq(&self, other: &Hash) -> bool {
type HexError (line 398) | pub struct HexError(HexErrorInner);
method fmt (line 407) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
type HexErrorInner (line 401) | enum HexErrorInner {
type Output (line 430) | struct Output {
method chaining_value (line 440) | fn chaining_value(&self) -> CVBytes {
method root_hash (line 452) | fn root_hash(&self) -> Hash {
method root_output_block (line 460) | fn root_output_block(&self) -> [u8; 2 * OUT_LEN] {
method zeroize (line 473) | fn zeroize(&mut self) {
type ChunkState (line 493) | struct ChunkState {
method new (line 504) | fn new(key: &CVWords, chunk_counter: u64, flags: u8, platform: Platfor...
method count (line 516) | fn count(&self) -> usize {
method fill_buf (line 520) | fn fill_buf(&mut self, input: &mut &[u8]) {
method start_flag (line 528) | fn start_flag(&self) -> u8 {
method update (line 538) | fn update(&mut self, mut input: &[u8]) -> &mut Self {
method output (line 577) | fn output(&self) -> Output {
method fmt (line 592) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
method zeroize (line 604) | fn zeroize(&mut self) {
type IncrementCounter (line 643) | pub enum IncrementCounter {
method yes (line 650) | fn yes(&self) -> bool {
function largest_power_of_two_leq (line 660) | fn largest_power_of_two_leq(n: usize) -> usize {
function compress_chunks_parallel (line 668) | fn compress_chunks_parallel(
function compress_parents_parallel (line 715) | fn compress_parents_parallel(
function compress_subtree_wide (line 772) | fn compress_subtree_wide<J: join::Join>(
function compress_subtree_to_parent_node (line 846) | fn compress_subtree_to_parent_node<J: join::Join>(
function hash_all_at_once (line 873) | fn hash_all_at_once<J: join::Join>(input: &[u8], key: &CVWords, flags: u...
function hash (line 914) | pub fn hash(input: &[u8]) -> Hash {
function keyed_hash (line 943) | pub fn keyed_hash(key: &[u8; KEY_LEN], input: &[u8]) -> Hash {
function derive_key (line 997) | pub fn derive_key(context: &str, key_material: &[u8]) -> [u8; OUT_LEN] {
function parent_node_output (line 1005) | fn parent_node_output(
type Hasher (line 1060) | pub struct Hasher {
method new_internal (line 1073) | fn new_internal(key: &CVWords, flags: u8) -> Self {
method new (line 1083) | pub fn new() -> Self {
method new_keyed (line 1091) | pub fn new_keyed(key: &[u8; KEY_LEN]) -> Self {
method new_derive_key (line 1101) | pub fn new_derive_key(context: &str) -> Self {
method reset (line 1111) | pub fn reset(&mut self) -> &mut Self {
method merge_cv_stack (line 1133) | fn merge_cv_stack(&mut self, chunk_counter: u64) {
method push_cv (line 1186) | fn push_cv(&mut self, new_cv: &CVBytes, chunk_counter: u64) {
method update (line 1198) | pub fn update(&mut self, input: &[u8]) -> &mut Self {
method update_with_join (line 1202) | fn update_with_join<J: join::Join>(&mut self, mut input: &[u8]) -> &mu...
method final_output (line 1333) | fn final_output(&self) -> Output {
method finalize (line 1392) | pub fn finalize(&self) -> Hash {
method finalize_xof (line 1407) | pub fn finalize_xof(&self) -> OutputReader {
method count (line 1419) | pub fn count(&self) -> u64 {
method update_reader (line 1465) | pub fn update_reader(&mut self, reader: impl std::io::Read) -> std::io...
method update_rayon (line 1491) | pub fn update_rayon(&mut self, input: &[u8]) -> &mut Self {
method update_mmap (line 1537) | pub fn update_mmap(&mut self, path: impl AsRef<std::path::Path>) -> st...
method update_mmap_rayon (line 1589) | pub fn update_mmap_rayon(
method fmt (line 1605) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
method write (line 1624) | fn write(&mut self, input: &[u8]) -> std::io::Result<usize> {
method flush (line 1630) | fn flush(&mut self) -> std::io::Result<()> {
method default (line 1615) | fn default() -> Self {
method zeroize (line 1637) | fn zeroize(&mut self) {
type OutputReader (line 1677) | pub struct OutputReader {
method new (line 1683) | fn new(inner: Output) -> Self {
method fill_one_block (line 1693) | fn fill_one_block(&mut self, buf: &mut &mut [u8]) {
method fill (line 1722) | pub fn fill(&mut self, mut buf: &mut [u8]) {
method position (line 1764) | pub fn position(&self) -> u64 {
method set_position (line 1774) | pub fn set_position(&mut self, position: u64) {
method fmt (line 1782) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
method read (line 1792) | fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
method seek (line 1800) | fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result<u64> {
method zeroize (line 1825) | fn zeroize(&mut self) {
FILE: third-party/blake3/src/platform.rs
type Platform (line 45) | pub enum Platform {
method detect (line 65) | pub fn detect() -> Self {
method simd_degree (line 102) | pub fn simd_degree(&self) -> usize {
method compress_in_place (line 123) | pub fn compress_in_place(
method compress_xof (line 159) | pub fn compress_xof(
method hash_many (line 205) | pub fn hash_many<const N: usize>(
method xof_many (line 315) | pub fn xof_many(
method portable (line 352) | pub fn portable() -> Self {
method sse2 (line 357) | pub fn sse2() -> Option<Self> {
method sse41 (line 366) | pub fn sse41() -> Option<Self> {
method avx2 (line 375) | pub fn avx2() -> Option<Self> {
method avx512 (line 385) | pub fn avx512() -> Option<Self> {
method neon (line 394) | pub fn neon() -> Option<Self> {
method wasm32_simd (line 400) | pub fn wasm32_simd() -> Option<Self> {
function avx512_detected (line 412) | pub fn avx512_detected() -> bool {
function avx2_detected (line 439) | pub fn avx2_detected() -> bool {
function sse41_detected (line 466) | pub fn sse41_detected() -> bool {
function sse2_detected (line 493) | pub fn sse2_detected() -> bool {
function words_from_le_bytes_32 (line 518) | pub fn words_from_le_bytes_32(bytes: &[u8; 32]) -> [u32; 8] {
function words_from_le_bytes_64 (line 532) | pub fn words_from_le_bytes_64(bytes: &[u8; 64]) -> [u32; 16] {
function le_bytes_from_words_32 (line 554) | pub fn le_bytes_from_words_32(words: &[u32; 8]) -> [u8; 32] {
function le_bytes_from_words_64 (line 568) | pub fn le_bytes_from_words_64(words: &[u32; 16]) -> [u8; 64] {
FILE: third-party/blake3/src/portable.rs
function g (line 8) | fn g(state: &mut [u32; 16], a: usize, b: usize, c: usize, d: usize, x: u...
function round (line 20) | fn round(state: &mut [u32; 16], msg: &[u32; 16], round: usize) {
function compress_pre (line 38) | fn compress_pre(
function compress_in_place (line 77) | pub fn compress_in_place(
function compress_xof (line 96) | pub fn compress_xof(
function hash1 (line 123) | pub fn hash1<const N: usize>(
function hash_many (line 153) | pub fn hash_many<const N: usize>(
function test_compress (line 189) | fn test_compress() {
function test_hash_many (line 195) | fn test_hash_many() {
FILE: third-party/blake3/src/rust_avx2.rs
constant DEGREE (line 11) | pub const DEGREE: usize = 8;
function loadu (line 14) | unsafe fn loadu(src: *const u8) -> __m256i {
function storeu (line 20) | unsafe fn storeu(src: __m256i, dest: *mut u8) {
function add (line 26) | unsafe fn add(a: __m256i, b: __m256i) -> __m256i {
function xor (line 31) | unsafe fn xor(a: __m256i, b: __m256i) -> __m256i {
function set1 (line 36) | unsafe fn set1(x: u32) -> __m256i {
function set8 (line 41) | unsafe fn set8(a: u32, b: u32, c: u32, d: u32, e: u32, f: u32, g: u32, h...
function rot16 (line 56) | unsafe fn rot16(x: __m256i) -> __m256i {
function rot12 (line 61) | unsafe fn rot12(x: __m256i) -> __m256i {
function rot8 (line 66) | unsafe fn rot8(x: __m256i) -> __m256i {
function rot7 (line 71) | unsafe fn rot7(x: __m256i) -> __m256i {
function round (line 76) | unsafe fn round(v: &mut [__m256i; 16], m: &[__m256i; 16], r: usize) {
function interleave128 (line 193) | unsafe fn interleave128(a: __m256i, b: __m256i) -> (__m256i, __m256i) {
function transpose_vecs (line 207) | unsafe fn transpose_vecs(vecs: &mut [__m256i; DEGREE]) {
function transpose_msg_vecs (line 245) | unsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset:...
function load_counters (line 274) | unsafe fn load_counters(counter: u64, increment_counter: IncrementCounte...
function hash8 (line 301) | pub unsafe fn hash8(
function hash_many (line 386) | pub unsafe fn hash_many<const N: usize>(
function test_transpose (line 436) | fn test_transpose() {
function test_hash_many (line 468) | fn test_hash_many() {
FILE: third-party/blake3/src/rust_sse2.rs
constant DEGREE (line 12) | pub const DEGREE: usize = 4;
function loadu (line 15) | unsafe fn loadu(src: *const u8) -> __m128i {
function storeu (line 21) | unsafe fn storeu(src: __m128i, dest: *mut u8) {
function add (line 27) | unsafe fn add(a: __m128i, b: __m128i) -> __m128i {
function xor (line 32) | unsafe fn xor(a: __m128i, b: __m128i) -> __m128i {
function set1 (line 37) | unsafe fn set1(x: u32) -> __m128i {
function set4 (line 42) | unsafe fn set4(a: u32, b: u32, c: u32, d: u32) -> __m128i {
function rot16 (line 55) | unsafe fn rot16(a: __m128i) -> __m128i {
function rot12 (line 60) | unsafe fn rot12(a: __m128i) -> __m128i {
function rot8 (line 65) | unsafe fn rot8(a: __m128i) -> __m128i {
function rot7 (line 70) | unsafe fn rot7(a: __m128i) -> __m128i {
function g1 (line 75) | unsafe fn g1(
function g2 (line 91) | unsafe fn g2(
function diagonalize (line 127) | unsafe fn diagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut...
function undiagonalize (line 134) | unsafe fn undiagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &m...
function blend_epi16 (line 141) | unsafe fn blend_epi16(a: __m128i, b: __m128i, imm8: i32) -> __m128i {
function compress_pre (line 150) | unsafe fn compress_pre(
function compress_in_place (line 336) | pub unsafe fn compress_in_place(
function compress_xof (line 349) | pub unsafe fn compress_xof(
function round (line 366) | unsafe fn round(v: &mut [__m128i; 16], m: &[__m128i; 16], r: usize) {
function transpose_vecs (line 483) | unsafe fn transpose_vecs(vecs: &mut [__m128i; DEGREE]) {
function transpose_msg_vecs (line 505) | unsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset:...
function load_counters (line 536) | unsafe fn load_counters(counter: u64, increment_counter: IncrementCounte...
function hash4 (line 555) | pub unsafe fn hash4(
function hash1 (line 644) | unsafe fn hash1<const N: usize>(
function hash_many (line 675) | pub unsafe fn hash_many<const N: usize>(
function test_transpose (line 729) | fn test_transpose() {
function test_compress (line 761) | fn test_compress() {
function test_hash_many (line 769) | fn test_hash_many() {
FILE: third-party/blake3/src/rust_sse41.rs
constant DEGREE (line 12) | pub const DEGREE: usize = 4;
function loadu (line 15) | unsafe fn loadu(src: *const u8) -> __m128i {
function storeu (line 21) | unsafe fn storeu(src: __m128i, dest: *mut u8) {
function add (line 27) | unsafe fn add(a: __m128i, b: __m128i) -> __m128i {
function xor (line 32) | unsafe fn xor(a: __m128i, b: __m128i) -> __m128i {
function set1 (line 37) | unsafe fn set1(x: u32) -> __m128i {
function set4 (line 42) | unsafe fn set4(a: u32, b: u32, c: u32, d: u32) -> __m128i {
function rot16 (line 55) | unsafe fn rot16(a: __m128i) -> __m128i {
function rot12 (line 60) | unsafe fn rot12(a: __m128i) -> __m128i {
function rot8 (line 65) | unsafe fn rot8(a: __m128i) -> __m128i {
function rot7 (line 70) | unsafe fn rot7(a: __m128i) -> __m128i {
function g1 (line 75) | unsafe fn g1(
function g2 (line 91) | unsafe fn g2(
function diagonalize (line 127) | unsafe fn diagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &mut...
function undiagonalize (line 134) | unsafe fn undiagonalize(row0: &mut __m128i, row2: &mut __m128i, row3: &m...
function compress_pre (line 141) | unsafe fn compress_pre(
function compress_in_place (line 327) | pub unsafe fn compress_in_place(
function compress_xof (line 340) | pub unsafe fn compress_xof(
function round (line 357) | unsafe fn round(v: &mut [__m128i; 16], m: &[__m128i; 16], r: usize) {
function transpose_vecs (line 474) | unsafe fn transpose_vecs(vecs: &mut [__m128i; DEGREE]) {
function transpose_msg_vecs (line 496) | unsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset:...
function load_counters (line 527) | unsafe fn load_counters(counter: u64, increment_counter: IncrementCounte...
function hash4 (line 546) | pub unsafe fn hash4(
function hash1 (line 635) | unsafe fn hash1<const N: usize>(
function hash_many (line 666) | pub unsafe fn hash_many<const N: usize>(
function test_transpose (line 720) | fn test_transpose() {
function test_compress (line 752) | fn test_compress() {
function test_hash_many (line 760) | fn test_hash_many() {
FILE: third-party/blake3/src/test.rs
constant TEST_CASES (line 8) | pub const TEST_CASES: &[usize] = &[
constant TEST_CASES_MAX (line 50) | pub const TEST_CASES_MAX: usize = 100 * CHUNK_LEN;
constant TEST_KEY (line 53) | pub const TEST_KEY: CVBytes = *b"whats the Elvish word for friend";
constant TEST_KEY_WORDS (line 54) | pub const TEST_KEY_WORDS: CVWords = [
function paint_test_input (line 62) | pub fn paint_test_input(buf: &mut [u8]) {
type CompressInPlaceFn (line 68) | type CompressInPlaceFn =
type CompressXofFn (line 71) | type CompressXofFn = unsafe fn(
function test_compress_fn (line 80) | pub fn test_compress_fn(compress_in_place_fn: CompressInPlaceFn, compres...
type HashManyFn (line 102) | type HashManyFn<A> = unsafe fn(
function test_hash_many_fn (line 114) | pub fn test_hash_many_fn(
type XofManyFunction (line 214) | type XofManyFunction = unsafe fn(
function test_xof_many_fn (line 225) | pub fn test_xof_many_fn(xof_many_function: XofManyFunction) {
function test_key_bytes_equal_key_words (line 284) | fn test_key_bytes_equal_key_words() {
function test_reference_impl_size (line 292) | fn test_reference_impl_size() {
function test_counter_words (line 302) | fn test_counter_words() {
function test_largest_power_of_two_leq (line 309) | fn test_largest_power_of_two_leq() {
function test_compare_reference_impl (line 335) | fn test_compare_reference_impl() {
function test_compare_reference_impl_long_xof (line 435) | fn test_compare_reference_impl_long_xof() {
function test_xof_partial_blocks (line 450) | fn test_xof_partial_blocks() {
function reference_hash (line 471) | fn reference_hash(input: &[u8]) -> crate::Hash {
function test_compare_update_multiple (line 480) | fn test_compare_update_multiple() {
function test_fuzz_hasher (line 516) | fn test_fuzz_hasher() {
function test_fuzz_xof (line 548) | fn test_fuzz_xof() {
function test_xof_seek (line 584) | fn test_xof_seek() {
function test_msg_schedule_permutation (line 628) | fn test_msg_schedule_permutation() {
function test_reset (line 644) | fn test_reset() {
function test_hex_encoding_decoding (line 671) | fn test_hex_encoding_decoding() {
function test_issue_206_windows_sse2 (line 719) | fn test_issue_206_windows_sse2() {
function test_hash_conversions (line 739) | fn test_hash_conversions() {
function test_hash_const_conversions (line 767) | const fn test_hash_const_conversions() {
function test_zeroize (line 775) | fn test_zeroize() {
function test_update_reader (line 838) | fn test_update_reader() -> Result<(), std::io::Error> {
function test_update_reader_interrupted (line 852) | fn test_update_reader_interrupted() -> std::io::Result<()> {
function test_mmap (line 891) | fn test_mmap() -> Result<(), std::io::Error> {
function test_mmap_virtual_file (line 912) | fn test_mmap_virtual_file() -> Result<(), std::io::Error> {
function test_mmap_rayon (line 933) | fn test_mmap_rayon() -> Result<(), std::io::Error> {
function test_serde (line 954) | fn test_serde() {
function test_miri_smoketest (line 1003) | fn test_miri_smoketest() {
function test_chunk (line 1022) | fn test_chunk() {
function test_parents (line 1030) | fn test_parents() {
FILE: third-party/blake3/src/traits.rs
method update (line 14) | fn update(&mut self, data: &[u8]) {
method reset (line 21) | fn reset(&mut self) {
type OutputSize (line 27) | type OutputSize = U32;
method finalize_into (line 32) | fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>) {
method finalize_into_reset (line 39) | fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::Outpu...
type Reader (line 46) | type Reader = OutputReader;
method finalize_xof (line 49) | fn finalize_xof(self) -> Self::Reader {
method finalize_xof_reset (line 56) | fn finalize_xof_reset(&mut self) -> Self::Reader {
method read (line 65) | fn read(&mut self, buffer: &mut [u8]) {
type KeySize (line 71) | type KeySize = U32;
type BlockSize (line 75) | type BlockSize = U64;
method new (line 82) | fn new(key: &digest::Key<Self>) -> Self {
function test_digest_traits (line 93) | fn test_digest_traits() {
function test_mac_trait (line 153) | fn test_mac_trait() {
function expected_hmac_blake3 (line 174) | fn expected_hmac_blake3(key: &[u8], input: &[u8]) -> [u8; 32] {
function test_hmac_compatibility (line 199) | fn test_hmac_compatibility() {
FILE: third-party/blake3/src/wasm32_simd.rs
constant DEGREE (line 25) | pub const DEGREE: usize = 4;
function loadu (line 28) | unsafe fn loadu(src: *const u8) -> v128 {
function storeu (line 34) | unsafe fn storeu(src: v128, dest: *mut u8) {
function add (line 40) | fn add(a: v128, b: v128) -> v128 {
function xor (line 45) | fn xor(a: v128, b: v128) -> v128 {
function set1 (line 50) | fn set1(x: u32) -> v128 {
function set4 (line 55) | fn set4(a: u32, b: u32, c: u32, d: u32) -> v128 {
function rot16 (line 67) | fn rot16(a: v128) -> v128 {
function rot12 (line 72) | fn rot12(a: v128) -> v128 {
function rot8 (line 77) | fn rot8(a: v128) -> v128 {
function rot7 (line 82) | fn rot7(a: v128) -> v128 {
function g1 (line 87) | fn g1(row0: &mut v128, row1: &mut v128, row2: &mut v128, row3: &mut v128...
function g2 (line 97) | fn g2(row0: &mut v128, row1: &mut v128, row2: &mut v128, row3: &mut v128...
function unpacklo_epi64 (line 114) | fn unpacklo_epi64(a: v128, b: v128) -> v128 {
function unpackhi_epi64 (line 119) | fn unpackhi_epi64(a: v128, b: v128) -> v128 {
function unpacklo_epi32 (line 124) | fn unpacklo_epi32(a: v128, b: v128) -> v128 {
function unpackhi_epi32 (line 129) | fn unpackhi_epi32(a: v128, b: v128) -> v128 {
function shuffle_epi32 (line 134) | fn shuffle_epi32<const I3: usize, const I2: usize, const I1: usize, cons...
function blend_epi16 (line 144) | fn blend_epi16(a: v128, b: v128, imm8: i32) -> v128 {
function diagonalize (line 159) | fn diagonalize(row0: &mut v128, row2: &mut v128, row3: &mut v128) {
function undiagonalize (line 166) | fn undiagonalize(row0: &mut v128, row2: &mut v128, row3: &mut v128) {
function compress_pre (line 173) | fn compress_pre(
function compress_in_place (line 361) | pub fn compress_in_place(
function compress_xof (line 378) | pub fn compress_xof(
function round (line 398) | fn round(v: &mut [v128; 16], m: &[v128; 16], r: usize) {
function transpose_vecs (line 515) | fn transpose_vecs(vecs: &mut [v128; DEGREE]) {
function transpose_msg_vecs (line 537) | unsafe fn transpose_msg_vecs(inputs: &[*const u8; DEGREE], block_offset:...
function load_counters (line 565) | fn load_counters(counter: u64, increment_counter: IncrementCounter) -> (...
function hash4 (line 584) | pub unsafe fn hash4(
function hash1 (line 673) | unsafe fn hash1<const N: usize>(
function hash_many (line 704) | pub unsafe fn hash_many<const N: usize>(
function test_transpose (line 758) | fn test_transpose() {
function test_compress (line 786) | fn test_compress() {
function test_hash_many (line 791) | fn test_hash_many() {
FILE: third-party/blake3/test_vectors/src/bin/generate.rs
function main (line 1) | fn main() {
FILE: third-party/blake3/test_vectors/src/lib.rs
constant TEST_VECTORS_JSON (line 6) | const TEST_VECTORS_JSON: &str = include_str!("../test_vectors.json");
constant OUTPUT_LEN (line 10) | pub const OUTPUT_LEN: usize = 2 * BLOCK_LEN + 3;
constant TEST_CASES (line 12) | pub const TEST_CASES: &[usize] = &[
constant TEST_KEY (line 50) | pub const TEST_KEY: &[u8; blake3::KEY_LEN] = b"whats the Elvish word for...
constant TEST_CONTEXT (line 51) | pub const TEST_CONTEXT: &str = "BLAKE3 2019-12-27 16:29:52 test vectors ...
constant COMMENT (line 53) | const COMMENT: &str = r#"
function paint_test_input (line 69) | pub fn paint_test_input(buf: &mut [u8]) {
type Cases (line 76) | pub struct Cases {
type Case (line 84) | pub struct Case {
function generate_json (line 91) | pub fn generate_json() -> String {
function parse_test_cases (line 136) | pub fn parse_test_cases() -> Cases {
function test_reference_impl_all_at_once (line 144) | fn test_reference_impl_all_at_once(
function test_reference_impl_one_at_a_time (line 170) | fn test_reference_impl_one_at_a_time(
function test_incremental_all_at_once (line 202) | fn test_incremental_all_at_once(
function test_incremental_one_at_a_time (line 231) | fn test_incremental_one_at_a_time(
function test_recursive (line 269) | fn test_recursive(
function run_test_vectors (line 288) | fn run_test_vectors() {
function test_checked_in_vectors_up_to_date (line 342) | fn test_checked_in_vectors_up_to_date() {
FILE: third-party/blake3/tools/compiler_version/build.rs
function main (line 1) | fn main() {
FILE: third-party/blake3/tools/compiler_version/src/main.rs
function main (line 3) | fn main() {
FILE: third-party/blake3/tools/instruction_set_support/src/main.rs
function main (line 1) | fn main() {
FILE: third-party/mimalloc/doc/mimalloc-doc.h
type mi_arena_id_t (line 499) | typedef int mi_arena_id_t;
type mi_heap_s (line 640) | struct mi_heap_s
type mi_heap_t (line 646) | typedef struct mi_heap_s mi_heap_t;
type mi_heap_area_t (line 853) | typedef struct mi_heap_area_s {
type mi_option_t (line 911) | typedef enum mi_option_e {
FILE: third-party/mimalloc/include/mimalloc-new-delete.h
function delete (line 34) | void operator delete(void* p) noexcept { mi_free(p); }
function noexcept (line 35) | void operator delete[](void* p) noexcept { mi_free(p); }
function operator (line 37) | void operator delete (void* p, const std::nothrow_t&) noexcept { mi_fre...
function noexcept (line 38) | void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_fre...
function operator (line 47) | void operator delete (void* p, std::size_t n) noexcept { mi_free_size(p...
function noexcept (line 48) | void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p...
function operator (line 52) | void operator delete (void* p, std::align_val_t al) noexcept { mi_free_...
function noexcept (line 53) | void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_...
function operator (line 54) | void operator delete (void* p, std::size_t n, std::align_val_t al) noex...
function noexcept (line 55) | void operator delete[](void* p, std::size_t n, std::align_val_t al) noex...
function operator (line 56) | void operator delete (void* p, std::align_val_t al, const std::nothrow_...
function noexcept (line 57) | void operator delete[](void* p, std::align_val_t al, const std::nothrow_...
FILE: third-party/mimalloc/include/mimalloc-stats.h
type mi_stat_count_t (line 17) | typedef struct mi_stat_count_s {
type mi_stat_counter_t (line 24) | typedef struct mi_stat_counter_s {
function MI_STAT_COUNT (line 30) | MI_STAT_COUNT(reserved) /* reserved memory bytes */ \
FILE: third-party/mimalloc/include/mimalloc.h
type mi_heap_s (line 188) | struct mi_heap_s
type mi_heap_t (line 189) | typedef struct mi_heap_s mi_heap_t;
type mi_heap_area_t (line 256) | typedef struct mi_heap_area_s {
type mi_arena_id_t (line 284) | typedef int mi_arena_id_t;
type mi_option_t (line 350) | typedef enum mi_option_e {
type T (line 477) | typedef T value_type;
type std (line 478) | typedef std::size_t size_type;
type std (line 479) | typedef std::ptrdiff_t difference_type;
type value_type (line 480) | typedef value_type& reference;
type value_type (line 481) | typedef value_type const& const_reference;
type value_type (line 482) | typedef value_type* pointer;
type value_type (line 483) | typedef value_type const* const_pointer;
function construct (line 492) | void construct(pointer p, value_type const& val) { ::new(p) value_type(v...
function destroy (line 493) | void destroy(pointer p) { p->~value_type(); }
function pointer (line 497) | pointer address(reference x) const { return &x; }
function const_pointer (line 498) | const_pointer address(const_reference x) const { return &x; }
type mi_stl_allocator (line 505) | typedef mi_stl_allocator<U> other;
function mi_decl_nodiscard (line 543) | mi_decl_nodiscard T* allocate(size_type count) { return static_cast<T*>(...
function mi_decl_nodiscard (line 544) | mi_decl_nodiscard T* allocate(size_type count, const void*) { return all...
function collect (line 553) | void collect(bool force) { mi_heap_collect(this->heap.get(), force); }
type _mi_heap_stl_allocator_common (line 558) | struct _mi_heap_stl_allocator_common
function heap (line 564) | _mi_heap_stl_allocator_common(const _mi_heap_stl_allocator_common& x) mi...
function heap_destroy (line 569) | static void heap_destroy(mi_heap_t* hp) { if (hp != NULL) { mi_heap_dest...
type mi_heap_stl_allocator (line 581) | typedef mi_heap_stl_allocator<U> other;
type mi_heap_destroy_stl_allocator (line 598) | typedef mi_heap_destroy_stl_allocator<U> other;
FILE: third-party/mimalloc/include/mimalloc/atomic.h
function mi_atomic_addi64_relaxed (line 129) | static inline int64_t mi_atomic_addi64_relaxed(volatile int64_t* p, int6...
function mi_atomic_void_addi64_relaxed (line 132) | static inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, co...
function mi_atomic_maxi64_relaxed (line 138) | static inline void mi_atomic_maxi64_relaxed(volatile int64_t* p, int64_t...
type LONG64 (line 158) | typedef LONG64 msc_intptr_t;
type LONG (line 161) | typedef LONG msc_intptr_t;
type mi_memory_order (line 165) | typedef enum mi_memory_order_e {
function mi_atomic_fetch_add_explicit (line 174) | static inline uintptr_t mi_atomic_fetch_add_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_sub_explicit (line 178) | static inline uintptr_t mi_atomic_fetch_sub_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_and_explicit (line 182) | static inline uintptr_t mi_atomic_fetch_and_explicit(_Atomic(uintptr_t)*...
function mi_atomic_fetch_or_explicit (line 186) | static inline uintptr_t mi_atomic_fetch_or_explicit(_Atomic(uintptr_t)*p...
function mi_atomic_compare_exchange_strong_explicit (line 190) | static inline bool mi_atomic_compare_exchange_strong_explicit(_Atomic(ui...
function mi_atomic_compare_exchange_weak_explicit (line 201) | static inline bool mi_atomic_compare_exchange_weak_explicit(_Atomic(uint...
function mi_atomic_exchange_explicit (line 204) | static inline uintptr_t mi_atomic_exchange_explicit(_Atomic(uintptr_t)*p...
function mi_atomic_thread_fence (line 208) | static inline void mi_atomic_thread_fence(mi_memory_order mo) {
function mi_atomic_load_explicit (line 213) | static inline uintptr_t mi_atomic_load_explicit(_Atomic(uintptr_t) const...
function mi_atomic_store_explicit (line 225) | static inline void mi_atomic_store_explicit(_Atomic(uintptr_t)*p, uintpt...
function mi_atomic_loadi64_explicit (line 233) | static inline int64_t mi_atomic_loadi64_explicit(_Atomic(int64_t)*p, mi_...
function mi_atomic_storei64_explicit (line 246) | static inline void mi_atomic_storei64_explicit(_Atomic(int64_t)*p, int64...
function mi_atomic_addi64_relaxed (line 256) | static inline int64_t mi_atomic_addi64_relaxed(volatile _Atomic(int64_t)...
function mi_atomic_void_addi64_relaxed (line 270) | static inline void mi_atomic_void_addi64_relaxed(volatile int64_t* p, co...
function mi_atomic_maxi64_relaxed (line 277) | static inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p,...
function mi_atomic_addi64_acq_rel (line 284) | static inline void mi_atomic_addi64_acq_rel(volatile _Atomic(int64_t*)p,...
function mi_atomic_casi64_strong_acq_rel (line 288) | static inline bool mi_atomic_casi64_strong_acq_rel(volatile _Atomic(int6...
function mi_atomic_addi (line 321) | static inline intptr_t mi_atomic_addi(_Atomic(intptr_t)*p, intptr_t add) {
function mi_atomic_subi (line 326) | static inline intptr_t mi_atomic_subi(_Atomic(intptr_t)*p, intptr_t sub) {
type mi_atomic_once_t (line 335) | typedef _Atomic(uintptr_t) mi_atomic_once_t;
function mi_atomic_once (line 338) | static inline bool mi_atomic_once( mi_atomic_once_t* once ) {
type mi_atomic_guard_t (line 344) | typedef _Atomic(uintptr_t) mi_atomic_guard_t;
function mi_atomic_yield (line 361) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 365) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 370) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 377) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 381) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 385) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 390) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 394) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 399) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 406) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 411) | static inline void mi_atomic_yield(void) {
function mi_atomic_yield (line 416) | static inline void mi_atomic_yield(void) {
function mi_lock_try_acquire (line 439) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 442) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 445) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 448) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 451) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 458) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 461) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 464) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 467) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 470) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 482) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 485) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 491) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 494) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 497) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 506) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 509) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 512) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 515) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 518) | static inline void mi_lock_done(mi_lock_t* lock) {
function mi_lock_try_acquire (line 529) | static inline bool mi_lock_try_acquire(mi_lock_t* lock) {
function mi_lock_acquire (line 533) | static inline void mi_lock_acquire(mi_lock_t* lock) {
function mi_lock_release (line 539) | static inline void mi_lock_release(mi_lock_t* lock) {
function mi_lock_init (line 542) | static inline void mi_lock_init(mi_lock_t* lock) {
function mi_lock_done (line 545) | static inline void mi_lock_done(mi_lock_t* lock) {
FILE: third-party/mimalloc/include/mimalloc/internal.h
type mi_arena_field_cursor_t (line 161) | typedef struct mi_arena_field_cursor_s { // abstract struct
function _mi_is_power_of_two (line 324) | static inline bool _mi_is_power_of_two(uintptr_t x) {
function _mi_is_aligned (line 329) | static inline bool _mi_is_aligned(void* p, size_t alignment) {
function _mi_align_up (line 335) | static inline uintptr_t _mi_align_up(uintptr_t sz, size_t alignment) {
function _mi_align_down (line 347) | static inline uintptr_t _mi_align_down(uintptr_t sz, size_t alignment) {
function _mi_divide_up (line 370) | static inline uintptr_t _mi_divide_up(uintptr_t size, size_t divider) {
function _mi_clamp (line 377) | static inline size_t _mi_clamp(size_t sz, size_t min, size_t max) {
function mi_mem_is_zero (line 384) | static inline bool mi_mem_is_zero(const void* p, size_t size) {
function _mi_wsize_from_size (line 394) | static inline size_t _mi_wsize_from_size(size_t size) {
function mi_mul_overflow (line 405) | static inline bool mi_mul_overflow(size_t count, size_t size, size_t* to...
function mi_mul_overflow (line 415) | static inline bool mi_mul_overflow(size_t count, size_t size, size_t* to...
function mi_count_size_overflow (line 424) | static inline bool mi_count_size_overflow(size_t count, size_t size, siz...
function mi_heap_is_backing (line 446) | static inline bool mi_heap_is_backing(const mi_heap_t* heap) {
function mi_heap_is_initialized (line 450) | static inline bool mi_heap_is_initialized(mi_heap_t* heap) {
function _mi_ptr_cookie (line 455) | static inline uintptr_t _mi_ptr_cookie(const void* p) {
function mi_page_t (line 465) | static inline mi_page_t* _mi_heap_get_free_small_page(mi_heap_t* heap, s...
function mi_segment_t (line 477) | static inline mi_segment_t* _mi_ptr_segment(const void* p) {
function mi_page_t (line 486) | static inline mi_page_t* mi_slice_to_page(mi_slice_t* s) {
function mi_slice_t (line 491) | static inline mi_slice_t* mi_page_to_slice(mi_page_t* p) {
function mi_segment_t (line 497) | static inline mi_segment_t* _mi_page_segment(const mi_page_t* page) {
function mi_slice_t (line 504) | static inline mi_slice_t* mi_slice_first(const mi_slice_t* slice) {
function mi_page_t (line 513) | static inline mi_page_t* _mi_segment_page_of(const mi_segment_t* segment...
function mi_page_t (line 534) | static inline mi_page_t* _mi_ptr_page(void* p) {
function mi_page_block_size (line 540) | static inline size_t mi_page_block_size(const mi_page_t* page) {
function mi_page_is_huge (line 545) | static inline bool mi_page_is_huge(const mi_page_t* page) {
function mi_page_usable_block_size (line 553) | static inline size_t mi_page_usable_block_size(const mi_page_t* page) {
function mi_segment_size (line 558) | static inline size_t mi_segment_size(mi_segment_t* segment) {
function mi_block_t (line 567) | static inline mi_block_t* mi_page_thread_free(const mi_page_t* page) {
function mi_delayed_t (line 571) | static inline mi_delayed_t mi_page_thread_free_flag(const mi_page_t* pag...
function mi_heap_t (line 576) | static inline mi_heap_t* mi_page_heap(const mi_page_t* page) {
function mi_page_set_heap (line 580) | static inline void mi_page_set_heap(mi_page_t* page, mi_heap_t* heap) {
function mi_block_t (line 587) | static inline mi_block_t* mi_tf_block(mi_thread_free_t tf) {
function mi_delayed_t (line 590) | static inline mi_delayed_t mi_tf_delayed(mi_thread_free_t tf) {
function mi_thread_free_t (line 593) | static inline mi_thread_free_t mi_tf_make(mi_block_t* block, mi_delayed_...
function mi_thread_free_t (line 596) | static inline mi_thread_free_t mi_tf_set_delayed(mi_thread_free_t tf, mi...
function mi_thread_free_t (line 599) | static inline mi_thread_free_t mi_tf_set_block(mi_thread_free_t tf, mi_b...
function mi_page_all_free (line 605) | static inline bool mi_page_all_free(const mi_page_t* page) {
function mi_page_has_any_available (line 611) | static inline bool mi_page_has_any_available(const mi_page_t* page) {
function mi_page_immediate_available (line 617) | static inline bool mi_page_immediate_available(const mi_page_t* page) {
function mi_page_is_mostly_used (line 623) | static inline bool mi_page_is_mostly_used(const mi_page_t* page) {
function mi_page_queue_t (line 629) | static inline mi_page_queue_t* mi_page_queue(const mi_heap_t* heap, size...
function mi_page_is_in_full (line 638) | static inline bool mi_page_is_in_full(const mi_page_t* page) {
function mi_page_set_in_full (line 642) | static inline void mi_page_set_in_full(mi_page_t* page, bool in_full) {
function mi_page_has_aligned (line 646) | static inline bool mi_page_has_aligned(const mi_page_t* page) {
function mi_page_set_has_aligned (line 650) | static inline void mi_page_set_has_aligned(mi_page_t* page, bool has_ali...
function mi_block_ptr_is_guarded (line 658) | static inline bool mi_block_ptr_is_guarded(const mi_block_t* block, cons...
function mi_heap_malloc_use_guarded (line 663) | static inline bool mi_heap_malloc_use_guarded(mi_heap_t* heap, size_t si...
function mi_is_in_same_segment (line 713) | static inline bool mi_is_in_same_segment(const void* p, const void* q) {
function mi_is_in_same_page (line 717) | static inline bool mi_is_in_same_page(const void* p, const void* q) {
function mi_rotl (line 727) | static inline uintptr_t mi_rotl(uintptr_t x, uintptr_t shift) {
function mi_rotr (line 731) | static inline uintptr_t mi_rotr(uintptr_t x, uintptr_t shift) {
function mi_encoded_t (line 741) | static inline mi_encoded_t mi_ptr_encode(const void* null, const void* p...
function mi_ptr_encode_canary (line 746) | static inline uint32_t mi_ptr_encode_canary(const void* null, const void...
function mi_block_t (line 756) | static inline mi_block_t* mi_block_nextx( const void* null, const mi_blo...
function mi_block_set_nextx (line 769) | static inline void mi_block_set_nextx(const void* null, mi_block_t* bloc...
function mi_block_t (line 780) | static inline mi_block_t* mi_block_next(const mi_page_t* page, const mi_...
function mi_block_set_next (line 796) | static inline void mi_block_set_next(const mi_page_t* page, mi_block_t* ...
function mi_commit_mask_create_empty (line 810) | static inline void mi_commit_mask_create_empty(mi_commit_mask_t* cm) {
function mi_commit_mask_create_full (line 816) | static inline void mi_commit_mask_create_full(mi_commit_mask_t* cm) {
function mi_commit_mask_is_empty (line 822) | static inline bool mi_commit_mask_is_empty(const mi_commit_mask_t* cm) {
function mi_commit_mask_is_full (line 829) | static inline bool mi_commit_mask_is_full(const mi_commit_mask_t* cm) {
function mi_memid_t (line 854) | static inline mi_memid_t _mi_memid_create(mi_memkind_t memkind) {
function mi_memid_t (line 861) | static inline mi_memid_t _mi_memid_none(void) {
function mi_memid_t (line 865) | static inline mi_memid_t _mi_memid_create_os(bool committed, bool is_zer...
function _mi_random_shuffle (line 878) | static inline uintptr_t _mi_random_shuffle(uintptr_t x) {
function _mi_os_numa_node (line 906) | static inline int _mi_os_numa_node(void) {
function _mi_os_numa_node_count (line 910) | static inline size_t _mi_os_numa_node_count(void) {
function mi_clz (line 926) | static inline size_t mi_clz(size_t x) {
function mi_ctz (line 934) | static inline size_t mi_ctz(size_t x) {
function mi_clz (line 948) | static inline size_t mi_clz(size_t x) {
function mi_ctz (line 958) | static inline size_t mi_ctz(size_t x) {
function mi_ctz_generic32 (line 971) | static inline size_t mi_ctz_generic32(uint32_t x) {
function mi_clz_generic32 (line 981) | static inline size_t mi_clz_generic32(uint32_t x) {
function mi_ctz (line 996) | static inline size_t mi_ctz(size_t x) {
function mi_clz (line 1011) | static inline size_t mi_clz(size_t x) {
function mi_bsr (line 1029) | static inline size_t mi_bsr(size_t x) {
function _mi_memcpy (line 1046) | static inline void _mi_memcpy(void* dst, const void* src, size_t n) {
function _mi_memzero (line 1054) | static inline void _mi_memzero(void* dst, size_t n) {
function _mi_memcpy (line 1063) | static inline void _mi_memcpy(void* dst, const void* src, size_t n) {
function _mi_memzero (line 1066) | static inline void _mi_memzero(void* dst, size_t n) {
function _mi_memcpy_aligned (line 1078) | static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t...
function _mi_memzero_aligned (line 1085) | static inline void _mi_memzero_aligned(void* dst, size_t n) {
function _mi_memcpy_aligned (line 1092) | static inline void _mi_memcpy_aligned(void* dst, const void* src, size_t...
function _mi_memzero_aligned (line 1097) | static inline void _mi_memzero_aligned(void* dst, size_t n) {
FILE: third-party/mimalloc/include/mimalloc/prim.h
type mi_os_mem_config_t (line 24) | typedef struct mi_os_mem_config_s {
type mi_process_info_t (line 85) | typedef struct mi_process_info_s {
function mi_prim_tls_slot_set (line 180) | static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_att...
function mi_prim_tls_slot_set (line 235) | static inline void mi_prim_tls_slot_set(size_t slot, void* value) mi_att...
function mi_threadid_t (line 280) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 286) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 293) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 300) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_threadid_t (line 316) | static inline mi_threadid_t _mi_prim_thread_id(void) mi_attr_noexcept {
function mi_heap_t (line 368) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 383) | static inline mi_heap_t** mi_prim_tls_pthread_heap_slot(void) {
function mi_heap_t (line 391) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 402) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
function mi_heap_t (line 409) | static inline mi_heap_t* mi_prim_get_default_heap(void) {
FILE: third-party/mimalloc/include/mimalloc/types.h
type mi_ssize_t (line 139) | typedef int64_t mi_ssize_t;
type mi_ssize_t (line 142) | typedef int32_t mi_ssize_t;
type mi_encoded_t (line 240) | typedef uintptr_t mi_encoded_t;
type mi_threadid_t (line 243) | typedef size_t mi_threadid_t;
type mi_block_t (line 246) | typedef struct mi_block_s {
type mi_delayed_t (line 259) | typedef enum mi_delayed_e {
type mi_page_flags_t (line 270) | typedef union mi_page_flags_s {
type mi_page_flags_t (line 279) | typedef union mi_page_flags_s {
type mi_thread_free_t (line 290) | typedef uintptr_t mi_thread_free_t;
type mi_page_t (line 320) | typedef struct mi_page_s {
type mi_page_kind_t (line 364) | typedef enum mi_page_kind_e {
type mi_segment_kind_t (line 372) | typedef enum mi_segment_kind_e {
type mi_commit_mask_t (line 399) | typedef struct mi_commit_mask_s {
type mi_page_t (line 403) | typedef mi_page_t mi_slice_t;
type mi_msecs_t (line 404) | typedef int64_t mi_msecs_t;
type mi_memkind_t (line 412) | typedef enum mi_memkind_e {
function mi_memkind_is_os (line 422) | static inline bool mi_memkind_is_os(mi_memkind_t memkind) {
type mi_memid_os_info_t (line 426) | typedef struct mi_memid_os_info {
type mi_memid_arena_info_t (line 431) | typedef struct mi_memid_arena_info {
type mi_memid_t (line 437) | typedef struct mi_memid_s {
type mi_subproc_t (line 463) | typedef struct mi_subproc_s mi_subproc_t;
type mi_segment_t (line 465) | typedef struct mi_segment_s {
type mi_tld_t (line 517) | typedef struct mi_tld_s mi_tld_t;
type mi_page_queue_t (line 520) | typedef struct mi_page_queue_s {
type mi_random_ctx_t (line 529) | typedef struct mi_random_cxt_s {
type mi_padding_t (line 539) | typedef struct mi_padding_s {
type mi_heap_s (line 554) | struct mi_heap_s {
type mi_subproc_s (line 588) | struct mi_subproc_s {
type mi_span_queue_t (line 605) | typedef struct mi_span_queue_s {
type mi_segments_tld_t (line 614) | typedef struct mi_segments_tld_s {
type mi_tld_s (line 626) | struct mi_tld_s {
FILE: third-party/mimalloc/src/alloc-aligned.c
function mi_malloc_is_naturally_aligned (line 18) | static bool mi_malloc_is_naturally_aligned( size_t size, size_t alignmen...
function mi_decl_restrict (line 28) | static mi_decl_restrict void* mi_heap_malloc_guarded_aligned(mi_heap_t* ...
function mi_decl_noinline (line 55) | static mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_overalloc(m...
function mi_decl_noinline (line 135) | static mi_decl_noinline void* mi_heap_malloc_zero_aligned_at_generic(mi_...
function mi_likely (line 153) | mi_likely(is_aligned_or_null) {
function mi_likely (line 192) | mi_likely(is_aligned)
function mi_decl_nodiscard (line 311) | mi_decl_nodiscard void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void...
function mi_decl_nodiscard (line 315) | mi_decl_nodiscard void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p...
function mi_decl_nodiscard (line 319) | mi_decl_nodiscard void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, voi...
function mi_decl_nodiscard (line 323) | mi_decl_nodiscard void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* ...
function mi_decl_nodiscard (line 327) | mi_decl_nodiscard void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, voi...
function mi_decl_nodiscard (line 333) | mi_decl_nodiscard void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* ...
function mi_decl_nodiscard (line 339) | mi_decl_nodiscard void* mi_realloc_aligned_at(void* p, size_t newsize, s...
function mi_decl_nodiscard (line 343) | mi_decl_nodiscard void* mi_realloc_aligned(void* p, size_t newsize, size...
function mi_decl_nodiscard (line 347) | mi_decl_nodiscard void* mi_rezalloc_aligned_at(void* p, size_t newsize, ...
function mi_decl_nodiscard (line 351) | mi_decl_nodiscard void* mi_rezalloc_aligned(void* p, size_t newsize, siz...
function mi_decl_nodiscard (line 355) | mi_decl_nodiscard void* mi_recalloc_aligned_at(void* p, size_t newcount,...
function mi_decl_nodiscard (line 359) | mi_decl_nodiscard void* mi_recalloc_aligned(void* p, size_t newcount, si...
FILE: third-party/mimalloc/src/alloc-override.c
function mi_decl_externc (line 60) | mi_decl_externc size_t mi_malloc_size_checked(void *p) {
type mi_interpose_s (line 67) | struct mi_interpose_s {
type mi_interpose_s (line 74) | struct mi_interpose_s
type mi_interpose_s (line 117) | struct mi_interpose_s
function void (line 165) | void operator delete(void* p) noexcept MI_FORWARD0(mi_free,p)
function operator (line 181) | void operator delete (void* p, std::align_val_t al) noexcept { mi_free_...
function noexcept (line 182) | void operator delete[](void* p, std::align_val_t al) noexcept { mi_free_...
function operator (line 183) | void operator delete (void* p, std::size_t n, std::align_val_t al) noex...
function noexcept (line 184) | void operator delete[](void* p, std::size_t n, std::align_val_t al) noex...
function operator (line 185) | void operator delete (void* p, std::align_val_t al, const std::nothrow_...
function noexcept (line 186) | void operator delete[](void* p, std::align_val_t al, const std::nothrow_...
function _ZdlPv (line 201) | void _ZdlPv(void* p) MI_FORWARD0(mi_free,p) // delete
function _ZdaPvSt11align_val_t (line 207) | void _ZdaPvSt11align_val_t(void* p, size_t al) { mi_free_alig...
function _ZdlPvmSt11align_val_t (line 208) | void _ZdlPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size...
function _ZdaPvmSt11align_val_t (line 209) | void _ZdaPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size...
function _ZdlPvRKSt9nothrow_t (line 211) | void _ZdlPvRKSt9nothrow_t(void* p, mi_nothrow_t tag) { MI_UNUSED(ta...
function _ZdaPvRKSt9nothrow_t (line 212) | void _ZdaPvRKSt9nothrow_t(void* p, mi_nothrow_t tag) { MI_UNUSED(ta...
function _ZdlPvSt11align_val_tRKSt9nothrow_t (line 213) | void _ZdlPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_...
function _ZdaPvSt11align_val_tRKSt9nothrow_t (line 214) | void _ZdaPvSt11align_val_tRKSt9nothrow_t(void* p, size_t al, mi_nothrow_...
function vfree (line 259) | void vfree(void* p) { mi_free(p); }
function malloc_good_size (line 260) | size_t malloc_good_size(size_t size) { return mi_malloc_good_size(si...
function posix_memalign (line 261) | int posix_memalign(void** p, size_t alignment, size_t size) { return ...
function cfree (line 276) | void cfree(void* p) { mi_free(p); }
function mi_decl_weak (line 282) | mi_decl_weak int reallocarr(void* p, size_t count, size_t size) { ret...
function __posix_memalign (line 303) | int __posix_memalign(void** p, size_t alignment, size_t size) { return...
FILE: third-party/mimalloc/src/alloc-posix.c
function mi_decl_nodiscard (line 35) | mi_decl_nodiscard size_t mi_malloc_size(const void* p) mi_attr_noexcept {
function mi_decl_nodiscard (line 40) | mi_decl_nodiscard size_t mi_malloc_usable_size(const void *p) mi_attr_no...
function mi_decl_nodiscard (line 45) | mi_decl_nodiscard size_t mi_malloc_good_size(size_t size) mi_attr_noexce...
function mi_cfree (line 49) | void mi_cfree(void* p) mi_attr_noexcept {
function mi_posix_memalign (line 55) | int mi_posix_memalign(void** p, size_t alignment, size_t size) mi_attr_n...
function mi_decl_nodiscard (line 102) | mi_decl_nodiscard void* mi_reallocarray( void* p, size_t count, size_t s...
function mi_decl_nodiscard (line 108) | mi_decl_nodiscard int mi_reallocarr( void* p, size_t count, size_t size ...
function mi_dupenv_s (line 143) | int mi_dupenv_s(char** buf, size_t* size, const char* name) mi_attr_noex...
function mi_wdupenv_s (line 158) | int mi_wdupenv_s(unsigned short** buf, size_t* size, const unsigned shor...
function mi_decl_nodiscard (line 179) | mi_decl_nodiscard void* mi_aligned_offset_recalloc(void* p, size_t newco...
function mi_decl_nodiscard (line 183) | mi_decl_nodiscard void* mi_aligned_recalloc(void* p, size_t newcount, si...
FILE: third-party/mimalloc/src/alloc.c
function mi_unlikely (line 60) | mi_unlikely(zero) {
function mi_decl_restrict (line 128) | static inline mi_decl_restrict void* mi_heap_malloc_small_zero(mi_heap_t...
function else (line 180) | else if (huge_alignment==0 && mi_heap_malloc_use_guarded(heap,size)) {
function mi_decl_nodiscard (line 299) | mi_decl_nodiscard void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t...
function mi_decl_nodiscard (line 303) | mi_decl_nodiscard void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 311) | mi_decl_nodiscard void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 317) | mi_decl_nodiscard void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 321) | mi_decl_nodiscard void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_...
function mi_decl_nodiscard (line 328) | mi_decl_nodiscard void* mi_realloc(void* p, size_t newsize) mi_attr_noex...
function mi_decl_nodiscard (line 332) | mi_decl_nodiscard void* mi_reallocn(void* p, size_t count, size_t size) ...
function mi_decl_nodiscard (line 337) | mi_decl_nodiscard void* mi_reallocf(void* p, size_t newsize) mi_attr_noe...
function mi_decl_nodiscard (line 341) | mi_decl_nodiscard void* mi_rezalloc(void* p, size_t newsize) mi_attr_noe...
function mi_decl_nodiscard (line 345) | mi_decl_nodiscard void* mi_recalloc(void* p, size_t count, size_t size) ...
function mi_try_new_handler (line 467) | static bool mi_try_new_handler(bool nothrow) {
function std_new_handler_t (line 494) | std_new_handler_t __attribute__((weak)) _ZSt15get_new_handlerv(void) {
function std_new_handler_t (line 497) | static std_new_handler_t mi_get_new_handler(void) {
function std_new_handler_t (line 502) | static std_new_handler_t mi_get_new_handler() {
function mi_try_new_handler (line 507) | static bool mi_try_new_handler(bool nothrow) {
function mi_decl_noinline (line 531) | static mi_decl_noinline void* mi_try_new(size_t size, bool nothrow) {
function mi_decl_nodiscard (line 587) | mi_decl_nodiscard void* mi_new_realloc(void* p, size_t newsize) {
function mi_decl_nodiscard (line 595) | mi_decl_nodiscard void* mi_new_reallocn(void* p, size_t newcount, size_t...
function mi_decl_restrict (line 649) | mi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t s...
FILE: third-party/mimalloc/src/arena-abandon.c
function mi_arena_segment_os_clear_abandoned (line 51) | static bool mi_arena_segment_os_clear_abandoned(mi_segment_t* segment, b...
function _mi_arena_segment_clear_abandoned (line 94) | bool _mi_arena_segment_clear_abandoned(mi_segment_t* segment) {
function mi_arena_segment_os_mark_abandoned (line 119) | static void mi_arena_segment_os_mark_abandoned(mi_segment_t* segment) {
function _mi_arena_segment_mark_abandoned (line 143) | void _mi_arena_segment_mark_abandoned(mi_segment_t* segment)
function _mi_arena_field_cursor_init (line 172) | void _mi_arena_field_cursor_init(mi_heap_t* heap, mi_subproc_t* subproc,...
function _mi_arena_field_cursor_done (line 202) | void _mi_arena_field_cursor_done(mi_arena_field_cursor_t* current) {
function mi_segment_t (line 209) | static mi_segment_t* mi_arena_segment_clear_abandoned_at(mi_arena_t* are...
function mi_segment_t (line 232) | static mi_segment_t* mi_arena_segment_clear_abandoned_next_field(mi_aren...
function mi_segment_t (line 282) | static mi_segment_t* mi_arena_segment_clear_abandoned_next_list(mi_arena...
function mi_segment_t (line 317) | mi_segment_t* _mi_arena_segment_clear_abandoned_next(mi_arena_field_curs...
function mi_abandoned_visit_blocks (line 329) | bool mi_abandoned_visit_blocks(mi_subproc_id_t subproc_id, int heap_tag,...
FILE: third-party/mimalloc/src/arena.c
type mi_arena_t (line 33) | typedef struct mi_arena_s {
function mi_arena_id_index (line 75) | size_t mi_arena_id_index(mi_arena_id_t id) {
function mi_arena_id_t (line 79) | static mi_arena_id_t mi_arena_id_create(size_t arena_index) {
function mi_arena_id_t (line 84) | mi_arena_id_t _mi_arena_id_none(void) {
function mi_arena_id_is_suitable (line 88) | static bool mi_arena_id_is_suitable(mi_arena_id_t arena_id, bool arena_i...
function _mi_arena_memid_is_suitable (line 93) | bool _mi_arena_memid_is_suitable(mi_memid_t memid, mi_arena_id_t request...
function _mi_arena_memid_is_os_allocated (line 102) | bool _mi_arena_memid_is_os_allocated(mi_memid_t memid) {
function mi_arena_get_count (line 106) | size_t mi_arena_get_count(void) {
function mi_arena_t (line 110) | mi_arena_t* mi_arena_from_index(size_t idx) {
function mi_block_count_of_size (line 121) | static size_t mi_block_count_of_size(size_t size) {
function mi_arena_block_size (line 125) | static size_t mi_arena_block_size(size_t bcount) {
function mi_arena_size (line 129) | static size_t mi_arena_size(mi_arena_t* arena) {
function mi_memid_t (line 133) | static mi_memid_t mi_memid_create_arena(mi_arena_id_t id, bool is_exclus...
function mi_arena_memid_indices (line 141) | bool mi_arena_memid_indices(mi_memid_t memid, size_t* arena_index, mi_bi...
function _mi_arena_meta_free (line 206) | void _mi_arena_meta_free(void* p, mi_memid_t memid, size_t size) {
function mi_arena_try_claim (line 225) | static bool mi_arena_try_claim(mi_arena_t* arena, size_t blocks, mi_bitm...
function mi_decl_noinline (line 240) | static mi_decl_noinline void* mi_arena_try_alloc_at(mi_arena_t* arena, s...
function mi_decl_noinline (line 323) | static mi_decl_noinline void* mi_arena_try_alloc(int numa_node, size_t s...
function mi_arena_reserve (line 358) | static bool mi_arena_reserve(size_t req_size, bool allow_large, mi_arena...
function mi_arena_purge_delay (line 457) | static long mi_arena_purge_delay(void) {
function mi_arena_purge (line 464) | static void mi_arena_purge(mi_arena_t* arena, size_t bitmap_idx, size_t ...
function mi_arena_schedule_purge (line 494) | static void mi_arena_schedule_purge(mi_arena_t* arena, size_t bitmap_idx...
function mi_arena_purge_range (line 522) | static bool mi_arena_purge_range(mi_arena_t* arena, size_t idx, size_t s...
function mi_arena_try_purge (line 546) | static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool f...
function mi_arenas_try_purge (line 605) | static void mi_arenas_try_purge( bool force, bool visit_all )
function _mi_arena_free (line 649) | void _mi_arena_free(void* p, size_t size, size_t committed_size, mi_memi...
function mi_arenas_unsafe_destroy (line 731) | static void mi_arenas_unsafe_destroy(void) {
function _mi_arenas_collect (line 755) | void _mi_arenas_collect(bool force_purge) {
function _mi_arena_unsafe_destroy_all (line 761) | void _mi_arena_unsafe_destroy_all(void) {
function _mi_arena_contains (line 767) | bool _mi_arena_contains(const void* p) {
function mi_arena_add (line 782) | static bool mi_arena_add(mi_arena_t* arena, mi_arena_id_t* arena_id, mi_...
function mi_manage_os_memory_ex2 (line 800) | static bool mi_manage_os_memory_ex2(void* start, size_t size, bool is_la...
function mi_manage_os_memory_ex (line 866) | bool mi_manage_os_memory_ex(void* start, size_t size, bool is_committed,...
function mi_reserve_os_memory_ex (line 875) | int mi_reserve_os_memory_ex(size_t size, bool commit, bool allow_large, ...
function mi_manage_os_memory (line 893) | bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bo...
function mi_reserve_os_memory (line 898) | int mi_reserve_os_memory(size_t size, bool commit, bool allow_large) mi_...
function mi_debug_show_bitmap (line 907) | static size_t mi_debug_show_bitmap(const char* prefix, const char* heade...
function mi_debug_show_arenas (line 931) | void mi_debug_show_arenas(void) mi_attr_noexcept {
function mi_arenas_print (line 960) | void mi_arenas_print(void) mi_attr_noexcept {
function mi_reserve_huge_os_pages_at_ex (line 969) | int mi_reserve_huge_os_pages_at_ex(size_t pages, int numa_node, size_t t...
function mi_reserve_huge_os_pages_at (line 991) | int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t time...
function mi_reserve_huge_os_pages_interleave (line 996) | int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes,...
function mi_reserve_huge_os_pages (line 1023) | int mi_reserve_huge_os_pages(size_t pages, double max_secs, size_t* page...
FILE: third-party/mimalloc/src/bitmap.c
function mi_bitmap_mask_ (line 28) | static inline size_t mi_bitmap_mask_(size_t count, size_t bitidx) {
function _mi_bitmap_try_find_claim_field (line 43) | inline bool _mi_bitmap_try_find_claim_field(mi_bitmap_t bitmap, size_t i...
function _mi_bitmap_try_find_from_claim (line 100) | bool _mi_bitmap_try_find_from_claim(mi_bitmap_t bitmap, const size_t bit...
function _mi_bitmap_try_find_from_claim_pred (line 112) | bool _mi_bitmap_try_find_from_claim_pred(mi_bitmap_t bitmap, const size_...
function _mi_bitmap_unclaim (line 132) | bool _mi_bitmap_unclaim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t...
function _mi_bitmap_claim (line 145) | bool _mi_bitmap_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size_t c...
function mi_bitmap_is_claimedx (line 157) | static bool mi_bitmap_is_claimedx(mi_bitmap_t bitmap, size_t bitmap_fiel...
function _mi_bitmap_try_claim (line 169) | bool _mi_bitmap_try_claim(mi_bitmap_t bitmap, size_t bitmap_fields, size...
function _mi_bitmap_is_claimed (line 184) | bool _mi_bitmap_is_claimed(mi_bitmap_t bitmap, size_t bitmap_fields, siz...
function _mi_bitmap_is_any_claimed (line 188) | bool _mi_bitmap_is_any_claimed(mi_bitmap_t bitmap, size_t bitmap_fields,...
function mi_bitmap_try_find_claim_field_across (line 203) | static bool mi_bitmap_try_find_claim_field_across(mi_bitmap_t bitmap, si...
function _mi_bitmap_try_find_from_claim_across (line 295) | bool _mi_bitmap_try_find_from_claim_across(mi_bitmap_t bitmap, const siz...
function mi_bitmap_mask_across (line 323) | static size_t mi_bitmap_mask_across(mi_bitmap_index_t bitmap_idx, size_t...
function _mi_bitmap_unclaim_across (line 349) | bool _mi_bitmap_unclaim_across(mi_bitmap_t bitmap, size_t bitmap_fields,...
function _mi_bitmap_claim_across (line 372) | bool _mi_bitmap_claim_across(mi_bitmap_t bitmap, size_t bitmap_fields, s...
function mi_bitmap_is_claimedx_across (line 401) | static bool mi_bitmap_is_claimedx_across(mi_bitmap_t bitmap, size_t bitm...
function _mi_bitmap_is_claimed_across (line 427) | bool _mi_bitmap_is_claimed_across(mi_bitmap_t bitmap, size_t bitmap_fiel...
function _mi_bitmap_is_any_claimed_across (line 431) | bool _mi_bitmap_is_any_claimed_across(mi_bitmap_t bitmap, size_t bitmap_...
FILE: third-party/mimalloc/src/bitmap.h
type mi_bitmap_field_t (line 31) | typedef _Atomic(size_t) mi_bitmap_field_t;
type mi_bitmap_field_t (line 32) | typedef mi_bitmap_field_t* mi_bitmap_t;
type mi_bitmap_index_t (line 35) | typedef size_t mi_bitmap_index_t;
function mi_bitmap_index_t (line 38) | static inline mi_bitmap_index_t mi_bitmap_index_create_ex(size_t idx, si...
function mi_bitmap_index_t (line 42) | static inline mi_bitmap_index_t mi_bitmap_index_create(size_t idx, size_...
function mi_bitmap_index_t (line 48) | static inline mi_bitmap_index_t mi_bitmap_index_create_from_bit(size_t f...
function mi_bitmap_index_field (line 53) | static inline size_t mi_bitmap_index_field(mi_bitmap_index_t bitmap_idx) {
function mi_bitmap_index_bit_in_field (line 58) | static inline size_t mi_bitmap_index_bit_in_field(mi_bitmap_index_t bitm...
function mi_bitmap_index_bit (line 63) | static inline size_t mi_bitmap_index_bit(mi_bitmap_index_t bitmap_idx) {
FILE: third-party/mimalloc/src/free.c
function mi_free_block_local (line 31) | static inline void mi_free_block_local(mi_page_t* page, mi_block_t* bloc...
function mi_block_t (line 59) | mi_block_t* _mi_page_ptr_unalign(const mi_page_t* page, const void* p) {
function mi_block_check_unguard (line 77) | static inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* b...
function mi_block_check_unguard (line 81) | static inline void mi_block_check_unguard(mi_page_t* page, mi_block_t* b...
function mi_free_generic_local (line 87) | static void mi_decl_noinline mi_free_generic_local(mi_page_t* page, mi_s...
function mi_free_generic_mt (line 95) | static void mi_decl_noinline mi_free_generic_mt(mi_page_t* page, mi_segm...
function _mi_free_generic (line 102) | void mi_decl_noinline _mi_free_generic(mi_segment_t* segment, mi_page_t*...
function mi_segment_t (line 110) | static inline mi_segment_t* mi_checked_ptr_segment(const void* p, const ...
function _mi_free_delayed_block (line 177) | bool _mi_free_delayed_block(mi_block_t* block) {
function mi_free_block_delayed_mt (line 209) | static void mi_decl_noinline mi_free_block_delayed_mt( mi_page_t* page, ...
function mi_free_block_mt (line 253) | static void mi_decl_noinline mi_free_block_mt(mi_page_t* page, mi_segmen...
function mi_page_usable_aligned_size_of (line 312) | static size_t mi_decl_noinline mi_page_usable_aligned_size_of(const mi_p...
function _mi_usable_size (line 326) | static inline size_t _mi_usable_size(const void* p, const char* msg) mi_...
function mi_decl_nodiscard (line 340) | mi_decl_nodiscard size_t mi_usable_size(const void* p) mi_attr_noexcept {
function mi_free_size (line 349) | void mi_free_size(void* p, size_t size) mi_attr_noexcept {
function mi_free_size_aligned (line 355) | void mi_free_size_aligned(void* p, size_t size, size_t alignment) mi_att...
function mi_free_aligned (line 361) | void mi_free_aligned(void* p, size_t alignment) mi_attr_noexcept {
function mi_list_contains (line 375) | static bool mi_list_contains(const mi_page_t* page, const mi_block_t* li...
function mi_decl_noinline (line 383) | static mi_decl_noinline bool mi_check_is_double_freex(const mi_page_t* p...
function mi_check_is_double_free (line 398) | static inline bool mi_check_is_double_free(const mi_page_t* page, const ...
function mi_check_is_double_free (line 411) | static inline bool mi_check_is_double_free(const mi_page_t* page, const ...
function mi_page_decode_padding (line 424) | static bool mi_page_decode_padding(const mi_page_t* page, const mi_block...
function mi_page_usable_size_of (line 439) | static size_t mi_page_usable_size_of(const mi_page_t* page, const mi_blo...
function _mi_padding_shrink (line 451) | void _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, ...
function mi_page_usable_size_of (line 467) | static size_t mi_page_usable_size_of(const mi_page_t* page, const mi_blo...
function _mi_padding_shrink (line 472) | void _mi_padding_shrink(const mi_page_t* page, const mi_block_t* block, ...
function mi_verify_padding (line 481) | static bool mi_verify_padding(const mi_page_t* page, const mi_block_t* b...
function mi_check_padding (line 505) | static void mi_check_padding(const mi_page_t* page, const mi_block_t* bl...
function mi_check_padding (line 515) | static void mi_check_padding(const mi_page_t* page, const mi_block_t* bl...
function mi_stat_free (line 524) | static void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {
function mi_stat_free (line 548) | static void mi_stat_free(const mi_page_t* page, const mi_block_t* block) {
function mi_block_unguard (line 556) | static void mi_block_unguard(mi_page_t* page, mi_block_t* block, void* p) {
FILE: third-party/mimalloc/src/heap.c
function mi_heap_visit_pages (line 27) | static bool mi_heap_visit_pages(mi_heap_t* heap, heap_page_visitor_fun* ...
function mi_heap_page_is_valid (line 56) | static bool mi_heap_page_is_valid(mi_heap_t* heap, mi_page_queue_t* pq, ...
function mi_heap_is_valid (line 68) | static bool mi_heap_is_valid(mi_heap_t* heap) {
type mi_collect_t (line 85) | typedef enum mi_collect_e {
function mi_heap_page_collect (line 92) | static bool mi_heap_page_collect(mi_heap_t* heap, mi_page_queue_t* pq, m...
function mi_heap_page_never_delayed_free (line 115) | static bool mi_heap_page_never_delayed_free(mi_heap_t* heap, mi_page_que...
function mi_heap_collect_ex (line 124) | static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
function _mi_heap_collect_abandon (line 184) | void _mi_heap_collect_abandon(mi_heap_t* heap) {
function mi_heap_collect (line 188) | void mi_heap_collect(mi_heap_t* heap, bool force) mi_attr_noexcept {
function mi_collect (line 192) | void mi_collect(bool force) mi_attr_noexcept {
function mi_heap_t (line 201) | mi_heap_t* mi_heap_get_default(void) {
function mi_heap_is_default (line 206) | static bool mi_heap_is_default(const mi_heap_t* heap) {
function mi_heap_t (line 211) | mi_heap_t* mi_heap_get_backing(void) {
function _mi_heap_init (line 220) | void _mi_heap_init(mi_heap_t* heap, mi_tld_t* tld, mi_arena_id_t arena_i...
function mi_decl_nodiscard (line 242) | mi_decl_nodiscard mi_heap_t* mi_heap_new_ex(int heap_tag, bool allow_des...
function mi_decl_nodiscard (line 251) | mi_decl_nodiscard mi_heap_t* mi_heap_new_in_arena(mi_arena_id_t arena_id) {
function mi_decl_nodiscard (line 255) | mi_decl_nodiscard mi_heap_t* mi_heap_new(void) {
function _mi_heap_memid_is_suitable (line 260) | bool _mi_heap_memid_is_suitable(mi_heap_t* heap, mi_memid_t memid) {
function _mi_heap_random_next (line 264) | uintptr_t _mi_heap_random_next(mi_heap_t* heap) {
function mi_heap_reset_pages (line 269) | static void mi_heap_reset_pages(mi_heap_t* heap) {
function mi_heap_free (line 280) | static void mi_heap_free(mi_heap_t* heap) {
function mi_heap_t (line 311) | mi_heap_t* _mi_heap_by_tag(mi_heap_t* heap, uint8_t tag) {
function _mi_heap_page_destroy (line 327) | static bool _mi_heap_page_destroy(mi_heap_t* heap, mi_page_queue_t* pq, ...
function _mi_heap_destroy_pages (line 372) | void _mi_heap_destroy_pages(mi_heap_t* heap) {
function mi_heap_track_block_free (line 378) | static bool mi_cdecl mi_heap_track_block_free(const mi_heap_t* heap, con...
function mi_heap_destroy (line 385) | void mi_heap_destroy(mi_heap_t* heap) {
function _mi_heap_unsafe_destroy_all (line 414) | void _mi_heap_unsafe_destroy_all(mi_heap_t* heap) {
function mi_heap_absorb (line 435) | static void mi_heap_absorb(mi_heap_t* heap, mi_heap_t* from) {
function mi_heaps_are_compatible (line 469) | static bool mi_heaps_are_compatible(mi_heap_t* heap1, mi_heap_t* heap2) {
function mi_heap_delete (line 475) | void mi_heap_delete(mi_heap_t* heap)
function mi_heap_t (line 495) | mi_heap_t* mi_heap_set_default(mi_heap_t* heap) {
function mi_heap_t (line 513) | static mi_heap_t* mi_heap_of_block(const void* p) {
function mi_heap_contains_block (line 522) | bool mi_heap_contains_block(mi_heap_t* heap, const void* p) {
function mi_heap_page_check_owned (line 529) | static bool mi_heap_page_check_owned(mi_heap_t* heap, mi_page_queue_t* p...
function mi_heap_check_owned (line 539) | bool mi_heap_check_owned(mi_heap_t* heap, const void* p) {
function mi_check_owned (line 548) | bool mi_check_owned(const void* p) {
function _mi_heap_area_init (line 558) | void _mi_heap_area_init(mi_heap_area_t* area, mi_page_t* page) {
function mi_get_fast_divisor (line 571) | static void mi_get_fast_divisor(size_t divisor, uint64_t* magic, size_t*...
function mi_fast_divide (line 577) | static size_t mi_fast_divide(size_t n, uint64_t magic, size_t shift) {
function _mi_heap_area_visit_blocks (line 583) | bool _mi_heap_area_visit_blocks(const mi_heap_area_t* area, mi_page_t* p...
type mi_heap_area_ex_t (line 690) | typedef struct mi_heap_area_ex_s {
function mi_heap_visit_areas_page (line 697) | static bool mi_heap_visit_areas_page(mi_heap_t* heap, mi_page_queue_t* p...
function mi_heap_visit_areas (line 708) | static bool mi_heap_visit_areas(const mi_heap_t* heap, mi_heap_area_visi...
type mi_visit_blocks_args_t (line 714) | typedef struct mi_visit_blocks_args_s {
function mi_heap_area_visitor (line 720) | static bool mi_heap_area_visitor(const mi_heap_t* heap, const mi_heap_ar...
function mi_heap_visit_blocks (line 732) | bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_blocks, mi_b...
FILE: third-party/mimalloc/src/init.c
function mi_threadid_t (line 144) | mi_threadid_t _mi_thread_id(void) mi_attr_noexcept {
function mi_decl_export (line 186) | mi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, siz...
function mi_decl_export (line 198) | mi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size...
function _mi_heap_guarded_init (line 203) | void _mi_heap_guarded_init(mi_heap_t* heap) {
function mi_decl_export (line 212) | mi_decl_export void mi_heap_guarded_set_sample_rate(mi_heap_t* heap, siz...
function mi_decl_export (line 216) | mi_decl_export void mi_heap_guarded_set_size_bound(mi_heap_t* heap, size...
function _mi_heap_guarded_init (line 219) | void _mi_heap_guarded_init(mi_heap_t* heap) {
function mi_heap_main_init (line 225) | static void mi_heap_main_init(void) {
function mi_heap_t (line 243) | mi_heap_t* _mi_heap_main_get(void) {
function mi_subproc_id_t (line 253) | mi_subproc_id_t mi_subproc_main(void) {
function mi_subproc_id_t (line 257) | mi_subproc_id_t mi_subproc_new(void) {
function mi_subproc_t (line 268) | mi_subproc_t* _mi_subproc_from_id(mi_subproc_id_t subproc_id) {
function mi_subproc_delete (line 272) | void mi_subproc_delete(mi_subproc_id_t subproc_id) {
function mi_subproc_add_current_thread (line 290) | void mi_subproc_add_current_thread(mi_subproc_id_t subproc_id) {
type mi_thread_data_t (line 305) | typedef struct mi_thread_data_s {
function mi_thread_data_t (line 320) | static mi_thread_data_t* mi_thread_data_zalloc(void) {
function mi_thread_data_free (line 359) | static void mi_thread_data_free( mi_thread_data_t* tdfree ) {
function _mi_thread_data_collect (line 374) | void _mi_thread_data_collect(void) {
function _mi_thread_heap_init (line 388) | static bool _mi_thread_heap_init(void) {
function _mi_tld_init (line 412) | void _mi_tld_init(mi_tld_t* tld, mi_heap_t* bheap) {
function _mi_thread_heap_done (line 421) | static bool _mi_thread_heap_done(mi_heap_t* heap) {
function mi_process_setup_auto_thread_done (line 490) | static void mi_process_setup_auto_thread_done(void) {
function _mi_is_main_thread (line 499) | bool _mi_is_main_thread(void) {
function _mi_current_thread_count (line 505) | size_t _mi_current_thread_count(void) {
function mi_thread_init (line 510) | void mi_thread_init(void) mi_attr_noexcept
function mi_thread_done (line 525) | void mi_thread_done(void) mi_attr_noexcept {
function _mi_thread_done (line 529) | void _mi_thread_done(mi_heap_t* heap)
function _mi_heap_set_default_direct (line 553) | void _mi_heap_set_default_direct(mi_heap_t* heap) {
function mi_thread_set_in_threadpool (line 570) | void mi_thread_set_in_threadpool(void) mi_attr_noexcept {
function _mi_preloading (line 580) | _mi_preloading(void) {
function mi_decl_nodiscard (line 585) | mi_decl_nodiscard bool mi_is_redirected(void) mi_attr_noexcept {
function _mi_process_load (line 590) | void _mi_process_load(void) {
function mi_detect_cpu_features (line 619) | static void mi_detect_cpu_features(void) {
function mi_detect_cpu_features (line 628) | static void mi_detect_cpu_features(void) {
function mi_process_init (line 634) | void mi_process_init(void) mi_attr_noexcept {
function _mi_process_done (line 678) | void mi_cdecl _mi_process_done(void) {
FILE: third-party/mimalloc/src/libc.c
function _mi_toupper (line 19) | char _mi_toupper(char c) {
function _mi_strnicmp (line 24) | int _mi_strnicmp(const char* s, const char* t, size_t n) {
function _mi_strlcpy (line 32) | void _mi_strlcpy(char* dest, const char* src, size_t dest_size) {
function _mi_strlcat (line 43) | void _mi_strlcat(char* dest, const char* src, size_t dest_size) {
function _mi_strlen (line 54) | size_t _mi_strlen(const char* s) {
function _mi_strnlen (line 61) | size_t _mi_strnlen(const char* s, size_t max_len) {
function _mi_getenv (line 69) | bool _mi_getenv(const char* name, char* result, size_t result_size) {
function _mi_getenv (line 76) | bool _mi_getenv(const char* name, char* result, size_t result_size) {
function mi_outc (line 95) | static void mi_outc(char c, char** out, char* end) {
function mi_outs (line 102) | static void mi_outs(const char* s, char** out, char* end) {
function mi_out_fill (line 111) | static void mi_out_fill(char fill, size_t len, char** out, char* end) {
function mi_out_alignright (line 119) | static void mi_out_alignright(char fill, char* start, size_t len, size_t...
function mi_out_num (line 133) | static void mi_out_num(uintmax_t x, size_t base, char prefix, char** out...
function _mi_vsnprintf (line 163) | int _mi_vsnprintf(char* buf, size_t bufsize, const char* fmt, va_list ar...
function _mi_snprintf (line 271) | int _mi_snprintf(char* buf, size_t buflen, const char* fmt, ...) {
FILE: third-party/mimalloc/src/options.c
function mi_version (line 22) | int mi_version(void) mi_attr_noexcept {
type mi_init_t (line 33) | typedef enum mi_init_e {
type mi_option_desc_t (line 39) | typedef struct mi_option_desc_s {
function mi_option_has_size_in_kib (line 170) | static bool mi_option_has_size_in_kib(mi_option_t option) {
function _mi_options_init (line 174) | void _mi_options_init(void) {
function mi_options_print (line 197) | void mi_options_print(void) mi_attr_noexcept
function _mi_option_get_fast (line 237) | long _mi_option_get_fast(mi_option_t option) {
function mi_option_get (line 246) | mi_decl_nodiscard long mi_option_get(mi_option_t option) {
function mi_option_get_clamp (line 257) | mi_decl_nodiscard long mi_option_get_clamp(mi_option_t option, long min,...
function mi_decl_nodiscard (line 262) | mi_decl_nodiscard size_t mi_option_get_size(mi_option_t option) {
function mi_option_set (line 271) | void mi_option_set(mi_option_t option, long value) {
function mi_option_set_default (line 287) | void mi_option_set_default(mi_option_t option, long value) {
function mi_decl_nodiscard (line 296) | mi_decl_nodiscard bool mi_option_is_enabled(mi_option_t option) {
function mi_option_set_enabled (line 300) | void mi_option_set_enabled(mi_option_t option, bool enable) {
function mi_option_set_enabled_default (line 304) | void mi_option_set_enabled_default(mi_option_t option, bool enable) {
function mi_option_enable (line 308) | void mi_option_enable(mi_option_t option) {
function mi_option_disable (line 312) | void mi_option_disable(mi_option_t option) {
function mi_out_stderr (line 316) | static void mi_cdecl mi_out_stderr(const char* msg, void* arg) {
function mi_out_buf (line 333) | static void mi_cdecl mi_out_buf(const char* msg, void* arg) {
function mi_out_buf_flush (line 349) | static void mi_out_buf_flush(mi_output_fun* out, bool no_more_buf, void*...
function mi_out_buf_stderr (line 365) | static void mi_cdecl mi_out_buf_stderr(const char* msg, void* arg) {
function mi_output_fun (line 381) | static mi_output_fun* mi_out_get_default(void** parg) {
function mi_register_output (line 387) | void mi_register_output(mi_output_fun* out, void* arg) mi_attr_noexcept {
function mi_add_stderr_output (line 394) | static void mi_add_stderr_output(void) {
function mi_decl_noinline (line 417) | static mi_decl_noinline bool mi_recurse_enter_prim(void) {
function mi_decl_noinline (line 423) | static mi_decl_noinline void mi_recurse_exit_prim(void) {
function mi_recurse_enter (line 427) | static bool mi_recurse_enter(void) {
function mi_recurse_exit (line 434) | static void mi_recurse_exit(void) {
function _mi_fputs (line 441) | void _mi_fputs(mi_output_fun* out, void* arg, const char* prefix, const ...
function mi_vfprintf (line 457) | static void mi_vfprintf( mi_output_fun* out, void* arg, const char* pref...
function _mi_fprintf (line 466) | void _mi_fprintf( mi_output_fun* out, void* arg, const char* fmt, ... ) {
function mi_vfprintf_thread (line 473) | static void mi_vfprintf_thread(mi_output_fun* out, void* arg, const char...
function _mi_message (line 484) | void _mi_message(const char* fmt, ...) {
function _mi_trace_message (line 491) | void _mi_trace_message(const char* fmt, ...) {
function _mi_verbose_message (line 499) | void _mi_verbose_message(const char* fmt, ...) {
function mi_show_error_message (line 507) | static void mi_show_error_message(const char* fmt, va_list args) {
function _mi_warning_message (line 515) | void _mi_warning_message(const char* fmt, ...) {
function _mi_assert_fail (line 528) | void _mi_assert_fail(const char* assertion, const char* fname, unsigned ...
function mi_error_default (line 541) | static void mi_error_default(int err) {
function mi_register_error (line 563) | void mi_register_error(mi_error_fun* fun, void* arg) {
function _mi_error_message (line 568) | void _mi_error_message(int err, const char* fmt, ...) {
function mi_option_init (line 592) | static void mi_option_init(mi_option_desc_t* desc) {
FILE: third-party/mimalloc/src/os.c
function _mi_os_has_overcommit (line 46) | bool _mi_os_has_overcommit(void) {
function _mi_os_has_virtual_reserve (line 50) | bool _mi_os_has_virtual_reserve(void) {
function _mi_os_page_size (line 56) | size_t _mi_os_page_size(void) {
function _mi_os_large_page_size (line 61) | size_t _mi_os_large_page_size(void) {
function _mi_os_use_large_page (line 65) | bool _mi_os_use_large_page(size_t size, size_t alignment) {
function _mi_os_good_alloc_size (line 72) | size_t _mi_os_good_alloc_size(size_t size) {
function _mi_os_init (line 83) | void _mi_os_init(void) {
function mi_os_prim_free (line 153) | static void mi_os_prim_free(void* addr, size_t size, size_t commit_size) {
function _mi_os_free_ex (line 166) | void _mi_os_free_ex(void* addr, size_t size, bool still_committed, mi_me...
function _mi_os_free (line 199) | void _mi_os_free(void* p, size_t size, mi_memid_t memid) {
function _mi_os_commit_ex (line 416) | bool _mi_os_commit_ex(void* addr, size_t size, bool* is_zero, size_t sta...
function _mi_os_commit (line 445) | bool _mi_os_commit(void* addr, size_t size, bool* is_zero) {
function mi_os_decommit_ex (line 449) | static bool mi_os_decommit_ex(void* addr, size_t size, bool* needs_recom...
function _mi_os_decommit (line 468) | bool _mi_os_decommit(void* addr, size_t size) {
function _mi_os_reset (line 478) | bool _mi_os_reset(void* addr, size_t size) {
function _mi_os_purge_ex (line 500) | bool _mi_os_purge_ex(void* p, size_t size, bool allow_reset, size_t stat...
function _mi_os_purge (line 523) | bool _mi_os_purge(void* p, size_t size) {
function mi_os_protectx (line 528) | static bool mi_os_protectx(void* addr, size_t size, bool protect) {
function _mi_os_protect (line 545) | bool _mi_os_protect(void* addr, size_t size) {
function _mi_os_unprotect (line 549) | bool _mi_os_unprotect(void* addr, size_t size) {
function mi_os_free_huge_os_pages (line 673) | static void mi_os_free_huge_os_pages(void* p, size_t size) {
function _mi_os_numa_node_count_get (line 689) | size_t _mi_os_numa_node_count_get(void) {
function _mi_os_numa_node_get (line 706) | int _mi_os_numa_node_get(void) {
FILE: third-party/mimalloc/src/page-queue.c
function mi_page_queue_is_huge (line 40) | static inline bool mi_page_queue_is_huge(const mi_page_queue_t* pq) {
function mi_page_queue_is_full (line 44) | static inline bool mi_page_queue_is_full(const mi_page_queue_t* pq) {
function mi_page_queue_is_special (line 48) | static inline bool mi_page_queue_is_special(const mi_page_queue_t* pq) {
function mi_bin (line 60) | static inline size_t mi_bin(size_t size) {
function _mi_bin (line 100) | size_t _mi_bin(size_t size) {
function _mi_bin_size (line 104) | size_t _mi_bin_size(size_t bin) {
function mi_good_size (line 109) | size_t mi_good_size(size_t size) mi_attr_noexcept {
function mi_page_queue_contains (line 119) | static bool mi_page_queue_contains(mi_page_queue_t* queue, const mi_page...
function mi_heap_contains_queue (line 134) | static bool mi_heap_contains_queue(const mi_heap_t* heap, const mi_page_...
function mi_page_is_large_or_huge (line 139) | static inline bool mi_page_is_large_or_huge(const mi_page_t* page) {
function mi_page_bin (line 143) | static size_t mi_page_bin(const mi_page_t* page) {
function mi_page_queue_t (line 149) | static mi_page_queue_t* mi_heap_page_queue_of(mi_heap_t* heap, const mi_...
function mi_page_queue_t (line 159) | static mi_page_queue_t* mi_page_queue_of(const mi_page_t* page) {
function mi_heap_queue_first_update (line 171) | static inline void mi_heap_queue_first_update(mi_heap_t* heap, const mi_...
function mi_page_queue_remove (line 214) | static void mi_page_queue_remove(mi_page_queue_t* queue, mi_page_t* page) {
function mi_page_queue_push (line 239) | static void mi_page_queue_push(mi_heap_t* heap, mi_page_queue_t* queue, ...
function mi_page_queue_move_to_front (line 267) | static void mi_page_queue_move_to_front(mi_heap_t* heap, mi_page_queue_t...
function mi_page_queue_enqueue_from_ex (line 276) | static void mi_page_queue_enqueue_from_ex(mi_page_queue_t* to, mi_page_q...
function mi_page_queue_enqueue_from (line 345) | static void mi_page_queue_enqueue_from(mi_page_queue_t* to, mi_page_queu...
function mi_page_queue_enqueue_from_full (line 349) | static void mi_page_queue_enqueue_from_full(mi_page_queue_t* to, mi_page...
function _mi_page_queue_append (line 355) | size_t _mi_page_queue_append(mi_heap_t* heap, mi_page_queue_t* pq, mi_pa...
FILE: third-party/mimalloc/src/page.c
function mi_block_t (line 32) | static inline mi_block_t* mi_page_block_at(const mi_page_t* page, void* ...
function mi_page_list_count (line 43) | static size_t mi_page_list_count(mi_page_t* page, mi_block_t* head) {
function mi_page_list_is_valid (line 60) | static bool mi_page_list_is_valid(mi_page_t* page, mi_block_t* p) {
function mi_page_is_valid_init (line 80) | static bool mi_page_is_valid_init(mi_page_t* page) {
function _mi_page_is_valid (line 117) | bool _mi_page_is_valid(mi_page_t* page) {
function _mi_page_use_delayed_free (line 140) | void _mi_page_use_delayed_free(mi_page_t* page, mi_delayed_t delay, bool...
function _mi_page_try_use_delayed_free (line 146) | bool _mi_page_try_use_delayed_free(mi_page_t* page, mi_delayed_t delay, ...
function _mi_page_thread_free_collect (line 181) | static void _mi_page_thread_free_collect(mi_page_t* page)
function _mi_page_free_collect (line 217) | void _mi_page_free_collect(mi_page_t* page, bool force) {
function _mi_page_reclaim (line 257) | void _mi_page_reclaim(mi_heap_t* heap, mi_page_t* page) {
function mi_page_t (line 273) | static mi_page_t* mi_page_fresh_alloc(mi_heap_t* heap, mi_page_queue_t* ...
function mi_page_t (line 301) | static mi_page_t* mi_page_fresh(mi_heap_t* heap, mi_page_queue_t* pq) {
function _mi_heap_delayed_free_all (line 314) | void _mi_heap_delayed_free_all(mi_heap_t* heap) {
function _mi_heap_delayed_free_partial (line 321) | bool _mi_heap_delayed_free_partial(mi_heap_t* heap) {
function _mi_page_unfull (line 351) | void _mi_page_unfull(mi_page_t* page) {
function mi_page_to_full (line 365) | static void mi_page_to_full(mi_page_t* page, mi_page_queue_t* pq) {
function _mi_page_abandon (line 380) | void _mi_page_abandon(mi_page_t* page, mi_page_queue_t* pq) {
function _mi_page_force_abandon (line 409) | void _mi_page_force_abandon(mi_page_t* page) {
function _mi_page_free (line 432) | void _mi_page_free(mi_page_t* page, mi_page_queue_t* pq, bool force) {
function _mi_page_retire (line 463) | void _mi_page_retire(mi_page_t* page) mi_attr_noexcept {
function _mi_heap_collect_retired (line 499) | void _mi_heap_collect_retired(mi_heap_t* heap, bool force) {
function mi_page_free_list_extend_secure (line 537) | static void mi_page_free_list_extend_secure(mi_heap_t* const heap, mi_pa...
function mi_decl_noinline (line 594) | static mi_decl_noinline void mi_page_free_list_extend( mi_page_t* const ...
function mi_page_extend_free (line 636) | static void mi_page_extend_free(mi_heap_t* heap, mi_page_t* page, mi_tld...
function mi_page_init (line 680) | static void mi_page_init(mi_heap_t* heap, mi_page_t* page, size_t block_...
function mi_page_is_expandable (line 744) | static bool mi_page_is_expandable(const mi_page_t* page) {
function mi_page_t (line 752) | static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_qu...
function mi_page_t (line 852) | static inline mi_page_t* mi_find_free_page(mi_heap_t* heap, size_t size) {
function _mi_deferred_free (line 889) | void _mi_deferred_free(mi_heap_t* heap, bool force) {
function mi_register_deferred_free (line 898) | void mi_register_deferred_free(mi_deferred_free_fun* fn, void* arg) mi_a...
function mi_page_t (line 912) | static mi_page_t* mi_large_huge_page_alloc(mi_heap_t* heap, size_t size,...
function mi_page_t (line 956) | static mi_page_t* mi_find_page(mi_heap_t* heap, size_t size, size_t huge...
FILE: third-party/mimalloc/src/prim/emscripten/prim.c
function _mi_prim_mem_init (line 50) | void _mi_prim_mem_init( mi_os_mem_config_t* config) {
function _mi_prim_free (line 60) | int _mi_prim_free(void* addr, size_t size) {
function _mi_prim_alloc (line 74) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 99) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 106) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 112) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_protect (line 117) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 127) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 134) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 138) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 149) | mi_msecs_t _mi_prim_clock_now(void) {
function _mi_prim_process_info (line 158) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 171) | void _mi_prim_out_stderr( const char* msg) {
function _mi_prim_getenv (line 180) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 193) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_pthread_done (line 209) | static void mi_pthread_done(void* value) {
function _mi_prim_thread_init_auto_done (line 215) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 220) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 224) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_prim_thread_init_auto_done (line 232) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 236) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 240) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: third-party/mimalloc/src/prim/osx/alloc-override-zone.c
function zone_size (line 44) | static size_t zone_size(malloc_zone_t* zone, const void* p) {
function zone_free (line 65) | static void zone_free(malloc_zone_t* zone, void* p) {
function zone_destroy (line 80) | static void zone_destroy(malloc_zone_t* zone) {
function zone_batch_malloc (line 85) | static unsigned zone_batch_malloc(malloc_zone_t* zone, size_t size, void...
function zone_batch_free (line 94) | static void zone_batch_free(malloc_zone_t* zone, void** ps, unsigned cou...
function zone_pressure_relief (line 101) | static size_t zone_pressure_relief(malloc_zone_t* zone, size_t size) {
function zone_free_definite_size (line 107) | static void zone_free_definite_size(malloc_zone_t* zone, void* p, size_t...
function boolean_t (line 112) | static boolean_t zone_claimed_address(malloc_zone_t* zone, void* p) {
function kern_return_t (line 122) | static kern_return_t intro_enumerator(task_t task, void* p,
function intro_good_size (line 133) | static size_t intro_good_size(malloc_zone_t* zone, size_t size) {
function boolean_t (line 138) | static boolean_t intro_check(malloc_zone_t* zone) {
function intro_print (line 143) | static void intro_print(malloc_zone_t* zone, boolean_t verbose) {
function intro_log (line 148) | static void intro_log(malloc_zone_t* zone, void* p) {
function intro_force_lock (line 153) | static void intro_force_lock(malloc_zone_t* zone) {
function intro_force_unlock (line 158) | static void intro_force_unlock(malloc_zone_t* zone) {
function intro_statistics (line 163) | static void intro_statistics(malloc_zone_t* zone, malloc_statistics_t* s...
function boolean_t (line 172) | static boolean_t intro_zone_locked(malloc_zone_t* zone) {
function malloc_zone_t (line 256) | static inline malloc_zone_t* mi_get_default_zone(void)
function malloc_zone_t (line 272) | static malloc_zone_t* mi_malloc_create_zone(vm_size_t size, unsigned fla...
function malloc_zone_t (line 277) | static malloc_zone_t* mi_malloc_default_zone (void) {
function malloc_zone_t (line 281) | static malloc_zone_t* mi_malloc_default_purgeable_zone(void) {
function mi_malloc_destroy_zone (line 285) | static void mi_malloc_destroy_zone(malloc_zone_t* zone) {
function kern_return_t (line 290) | static kern_return_t mi_malloc_get_all_zones (task_t task, memory_reader...
function mi_malloc_set_zone_name (line 301) | static void mi_malloc_set_zone_name(malloc_zone_t* zone, const char* nam...
function mi_malloc_jumpstart (line 305) | static int mi_malloc_jumpstart(uintptr_t cookie) {
function mi__malloc_fork_prepare (line 310) | static void mi__malloc_fork_prepare(void) {
function mi__malloc_fork_parent (line 313) | static void mi__malloc_fork_parent(void) {
function mi__malloc_fork_child (line 316) | static void mi__malloc_fork_child(void) {
function mi_malloc_printf (line 320) | static void mi_malloc_printf(const char* fmt, ...) {
function zone_check (line 324) | static bool zone_check(malloc_zone_t* zone) {
function malloc_zone_t (line 329) | static malloc_zone_t* zone_from_ptr(const void* p) {
function zone_log (line 334) | static void zone_log(malloc_zone_t* zone, void* p) {
function zone_print (line 338) | static void zone_print(malloc_zone_t* zone, bool b) {
function zone_print_ptr_info (line 342) | static void zone_print_ptr_info(void* p) {
function zone_register (line 346) | static void zone_register(malloc_zone_t* zone) {
function zone_unregister (line 350) | static void zone_unregister(malloc_zone_t* zone) {
type mi_interpose_s (line 356) | struct mi_interpose_s {
type mi_interpose_s (line 363) | struct mi_interpose_s
function malloc_zone_t (line 405) | static inline malloc_zone_t* mi_get_default_zone(void)
function _mi_macos_override_malloc (line 421) | __attribute__((constructor(101))) // highest priority
FILE: third-party/mimalloc/src/prim/prim.c
function mi_process_attach (line 41) | mi_process_attach(void) {
function mi_process_detach (line 44) | mi_process_detach(void) {
function mi_init_done_t (line 50) | struct mi_init_done_t {
function _mi_is_redirected (line 66) | bool _mi_is_redirected(void) {
function _mi_allocator_init (line 69) | bool _mi_allocator_init(const char** message) {
function _mi_allocator_done (line 73) | void _mi_allocator_done(void) {
FILE: third-party/mimalloc/src/prim/unix/prim.c
function mi_prim_open (line 82) | static inline int mi_prim_open(const char* fpath, int open_flags) {
function mi_prim_read (line 85) | static inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
function mi_prim_close (line 88) | static inline int mi_prim_close(int fd) {
function mi_prim_access (line 91) | static inline int mi_prim_access(const char *fpath, int mode) {
function mi_prim_open (line 97) | static inline int mi_prim_open(const char* fpath, int open_flags) {
function mi_prim_read (line 100) | static inline ssize_t mi_prim_read(int fd, void* buf, size_t bufsize) {
function mi_prim_close (line 103) | static inline int mi_prim_close(int fd) {
function mi_prim_access (line 106) | static inline int mi_prim_access(const char *fpath, int mode) {
function unix_detect_overcommit (line 118) | static bool unix_detect_overcommit(void) {
function _mi_prim_mem_init (line 144) | void _mi_prim_mem_init( mi_os_mem_config_t* config )
function _mi_prim_free (line 187) | int _mi_prim_free(void* addr, size_t size ) {
function unix_madvise (line 197) | static int unix_madvise(void* addr, size_t size, int advice) {
function unix_mmap_fd (line 257) | static int unix_mmap_fd(void) {
type memcntl_mha (line 359) | struct memcntl_mha
function _mi_prim_alloc (line 373) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function unix_mprotect_hint (line 389) | static void unix_mprotect_hint(int err) {
function _mi_prim_commit (line 401) | int _mi_prim_commit(void* start, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 416) | int _mi_prim_decommit(void* start, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 436) | int _mi_prim_reset(void* start, size_t size) {
function _mi_prim_protect (line 457) | int _mi_prim_protect(void* start, size_t size, bool protect) {
function mi_prim_mbind (line 477) | static long mi_prim_mbind(void* start, unsigned long len, unsigned long ...
function mi_prim_mbind (line 481) | static long mi_prim_mbind(void* start, unsigned long len, unsigned long ...
function _mi_prim_alloc_huge_os_pages (line 487) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_alloc_huge_os_pages (line 507) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 522) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 534) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 547) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 558) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 567) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 572) | size_t _mi_prim_numa_node_count(void) {
function _mi_prim_numa_node (line 582) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 586) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 600) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 613) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 645) | static mi_msecs_t timeval_secs(const struct timeval* tv) {
function _mi_prim_process_info (line 649) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_process_info (line 697) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 710) | void _mi_prim_out_stderr( const char* msg ) {
function _mi_prim_getenv (line 733) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_getenv (line 752) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 781) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 792) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 803) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_random_buf (line 842) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_pthread_done (line 859) | static void mi_pthread_done(void* value) {
function _mi_prim_thread_init_auto_done (line 865) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 870) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 876) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_prim_thread_init_auto_done (line 884) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 888) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 892) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: third-party/mimalloc/src/prim/wasi/prim.c
function _mi_prim_mem_init (line 21) | void _mi_prim_mem_init( mi_os_mem_config_t* config ) {
function _mi_prim_free (line 33) | int _mi_prim_free(void* addr, size_t size ) {
function _mi_prim_alloc (line 122) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 135) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 141) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 147) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_protect (line 152) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 162) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 169) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 173) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 186) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 199) | mi_msecs_t _mi_prim_clock_now(void) {
function _mi_prim_process_info (line 216) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 227) | void _mi_prim_out_stderr( const char* msg ) {
function _mi_prim_getenv (line 236) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 260) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function _mi_prim_thread_init_auto_done (line 269) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 273) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 277) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
FILE: third-party/mimalloc/src/prim/windows/etw.h
type MCGEN_TRACE_CONTEXT (line 243) | typedef struct _MCGEN_TRACE_CONTEXT
function FORCEINLINE (line 268) | FORCEINLINE
function FORCEINLINE (line 308) | FORCEINLINE
function DECLSPEC_NOINLINE (line 323) | DECLSPEC_NOINLINE __inline
type _mcgen_PASTE2 (line 457) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 460) | struct _mcgen_PASTE2
type MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTREGISTER (line 464) | typedef void MCGEN_EVENTREGISTER_must_not_be_a_functionLike_macro_MCGEN_...
type _mcgen_PASTE2 (line 470) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 473) | struct _mcgen_PASTE2
type MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_MCGEN_EVENTUNREGISTER (line 477) | typedef void MCGEN_EVENTUNREGISTER_must_not_be_a_functionLike_macro_MCGE...
type _mcgen_PASTE2 (line 483) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 486) | struct _mcgen_PASTE2
type MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_MCGEN_EVENTSETINFORMATION (line 490) | typedef void MCGEN_EVENTSETINFORMATION_must_not_be_a_functionLike_macro_...
type _mcgen_PASTE2 (line 496) | struct _mcgen_PASTE2
type _mcgen_PASTE2 (line 499) | struct _mcgen_PASTE2
type MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_MCGEN_EVENTWRITETRANSFER (line 503) | typedef void MCGEN_EVENTWRITETRANSFER_must_not_be_a_functionLike_macro_M...
function DECLSPEC_NOINLINE (line 513) | DECLSPEC_NOINLINE __inline
function DECLSPEC_NOINLINE (line 559) | DECLSPEC_NOINLINE __inline
function DECLSPEC_NOINLINE (line 611) | DECLSPEC_NOINLINE __inline
type McGenContext_microsoft_windows_mimalloc (line 766) | typedef struct tagMcGenContext_microsoft_windows_mimalloc {
function ULONG (line 785) | __inline
function McGenContext_microsoft_windows_mimalloc (line 807) | McGenContext_microsoft_windows_mimalloc*
function ETW_INLINE (line 880) | ETW_INLINE
FILE: third-party/mimalloc/src/prim/windows/prim.c
type MI_MEM_EXTENDED_PARAMETER_TYPE (line 24) | typedef enum MI_MEM_EXTENDED_PARAMETER_TYPE_E {
type DECLSPEC_ALIGN (line 34) | struct DECLSPEC_ALIGN
type MI_MEM_ADDRESS_REQUIREMENTS (line 39) | typedef struct MI_MEM_ADDRESS_REQUIREMENTS_S {
type PVOID (line 48) | typedef PVOID (__stdcall *PVirtualAlloc2)(HANDLE, PVOID, SIZE_T, ULON...
type NTSTATUS (line 49) | typedef NTSTATUS (__stdcall *PNtAllocateVirtualMemoryEx)(HANDLE, PVOID*,...
type MI_PROCESSOR_NUMBER (line 54) | typedef struct MI_PROCESSOR_NUMBER_S { WORD Group; BYTE Number; BYTE Res...
type VOID (line 56) | typedef VOID (__stdcall *PGetCurrentProcessorNumberEx)(MI_PROCESSOR_NUMB...
type BOOL (line 57) | typedef BOOL (__stdcall *PGetNumaProcessorNodeEx)(MI_PROCESSOR_NUMBER* P...
type BOOL (line 58) | typedef BOOL (__stdcall* PGetNumaNodeProcessorMaskEx)(USHORT Node, PGROU...
type BOOL (line 59) | typedef BOOL (__stdcall *PGetNumaProcessorNode)(UCHAR Processor, PUCHAR ...
type BOOL (line 66) | typedef BOOL (__stdcall *PGetPhysicallyInstalledSystemMemory)( PULONGLON...
function win_enable_large_os_pages (line 72) | static bool win_enable_large_os_pages(size_t* large_page_size)
function _mi_prim_mem_init (line 114) | void _mi_prim_mem_init( mi_os_mem_config_t* config )
function _mi_prim_free (line 175) | int _mi_prim_free(void* addr, size_t size ) {
function win_is_out_of_memory_error (line 229) | static bool win_is_out_of_memory_error(DWORD err) {
function _mi_prim_alloc (line 302) | int _mi_prim_alloc(void* hint_addr, size_t size, size_t try_alignment, b...
function _mi_prim_commit (line 321) | int _mi_prim_commit(void* addr, size_t size, bool* is_zero) {
function _mi_prim_decommit (line 338) | int _mi_prim_decommit(void* addr, size_t size, bool* needs_recommit) {
function _mi_prim_reset (line 344) | int _mi_prim_reset(void* addr, size_t size) {
function _mi_prim_protect (line 355) | int _mi_prim_protect(void* addr, size_t size, bool protect) {
function _mi_prim_alloc_huge_os_pages (line 407) | int _mi_prim_alloc_huge_os_pages(void* hint_addr, size_t size, int numa_...
function _mi_prim_numa_node (line 418) | size_t _mi_prim_numa_node(void) {
function _mi_prim_numa_node_count (line 438) | size_t _mi_prim_numa_node_count(void) {
function mi_msecs_t (line 468) | static mi_msecs_t mi_to_msecs(LARGE_INTEGER t) {
function mi_msecs_t (line 479) | mi_msecs_t _mi_prim_clock_now(void) {
function mi_msecs_t (line 492) | static mi_msecs_t filetime_msecs(const FILETIME* ftime) {
type PPROCESS_MEMORY_COUNTERS (line 500) | typedef BOOL (WINAPI *PGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COU...
function _mi_prim_process_info (line 503) | void _mi_prim_process_info(mi_process_info_t* pinfo)
function _mi_prim_out_stderr (line 537) | void _mi_prim_out_stderr( const char* msg )
function _mi_prim_getenv (line 577) | bool _mi_prim_getenv(const char* name, char* result, size_t result_size) {
function _mi_prim_random_buf (line 598) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
type PUCHAR (line 608) | typedef LONG (NTAPI *PBCryptGenRandom)(HANDLE, PUCHAR, ULONG, ULONG);
function _mi_prim_random_buf (line 611) | bool _mi_prim_random_buf(void* buf, size_t buf_len) {
function mi_win_main (line 630) | static void NTAPI mi_win_main(PVOID module, DWORD reason, LPVOID reserve...
function BOOL (line 654) | BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
function _mi_prim_thread_init_auto_done (line 660) | void _mi_prim_thread_init_auto_done(void) { }
function _mi_prim_thread_done_auto_done (line 661) | void _mi_prim_thread_done_auto_done(void) { }
function _mi_prim_thread_associate_default_heap (line 662) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function mi_win_main_attach (line 669) | static void NTAPI mi_win_main_attach(PVOID module, DWORD reason, LPVOID ...
function mi_win_main_detach (line 674) | static void NTAPI mi_win_main_detach(PVOID module, DWORD reason, LPVOID ...
function _mi_prim_thread_init_auto_done (line 717) | void _mi_prim_thread_init_auto_done(void) { }
function _mi_prim_thread_done_auto_done (line 718) | void _mi_prim_thread_done_auto_done(void) { }
function _mi_prim_thread_associate_default_heap (line 719) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function mi_process_attach (line 730) | static int mi_process_attach(void) {
function mi_fls_done (line 758) | static void NTAPI mi_fls_done(PVOID value) {
function _mi_prim_thread_init_auto_done (line 766) | void _mi_prim_thread_init_auto_done(void) {
function _mi_prim_thread_done_auto_done (line 770) | void _mi_prim_thread_done_auto_done(void) {
function _mi_prim_thread_associate_default_heap (line 776) | void _mi_prim_thread_associate_default_heap(mi_heap_t* heap) {
function _mi_is_redirected (line 790) | bool _mi_is_redirected(void) {
function mi_decl_export (line 797) | mi_decl_export void _mi_redirect_entry(DWORD reason) {
function _mi_allocator_init (line 819) | bool _mi_allocator_init(const char** message) {
function _mi_allocator_done (line 822) | void _mi_allocator_done(void) {
FILE: third-party/mimalloc/src/random.c
function rotl (line 36) | static inline uint32_t rotl(uint32_t x, uint32_t shift) {
function qround (line 40) | static inline void qround(uint32_t x[16], size_t a, size_t b, size_t c, ...
function chacha_block (line 47) | static void chacha_block(mi_random_ctx_t* ctx)
function chacha_next32 (line 81) | static uint32_t chacha_next32(mi_random_ctx_t* ctx) {
function read32 (line 92) | static inline uint32_t read32(const uint8_t* p, size_t idx32) {
function chacha_init (line 97) | static void chacha_init(mi_random_ctx_t* ctx, const uint8_t key[32], uin...
function chacha_split (line 116) | static void chacha_split(mi_random_ctx_t* ctx, uint64_t nonce, mi_random...
function mi_random_is_initialized (line 133) | static bool mi_random_is_initialized(mi_random_ctx_t* ctx) {
function _mi_random_split (line 138) | void _mi_random_split(mi_random_ctx_t* ctx, mi_random_ctx_t* ctx_new) {
function _mi_random_next (line 144) | uintptr_t _mi_random_next(mi_random_ctx_t* ctx) {
function _mi_os_random_weak (line 161) | uintptr_t _mi_os_random_weak(uintptr_t extra_seed) {
function mi_random_init_ex (line 173) | static void mi_random_init_ex(mi_random_ctx_t* ctx, bool use_weak) {
function _mi_random_init (line 194) | void _mi_random_init(mi_random_ctx_t* ctx) {
function _mi_random_init_weak (line 198) | void _mi_random_init_weak(mi_random_ctx_t * ctx) {
function _mi_random_reinit_if_weak (line 202) | void _mi_random_reinit_if_weak(mi_random_ctx_t * ctx) {
FILE: third-party/mimalloc/src/segment-map.c
type mi_segmap_part_t (line 42) | typedef struct mi_segmap_part_s {
function mi_segmap_part_t (line 50) | static mi_segmap_part_t* mi_segment_map_index_of(const mi_segment_t* seg...
function _mi_segment_map_allocated_at (line 82) | void _mi_segment_map_allocated_at(const mi_segment_t* segment) {
function _mi_segment_map_freed_at (line 95) | void _mi_segment_map_freed_at(const mi_segment_t* segment) {
function mi_segment_t (line 109) | static mi_segment_t* _mi_segment_of(const void* p) {
function mi_is_valid_pointer (line 126) | static bool mi_is_valid_pointer(const void* p) {
function mi_is_in_heap_region (line 131) | bool mi_is_in_heap_region(const void* p) mi_attr_noexcept {
function _mi_segment_map_unsafe_destroy (line 135) | void _mi_segment_map_unsafe_destroy(void) {
FILE: third-party/mimalloc/src/segment.c
function mi_commit_mask_all_set (line 27) | static bool mi_commit_mask_all_set(const mi_commit_mask_t* commit, const...
function mi_commit_mask_any_set (line 34) | static bool mi_commit_mask_any_set(const mi_commit_mask_t* commit, const...
function mi_commit_mask_create_intersect (line 41) | static void mi_commit_mask_create_intersect(const mi_commit_mask_t* comm...
function mi_commit_mask_clear (line 47) | static void mi_commit_mask_clear(mi_commit_mask_t* res, const mi_commit_...
function mi_commit_mask_set (line 53) | static void mi_commit_mask_set(mi_commit_mask_t* res, const mi_commit_ma...
function mi_commit_mask_create (line 59) | static void mi_commit_mask_create(size_t bitidx, size_t bitcount, mi_com...
function _mi_commit_mask_committed_size (line 86) | size_t _mi_commit_mask_committed_size(const mi_commit_mask_t* cm, size_t...
function _mi_commit_mask_next_run (line 105) | size_t _mi_commit_mask_next_run(const mi_commit_mask_t* cm, size_t* idx) {
function mi_slice_t (line 178) | static const mi_slice_t* mi_segment_slices_end(const mi_segment_t* segme...
function mi_slice_bin8 (line 194) | static inline size_t mi_slice_bin8(size_t slice_count) {
function mi_slice_bin (line 204) | static inline size_t mi_slice_bin(size_t slice_count) {
function mi_slice_index (line 212) | static inline size_t mi_slice_index(const mi_slice_t* slice) {
function mi_span_queue_push (line 224) | static void mi_span_queue_push(mi_span_queue_t* sq, mi_slice_t* slice) {
function mi_span_queue_t (line 235) | static mi_span_queue_t* mi_span_queue_for(size_t slice_count, mi_segment...
function mi_span_queue_delete (line 242) | static void mi_span_queue_delete(mi_span_queue_t* sq, mi_slice_t* slice) {
function mi_slice_is_used (line 259) | static bool mi_slice_is_used(const mi_slice_t* slice) {
function mi_span_queue_contains (line 265) | static bool mi_span_queue_contains(mi_span_queue_t* sq, mi_slice_t* slic...
function mi_segment_is_valid (line 272) | static bool mi_segment_is_valid(mi_segment_t* segment, mi_segments_tld_t...
function mi_segment_info_size (line 328) | static size_t mi_segment_info_size(mi_segment_t* segment) {
function mi_segment_calculate_slices (line 370) | static size_t mi_segment_calculate_slices(size_t required, size_t* info_...
function mi_segments_track_size (line 398) | static void mi_segments_track_size(long segment_size, mi_segments_tld_t*...
function mi_segment_os_free (line 407) | static void mi_segment_os_free(mi_segment_t* segment, mi_segments_tld_t*...
function mi_segment_commit_mask (line 437) | static void mi_segment_commit_mask(mi_segment_t* segment, bool conservat...
function mi_segment_commit (line 487) | static bool mi_segment_commit(mi_segment_t* segment, uint8_t* p, size_t ...
function mi_segment_ensure_committed (line 517) | static bool mi_segment_ensure_committed(mi_segment_t* segment, uint8_t* ...
function mi_segment_purge (line 525) | static bool mi_segment_purge(mi_segment_t* segment, uint8_t* p, size_t s...
function mi_segment_schedule_purge (line 554) | static void mi_segment_schedule_purge(mi_segment_t* segment, uint8_t* p,...
function mi_segment_try_purge (line 594) | static void mi_segment_try_purge(mi_segment_t* segment, bool force) {
function _mi_segment_collect (line 619) | void _mi_segment_collect(mi_segment_t* segment, bool force) {
function mi_segment_is_abandoned (line 627) | static bool mi_segment_is_abandoned(mi_segment_t* segment) {
function mi_segment_span_free (line 632) | static void mi_segment_span_free(mi_segment_t* segment, size_t slice_ind...
function mi_segment_span_remove_from_queue (line 673) | static void mi_segment_span_remove_from_queue(mi_slice_t* slice, mi_segm...
function mi_slice_t (line 681) | static mi_slice_t* mi_segment_span_free_coalesce(mi_slice_t* slice, mi_s...
function mi_page_t (line 732) | static mi_page_t* mi_segment_span_allocate(mi_segment_t* segment, size_t...
function mi_segment_slice_split (line 781) | static void mi_segment_slice_split(mi_segment_t* segment, mi_slice_t* sl...
function mi_page_t (line 793) | static mi_page_t* mi_segments_page_find_and_allocate(size_t slice_count,...
function mi_segment_t (line 832) | static mi_segment_t* mi_segment_os_alloc( size_t required, size_t page_a...
function mi_segment_t (line 894) | static mi_segment_t* mi_segment_alloc(size_t required, size_t page_align...
function mi_segment_free (line 973) | static void mi_segment_free(mi_segment_t* segment, bool force, mi_segmen...
function mi_slice_t (line 1017) | static mi_slice_t* mi_segment_page_clear(mi_page_t* page, mi_segments_tl...
function _mi_segment_page_free (line 1050) | void _mi_segment_page_free(mi_page_t* page, bool force, mi_segments_tld_...
function mi_segment_abandon (line 1097) | static void mi_segment_abandon(mi_segment_t* segment, mi_segments_tld_t*...
function _mi_segment_page_abandon (line 1134) | void _mi_segment_page_abandon(mi_page_t* page, mi_segments_tld_t* tld) {
function mi_slice_t (line 1155) | static mi_slice_t* mi_slices_start_iterate(mi_segment_t* segment, const ...
function mi_segment_check_free (line 1164) | static bool mi_segment_check_free(mi_segment_t* segment, size_t slices_n...
function mi_segment_t (line 1208) | static mi_segment_t* mi_segment_reclaim(mi_segment_t* segment, mi_heap_t...
function _mi_segment_attempt_reclaim (line 1280) | bool _mi_segment_attempt_reclaim(mi_heap_t* heap, mi_segment_t* segment) {
function _mi_abandoned_reclaim_all (line 1301) | void _mi_abandoned_reclaim_all(mi_heap_t* heap, mi_segments_tld_t* tld) {
function segment_count_is_within_target (line 1312) | static bool segment_count_is_within_target(mi_segments_tld_t* tld, size_...
function mi_segment_get_reclaim_tries (line 1318) | static long mi_segment_get_reclaim_tries(mi_segments_tld_t* tld) {
function mi_segment_t (line 1330) | static mi_segment_t* mi_segment_try_reclaim(mi_heap_t* heap, size_t need...
function _mi_abandoned_collect (line 1380) | void _mi_abandoned_collect(mi_heap_t* heap, bool force, mi_segments_tld_...
function mi_segment_force_abandon (line 1408) | static void mi_segment_force_abandon(mi_segment_t* segment, mi_segments_...
function mi_segments_try_abandon_to_target (line 1462) | static void mi_segments_try_abandon_to_target(mi_heap_t* heap, size_t ta...
function mi_segments_try_abandon (line 1482) | static void mi_segments_try_abandon(mi_heap_t* heap, mi_segments_tld_t* ...
function mi_collect_reduce (line 1489) | void mi_collect_reduce(size_t target_size) mi_attr_noexcept {
function mi_segment_t (line 1504) | static mi_segment_t* mi_segment_reclaim_or_alloc(mi_heap_t* heap, size_t...
function mi_page_t (line 1532) | static mi_page_t* mi_segments_page_alloc(mi_heap_t* heap, mi_page_kind_t...
function mi_page_t (line 1564) | static mi_page_t* mi_segment_huge_page_alloc(size_t size, size_t page_al...
function _mi_segment_huge_page_free (line 1597) | void _mi_segment_huge_page_free(mi_segment_t* segment, mi_page_t* page, ...
function _mi_segment_huge_page_reset (line 1625) | void _mi_segment_huge_page_reset(mi_segment_t* segment, mi_page_t* page,...
function mi_page_t (line 1645) | mi_page_t* _mi_segment_page_alloc(mi_heap_t* heap, size_t block_size, si...
function else (line 1653) | else if (block_size <= MI_SMALL_OBJ_SIZE_MAX) {
function else (line 1656) | else if (block_size <= MI_MEDIUM_OBJ_SIZE_MAX) {
function else (line 1659) | else if (block_size <= MI_LARGE_OBJ_SIZE_MAX) {
function mi_segment_visit_page (line 1676) | static bool mi_segment_visit_page(mi_page_t* page, bool visit_blocks, mi...
function _mi_segment_visit_blocks (line 1688) | bool _mi_segment_visit_blocks(mi_segment_t* segment, int heap_tag, bool ...
FILE: third-party/mimalloc/src/stats.c
function mi_is_in_main (line 22) | static bool mi_is_in_main(void* stat) {
function mi_stat_update (line 27) | static void mi_stat_update(mi_stat_count_t* stat, int64_t amount) {
function _mi_stat_counter_increase (line 46) | void _mi_stat_counter_increase(mi_stat_counter_t* stat, size_t amount) {
function _mi_stat_increase (line 55) | void _mi_stat_increase(mi_stat_count_t* stat, size_t amount) {
function _mi_stat_decrease (line 59) | void _mi_stat_decrease(mi_stat_count_t* stat, size_t amount) {
function mi_stat_count_add_mt (line 66) | static void mi_stat_count_add_mt(mi_stat_count_t* stat, const mi_stat_co...
function mi_stat_counter_add_mt (line 76) | static void mi_stat_counter_add_mt(mi_stat_counter_t* stat, const mi_sta...
function mi_stats_add (line 85) | static void mi_stats_add(mi_stats_t* stats, const mi_stats_t* src) {
function mi_printf_amount (line 111) | static void mi_printf_amount(int64_t n, int64_t
Copy disabled (too large)
Download .json
Condensed preview — 2520 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (18,070K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 812,
"preview": "# These are supported funding model platforms\n\ngithub: [rui314] # Replace with up to 4 GitHub Sponsors-enabled usernames"
},
{
"path": ".github/workflows/build-all.yml",
"chars": 2030,
"preview": "name: Build all tarballs\n\non:\n schedule:\n - cron: '0 0 * * *'\n workflow_dispatch:\n\njobs:\n build-linux:\n strateg"
},
{
"path": ".github/workflows/build-native.yml",
"chars": 1040,
"preview": "name: Build native tarballs\n\non:\n push:\n workflow_dispatch:\n\njobs:\n build-tarballs:\n strategy:\n matrix:\n "
},
{
"path": ".github/workflows/ci.yml",
"chars": 4236,
"preview": "name: CI\non:\n push:\n pull_request:\nenv:\n UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1\njobs:\n build-asan-tsan:\n "
},
{
"path": ".github/workflows/install-extras.sh",
"chars": 3830,
"preview": "#!/bin/bash -x\n\napt-get update\napt-get install -y wget xz-utils\n\n# Install a 32-bit RISC-V toolchain\nmkdir /rv32\nwget -O"
},
{
"path": ".github/workflows/release-assets.yml",
"chars": 2788,
"preview": "name: Build & attach tarballs on tag push\n\non:\n push:\n tags: ['v[0-9]*']\n\npermissions:\n contents: write\n packages:"
},
{
"path": ".github/workflows/run-msan.sh",
"chars": 1727,
"preview": "#!/bin/bash\nset -e -x\ncd \"$(dirname $0)\"/../..\n\nif [ \"$GITHUB_REPOSITORY\" = '' ]; then\n image=mold-msan\n image_build=\""
},
{
"path": ".github/workflows/update-manpage.yml",
"chars": 752,
"preview": "name: Update manpage\n\non:\n push:\n paths:\n - 'docs/mold.md'\n branches:\n - main\n workflow_dispatch:\n\njob"
},
{
"path": ".gitignore",
"chars": 79,
"preview": "*.o\n*.so\n*~\n**/.DS_Store\n.cache\ncore\ngentoo\n/mold-*.tar.gz\n/build*\n/mold\n/dist\n"
},
{
"path": "CMakeLists.txt",
"chars": 15701,
"preview": "# You can customize a build by specifying CMake options. An option may be\n# given in the -Dvariable=value form. For a bo"
},
{
"path": "LICENSE",
"chars": 1067,
"preview": "MIT License\n\nCopyright (c) 2023 Rui Ueyama\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "README.md",
"chars": 10873,
"preview": "# mold: A Modern Linker\n\nmold is a faster drop-in replacement for existing Unix linkers. It is several\ntimes quicker tha"
},
{
"path": "dist.sh",
"chars": 10248,
"preview": "#!/bin/bash\n#\n# This script creates a mold binary distribution. The output is written to\n# the `dist` directory as `mold"
},
{
"path": "docs/bugs.md",
"chars": 6984,
"preview": "This is a note about interesting bugs that I met during the\ndevelopment of the mold linker.\n\n## GNU IFUNC\n\nProblem: A st"
},
{
"path": "docs/coding-guidelines.md",
"chars": 2177,
"preview": "# Coding Guidelines\n\nmold is written in C++20, but as is the case with every C++ project,\nit has local coding rules. In "
},
{
"path": "docs/design.md",
"chars": 24617,
"preview": "[This document was written in 2020, and the contents are outdated.\nSpecifically, we no longer believe that object preloa"
},
{
"path": "docs/execstack.md",
"chars": 2336,
"preview": "This page explains the following warning message and how to fix it.\nmold emits this message when it sees an object file "
},
{
"path": "docs/glossary.md",
"chars": 7098,
"preview": "The very concept of linking is simple: a compiler compiles a piece of\nsource code into an object file (a file containing"
},
{
"path": "docs/memory-sanitizer.md",
"chars": 5734,
"preview": "# Instrumenting mold with MemorySanitizer\n\n## Introduction\n\nPer <https://github.com/google/sanitizers/wiki/MemorySanitiz"
},
{
"path": "docs/mold.1",
"chars": 44003,
"preview": ".\\\" generated with Ronn-NG/v0.9.1\n.\\\" http://github.com/apjanke/ronn-ng/tree/0.9.1\n.TH \"MOLD\" \"1\" \"December 2025\" \"\"\n.SH"
},
{
"path": "docs/mold.md",
"chars": 41725,
"preview": "mold(1) -- a modern linker\n==========================\n\n## SYNOPSIS\n\n`mold` [_option_...] _file_...\n\n## DESCRIPTION\n`mold"
},
{
"path": "install-build-deps.sh",
"chars": 1431,
"preview": "#!/bin/sh\n# This script installs binary packages needed to build mold.\n# Feel free to send me a PR if your OS is not on "
},
{
"path": "install-cross-tools.sh",
"chars": 522,
"preview": "#!/bin/bash\nset -e\n. /etc/os-release\n\nset -x\n\n# This script install packages for -DMOLD_ENABLE_QEMU_TESTS=1\n# to enable "
},
{
"path": "lib/aho-corasick.cc",
"chars": 3114,
"preview": "// This file implements the Aho-Corasick algorithm to search multiple\n// strings within an input string simultaneously. "
},
{
"path": "lib/atomics.h",
"chars": 1596,
"preview": "// This is the same as std::atomic except that the default memory\n// order is relaxed instead of sequential consistency."
},
{
"path": "lib/bitvector.h",
"chars": 1440,
"preview": "#pragma once\n\n#include \"integers.h\"\n\n#include <cassert>\n#include <vector>\n\nnamespace mold {\n\nclass BitvectorProxy {\npubl"
},
{
"path": "lib/compress.cc",
"chars": 5733,
"preview": "// This file implements a multi-threaded zlib and zstd compression\n// routine.\n//\n// zlib-compressed data can be merged "
},
{
"path": "lib/config.h.in",
"chars": 952,
"preview": "#define MOLD_VERSION \"@mold_VERSION@\"\n#define MOLD_LIBDIR \"@CMAKE_INSTALL_FULL_LIBDIR@\"\n#define MOLD_FIRST_TARGET @MOLD_"
},
{
"path": "lib/crc32.cc",
"chars": 1436,
"preview": "#include \"lib.h\"\n\n#include <tbb/parallel_for_each.h>\n#include <zlib.h>\n\nnamespace mold {\n\n// This function \"forges\" a CR"
},
{
"path": "lib/demangle.cc",
"chars": 904,
"preview": "#include \"lib.h\"\n\n#include <cstdlib>\n\n#ifndef _WIN32\n#include <cxxabi.h>\n#endif\n\n#include \"../third-party/rust-demangle/"
},
{
"path": "lib/filepath.cc",
"chars": 862,
"preview": "#include \"lib.h\"\n\n#include <filesystem>\n#include <sys/stat.h>\n\n#ifdef __APPLE__\n# include <mach-o/dyld.h>\n#endif\n\n#ifdef"
},
{
"path": "lib/gentoo-test.sh",
"chars": 2545,
"preview": "#!/bin/bash\n#\n# This test script takes a Gentoo package name and tries to build it\n# using mold in a Podman environment."
},
{
"path": "lib/glob.cc",
"chars": 7529,
"preview": "// This file implements a glob matcher that can run multiple glob patterns\n// against an input string. mold uses the glo"
},
{
"path": "lib/hyperloglog.cc",
"chars": 450,
"preview": "// This file implements HyperLogLog algorithm, which estimates\n// the number of unique items in a given multiset.\n//\n// "
},
{
"path": "lib/integers.h",
"chars": 3879,
"preview": "// This file defines integral types for file input/output. We need to use\n// these types instead of the plain integers ("
},
{
"path": "lib/lib.h",
"chars": 16095,
"preview": "#pragma once\n\n#include \"atomics.h\"\n#include \"integers.h\"\n#include \"bitvector.h\"\n\n#include <array>\n#include <atomic>\n#inc"
},
{
"path": "lib/perf.cc",
"chars": 2808,
"preview": "#include \"lib.h\"\n\n#include <functional>\n#include <iomanip>\n#include <ios>\n#include <tbb/concurrent_vector.h>\n\n#ifndef _W"
},
{
"path": "lib/random.cc",
"chars": 307,
"preview": "#include \"lib.h\"\n\n#include <random>\n\nnamespace mold {\n\nvoid get_random_bytes(u8 *buf, i64 size) {\n std::random_device r"
},
{
"path": "lib/siphash.h",
"chars": 3246,
"preview": "// This is a header-only C++20 implementation of SipHash based on the\n// reference implementation. To use, just copy thi"
},
{
"path": "lib/tar.cc",
"chars": 3131,
"preview": "// This file contains functions to create a tar file.\n\n#include \"lib.h\"\n\n#ifdef _WIN32\n# define ftruncate _chsize_s\n#end"
},
{
"path": "lib/update-git-hash.cmake",
"chars": 1063,
"preview": "# Get a git hash value. We do not want to use git command here\n# because we don't want to make git a build-time dependen"
},
{
"path": "src/arch-arm32.cc",
"chars": 29310,
"preview": "// ARM32 is a bit special from the linker's viewpoint because ARM\n// processors support two different instruction encodi"
},
{
"path": "src/arch-arm64.cc",
"chars": 21171,
"preview": "// This file contains ARM64-specific code. Being new, the ARM64's ELF\n// psABI doesn't have anything peculiar. ARM64 is "
},
{
"path": "src/arch-i386.cc",
"chars": 17161,
"preview": "// i386 is similar to x86-64 but lacks PC-relative memory access\n// instructions. So it's not straightforward to support"
},
{
"path": "src/arch-loongarch.cc",
"chars": 32508,
"preview": "// LoongArch is a new RISC ISA announced in 2021 by Loongson. The ISA\n// feels like a modernized MIPS with a hint of RIS"
},
{
"path": "src/arch-m68k.cc",
"chars": 8390,
"preview": "// This file contains code for the Motorola 68000 series microprocessors,\n// which is often abbreviated as m68k. Running"
},
{
"path": "src/arch-ppc32.cc",
"chars": 13263,
"preview": "// This file implements the PowerPC 32-bit ISA. For 64-bit PowerPC, see\n// arch-ppc64v1.cpp and arch-ppc64v2.cpp.\n//\n// "
},
{
"path": "src/arch-ppc64v1.cc",
"chars": 22031,
"preview": "// This file contains code for the 64-bit PowerPC ELFv1 ABI that is\n// commonly used for big-endian PPC systems. Modern "
},
{
"path": "src/arch-ppc64v2.cc",
"chars": 23289,
"preview": "// This file implements the PowerPC ELFv2 ABI which was standardized in\n// 2014. Modern little-endian PowerPC systems ar"
},
{
"path": "src/arch-riscv.cc",
"chars": 38293,
"preview": "// RISC-V is a clean RISC ISA. It supports PC-relative load/store for\n// position-independent code. Its 32-bit and 64-bi"
},
{
"path": "src/arch-s390x.cc",
"chars": 15136,
"preview": "// This file contains code for the IBM z/Architecture 64-bit ISA, which is\n// commonly referred to as \"s390x\" on Linux.\n"
},
{
"path": "src/arch-sh4.cc",
"chars": 11338,
"preview": "// SH-4 (SuperH 4) is a 32-bit RISC ISA developed by Hitachi in the early\n// '90s. Some relatively powerful systems were"
},
{
"path": "src/arch-sparc64.cc",
"chars": 20267,
"preview": "// SPARC is a RISC ISA developed by Sun Microsystems.\n//\n// The byte order of the processor is big-endian. Anything larg"
},
{
"path": "src/arch-x86-64.cc",
"chars": 35840,
"preview": "// Supporting x86-64 is straightforward. Unlike its predecessor, i386,\n// x86-64 supports PC-relative addressing for pos"
},
{
"path": "src/archive-file.cc",
"chars": 5231,
"preview": "// This file contains functions to read an archive file (.a file).\n// An archive file is just a bundle of object files. "
},
{
"path": "src/cmdline.cc",
"chars": 66826,
"preview": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <filesystem>\n#include <random>\n#include <regex>\n#include <sstream>\n#incl"
},
{
"path": "src/elf.cc",
"chars": 27176,
"preview": "#include \"elf.h\"\n#include <sstream>\n\nnamespace mold {\n\nstatic std::string unknown_type(u32 r_type) {\n std::stringstream"
},
{
"path": "src/elf.h",
"chars": 60932,
"preview": "#pragma once\n\n#include \"../lib/integers.h\"\n\n#include <concepts>\n#include <ostream>\n#include <string>\n#include <type_trai"
},
{
"path": "src/entry.cc",
"chars": 867,
"preview": "#include \"config.h\"\n#include \"mold.h\"\n#include \"mold-git-hash.h\"\n\n#if MOLD_USE_MIMALLOC\n# include <mimalloc.h>\n#endif\n\n#"
},
{
"path": "src/error.cc",
"chars": 1387,
"preview": "#include \"mold.h\"\n\nnamespace mold {\n\nstatic std::string_view fatal_mono = \"mold: fatal: \";\nstatic std::string_view fatal"
},
{
"path": "src/filetype.cc",
"chars": 6181,
"preview": "#include \"mold.h\"\n\nnamespace mold {\n\nstatic bool is_text_file(MappedFile *mf) {\n auto istext = [](char c) {\n return "
},
{
"path": "src/gc-sections.cc",
"chars": 5978,
"preview": "// This file implements a mark-sweep garbage collector for -gc-sections.\n// In this algorithm, vertices are sections and"
},
{
"path": "src/gdb-index.cc",
"chars": 22876,
"preview": "// This file contains code to read DWARF debug info to create .gdb_index.\n//\n// .gdb_index is an optional section to spe"
},
{
"path": "src/icf.cc",
"chars": 20679,
"preview": "// This file implements the Identical Code Folding feature which can\n// reduce the output file size of a typical program"
},
{
"path": "src/input-files.cc",
"chars": 54201,
"preview": "#include \"mold.h\"\n\n#include <bit>\n#include <cstring>\n#include <tbb/parallel_sort.h>\n\n#ifndef _WIN32\n# include <unistd.h>"
},
{
"path": "src/input-sections.cc",
"chars": 15118,
"preview": "#include \"mold.h\"\n\n#include <zlib.h>\n#include <zstd.h>\n\nnamespace mold {\n\nstatic i64 to_p2align(u64 alignment) {\n if (a"
},
{
"path": "src/jobs-unix.cc",
"chars": 1289,
"preview": "// Many build systems attempt to invoke as many linker processes as there\n// are cores, based on the assumption that the"
},
{
"path": "src/jobs-win32.cc",
"chars": 99,
"preview": "namespace mold {\n\nvoid acquire_global_lock() {}\nvoid release_global_lock() {}\n\n} // namespace mold\n"
},
{
"path": "src/linker-script.cc",
"chars": 11855,
"preview": "// On Linux, /usr/lib/x86_64-linux-gnu/libc.so is not actually\n// a shared object file but an ASCII text file containing"
},
{
"path": "src/lto-unix.cc",
"chars": 23937,
"preview": "// This file handles the linker plugin to support LTO (Link-Time\n// Optimization).\n//\n// LTO is a technique to do whole-"
},
{
"path": "src/lto-win32.cc",
"chars": 580,
"preview": "#include \"mold.h\"\n#include \"lto.h\"\n\nnamespace mold {\n\ntemplate <typename E>\nObjectFile<E> *read_lto_object(Context<E> &c"
},
{
"path": "src/lto.h",
"chars": 2979,
"preview": "#pragma once\n\n#include \"../lib/integers.h\"\n\nnamespace mold {\n\nenum PluginStatus {\n LDPS_OK,\n LDPS_NO_SYMS,\n LDPS_BAD_"
},
{
"path": "src/main.cc",
"chars": 20354,
"preview": "#include \"mold.h\"\n#include \"config.h\"\n\n#include <cstring>\n#include <functional>\n#include <sys/stat.h>\n#include <sys/type"
},
{
"path": "src/mapfile.cc",
"chars": 2960,
"preview": "#include \"mold.h\"\n\n#include <fstream>\n#include <iomanip>\n#include <ios>\n#include <sstream>\n#include <tbb/concurrent_hash"
},
{
"path": "src/mapped-file-unix.cc",
"chars": 1069,
"preview": "#include \"mold.h\"\n\nnamespace mold {\n\nMappedFile *open_file_impl(const std::string &path, std::string &error) {\n i64 fd "
},
{
"path": "src/mapped-file-win32.cc",
"chars": 1990,
"preview": "#include \"mold.h\"\n\nnamespace mold {\n\nMappedFile *open_file_impl(const std::string &path, std::string &error) {\n HANDLE "
},
{
"path": "src/mold-wrapper.c",
"chars": 3638,
"preview": "#define _GNU_SOURCE 1\n\n#include <dlfcn.h>\n#include <spawn.h>\n#include <stdarg.h>\n#include <stdbool.h>\n#include <stdio.h>"
},
{
"path": "src/mold.h",
"chars": 110103,
"preview": "#pragma once\n\n#include \"../lib/lib.h\"\n#include \"elf.h\"\n\n#include <cassert>\n#include <cstdint>\n#include <functional>\n#inc"
},
{
"path": "src/output-chunks.cc",
"chars": 96179,
"preview": "#include \"mold.h\"\n\n#include <cctype>\n#include <set>\n#include <shared_mutex>\n#include <span>\n#include <tbb/parallel_for_e"
},
{
"path": "src/output-file-unix.cc",
"chars": 6147,
"preview": "#include \"mold.h\"\n\n#include <fcntl.h>\n#include <filesystem>\n#include <sys/file.h>\n#include <sys/mman.h>\n#include <system"
},
{
"path": "src/output-file-win32.cc",
"chars": 3538,
"preview": "#include \"mold.h\"\n\n#include <fcntl.h>\n#include <windows.h>\n\nnamespace mold {\n\ntemplate <typename E>\nclass MemoryMappedOu"
},
{
"path": "src/passes.cc",
"chars": 121556,
"preview": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <blake3.h>\n#include <fstream>\n#include <functional>\n#include <optional>\n"
},
{
"path": "src/relocatable.cc",
"chars": 6014,
"preview": "// This file implements -r or --relocatable. That option forces the linker\n// to combine input object files into another"
},
{
"path": "src/shrink-sections.cc",
"chars": 5902,
"preview": "// Since RISC instructions are generally up to 32 bits long, there's no\n// way to embed very large immediates into their"
},
{
"path": "src/signal-unix.cc",
"chars": 2337,
"preview": "#include \"mold.h\"\n\n#include <csignal>\n#include <tbb/version.h>\n\n#ifdef __FreeBSD__\n# include <sys/sysctl.h>\n# include <u"
},
{
"path": "src/signal-win32.cc",
"chars": 1399,
"preview": "#include \"mold.h\"\n\n#include <windows.h>\n\nnamespace mold {\n\nvoid cleanup() {\n if (output_tmpfile)\n _unlink(output_tmp"
},
{
"path": "src/subprocess-unix.cc",
"chars": 3264,
"preview": "#include \"config.h\"\n#include \"mold.h\"\n\n#include <csignal>\n#include <filesystem>\n#include <sys/stat.h>\n#include <sys/time"
},
{
"path": "src/subprocess-win32.cc",
"chars": 462,
"preview": "#include \"mold.h\"\n\nnamespace mold {\n\ntemplate <typename E>\nvoid fork_child() {}\n\ntemplate <typename E>\nvoid notify_paren"
},
{
"path": "src/thunks.cc",
"chars": 12169,
"preview": "// RISC instructions are usually up to 4 bytes long, so the immediates of\n// their branch instructions are naturally sma"
},
{
"path": "src/tls.cc",
"chars": 10750,
"preview": "// This file contains helper functions for thread-local storage (TLS).\n// TLS is probably the most obscure feature the l"
},
{
"path": "test/CMakeLists.txt",
"chars": 5621,
"preview": "option(MOLD_ENABLE_QEMU_TESTS \"Enable tests on non-native targets\" ON)\nset(MACHINE ${CMAKE_HOST_SYSTEM_PROCESSOR})\n\nif(E"
},
{
"path": "test/abs-error.sh",
"chars": 483,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ $MACHINE = aarch64 ] && skip\n[ $MACHINE = ppc64 ] && skip\n[ $MACHINE = ppc64le"
},
{
"path": "test/absolute-symbols.sh",
"chars": 842,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# This test crashes only on qemu-sparc64 running on GitHub Actions,\n# even thoug"
},
{
"path": "test/allow-multiple-definition.sh",
"chars": 314,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho 'int main() { return 0; }' | $CC -c -o $t/a.o -xc -\necho 'int main() { retu"
},
{
"path": "test/ar-alignment.sh",
"chars": 410,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint two() { return 2; }\nEOF\n\nhead -c 1 /dev/z"
},
{
"path": "test/arch-aarch64-long-thunk.sh",
"chars": 1281,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nvoid fn3();\nvoid fn4();\n\n__attribute__((s"
},
{
"path": "test/arch-aarch64-range-extension-thunk-disassembly.sh",
"chars": 419,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n\nvoid fn1();\nvoid fn"
},
{
"path": "test/arch-aarch64-variant-pcs.sh",
"chars": 440,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xassembler - 2> /dev/null || skip\n.global fo"
},
{
"path": "test/arch-arm-abs-error.sh",
"chars": 406,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -c -o $t/a.o -xassembler - -mthumb\n.globl foo\nfoo = 3;\nEOF"
},
{
"path": "test/arch-arm-exidx-sentinel.sh",
"chars": 270,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CXX -o $t/a.o -c -xc++ - -fno-PIC\n#include <stdio.h>\nextern char _e"
},
{
"path": "test/arch-arm-range-extension-thunk-disassembly.sh",
"chars": 492,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n#include <stdio.h>\n\nvoid fn1();\nvoid fn"
},
{
"path": "test/arch-arm-range-extension-thunk.sh",
"chars": 985,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -mthumb || skip\n\ncat <<EOF > $t/a.c\n#include <stdio.h>\n\nvoid fn3();\n"
},
{
"path": "test/arch-arm-target1.sh",
"chars": 347,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -xassembler -\n.globl foo\n.data\nfoo:\n.word bar(TARGE"
},
{
"path": "test/arch-arm-thm-jump19.sh",
"chars": 434,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.syntax unified\n.globl bar\n.thumb\nbar"
},
{
"path": "test/arch-arm-thm-jump8.sh",
"chars": 434,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.syntax unified\n.globl bar\n.thumb\nbar"
},
{
"path": "test/arch-arm-thumb-interwork.sh",
"chars": 409,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -mthumb || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mthumb\n#include"
},
{
"path": "test/arch-arm-tlsdesc.sh",
"chars": 1533,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nis_musl && skip\ntest_cflags -mthumb || skip\n\ncat <<EOF > $t/a.c\nextern _Thread_l"
},
{
"path": "test/arch-armeb-be32.sh",
"chars": 162,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\nnot $CC -B. -o $t/exe $t/a"
},
{
"path": "test/arch-i686-tls-module-base.sh",
"chars": 968,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -fPIC -o $t/a.o -c -xassembler -\n.globl get_foo\n.type get_foo,"
},
{
"path": "test/arch-i686-tlsdesc.sh",
"chars": 944,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<'EOF' | $GCC -c -o $t/a.o -xassembler -\n.globl "
},
{
"path": "test/arch-loongarch64-mcmodel-extreme.sh",
"chars": 235,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=extreme\n#include <stdio.h>\nchar msg["
},
{
"path": "test/arch-loongarch64-relax-call36.sh",
"chars": 1012,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xassembler -\n.globl foo, bar\n.space 0x100000\nfoo"
},
{
"path": "test/arch-loongarch64-relax-got-load.sh",
"chars": 930,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nint foo = 3;\nEOF\n\ncat <<EOF | $CC -o $t"
},
{
"path": "test/arch-loongarch64-relax-pcala-addi.sh",
"chars": 1210,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xassembler -\n.globl get_sym1, get_sym2, get_sym3"
},
{
"path": "test/arch-loongarch64-relax-tlsdesc.sh",
"chars": 1181,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xc - -fPIC\n_Thread_local char foo[4] = \"foo\";\n_T"
},
{
"path": "test/arch-ppc64le-save-restore-gprs.sh",
"chars": 209,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\n#include <stdio.h>\nint main() {\n printf(\"Hel"
},
{
"path": "test/arch-riscv64-attributes.sh",
"chars": 550,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -march=rv64imafd_xtheadba1p5 -o $t/a.o -c -xc -\nvoid foo() {}\nEO"
},
{
"path": "test/arch-riscv64-attributes2.sh",
"chars": 299,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n$STRIP --remove-section"
},
{
"path": "test/arch-riscv64-global-pointer-dso.sh",
"chars": 482,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl __global_pointer$\n__global_poi"
},
{
"path": "test/arch-riscv64-global-pointer.sh",
"chars": 542,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\n#include <stdio.h>\nint main() {\n print"
},
{
"path": "test/arch-riscv64-obj-compatible.sh",
"chars": 431,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nset -x\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid foo() {}\nEOF\n\n# Set `e_flags` to"
},
{
"path": "test/arch-riscv64-relax-align.sh",
"chars": 499,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl x1\n.text\n.p2align 5\nx1:\n ret\n"
},
{
"path": "test/arch-riscv64-relax-got.sh",
"chars": 1722,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_sym1, get_sym2, get_sym3, "
},
{
"path": "test/arch-riscv64-relax-hi20.sh",
"chars": 1615,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_foo, get_foo2, get_bar, ge"
},
{
"path": "test/arch-riscv64-relax-j.sh",
"chars": 598,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -O2 -march=rv64g\nvoid g() {}\nEOF\n\ncat <<EOF |"
},
{
"path": "test/arch-riscv64-reloc-overflow.sh",
"chars": 569,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.section .foo, \"ax\"\nfoo:\n call bar\n"
},
{
"path": "test/arch-riscv64-symbol-size.sh",
"chars": 817,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl get_foo, get_bar\n.type get_foo"
},
{
"path": "test/arch-riscv64-variant-cc.sh",
"chars": 435,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xassembler - 2> /dev/null || skip\n.global fo"
},
{
"path": "test/arch-riscv64-weak-undef.sh",
"chars": 338,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<EOF | $CC -c -o $t/a.o -xassembler -\n.globl f"
},
{
"path": "test/arch-s390x-got.sh",
"chars": 396,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GOT[0] must be set to the link-time address of .dynamic on s390x.\n\ncat <<EOF |"
},
{
"path": "test/arch-x86_64-address-equality.sh",
"chars": 541,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.globl foo\nfoo:\n lea bar(%rip), %rax"
},
{
"path": "test/arch-x86_64-apx-gotpcrelx.sh",
"chars": 943,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/nul"
},
{
"path": "test/arch-x86_64-apx-gottpoff.sh",
"chars": 699,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/nul"
},
{
"path": "test/arch-x86_64-apx-gottpoff2.sh",
"chars": 630,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# We use Intel SDE to run programs compiled for APX\ncommand -v sde64 >& /dev/nul"
},
{
"path": "test/arch-x86_64-apx-tlsdesc.sh",
"chars": 1133,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\n# We use Intel SDE to run programs compiled for APX\nco"
},
{
"path": "test/arch-x86_64-empty-arg.sh",
"chars": 131,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm -D mold | grep __msan_init && skip\n\nnot ./mold -m elf_x86_64 '' |& grep 'cann"
},
{
"path": "test/arch-x86_64-empty-mergeable-section.sh",
"chars": 502,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.section .rodata.str1.1, \"aMS\", @prog"
},
{
"path": "test/arch-x86_64-emulation-deduction.sh",
"chars": 167,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid _start() {}\nEOF\n\n./mold -o $t/exe $t/a.o"
},
{
"path": "test/arch-x86_64-exception-mcmodel-large.sh",
"chars": 330,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CXX -c -o $t/a.o -xc++ -fPIC -\nint main() {\n try {\n throw 0;\n "
},
{
"path": "test/arch-x86_64-execstack-if-needed.sh",
"chars": 353,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -xassembler -o $t/a.o -\n.globl main\nmain:\n ret\n.section .not"
},
{
"path": "test/arch-x86_64-function-multiversion.sh",
"chars": 561,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $GXX -o $t/"
},
{
"path": "test/arch-x86_64-gnu-linkonce.sh",
"chars": 608,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n.globl __x86.get_pc_thunk.bx\n.sectio"
},
{
"path": "test/arch-x86_64-gnu-retain.sh",
"chars": 536,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho '.section foo,\"R\"' | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip"
},
{
"path": "test/arch-x86_64-gotpcrelx.sh",
"chars": 373,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fPIC\nchar foo[4000L * 1000 * 1000];\nchar bar"
},
{
"path": "test/arch-x86_64-ifunc-alias.sh",
"chars": 447,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\ntest_cflags -static || skip\n\ncat <<EOF | $CXX -march=x86-"
},
{
"path": "test/arch-x86_64-ifunc-export.sh",
"chars": 783,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_ifunc || skip\n\ncat <<EOF | $CXX -c -fPIC -o $t/a.o -xc++ -\n__attribute_"
},
{
"path": "test/arch-x86_64-incompatible-libs-linker-script.sh",
"chars": 599,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\nmkdir -p $t/foo\n\necho 'char hello[] = \"Hello world\";' "
},
{
"path": "test/arch-x86_64-incompatible-libs-linker-script2.sh",
"chars": 516,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nnm mold | grep '__tsan_init' && skip\ntest_cflags -m32 || skip\n\nmkdir -p $t/foo\n\n"
},
{
"path": "test/arch-x86_64-incompatible-libs.sh",
"chars": 905,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\ncat <<EOF | $CC -m32 -c -o $t/a.o -xc -\nchar hello[] ="
},
{
"path": "test/arch-x86_64-incompatible-libs2.sh",
"chars": 725,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\nnm mold | grep '__tsan_init' && skip\n\ncat <<EOF | $CC -"
},
{
"path": "test/arch-x86_64-incompatible-obj.sh",
"chars": 297,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -m32 || skip\n\ncat <<EOF | $CC -c -o $t/a.o -m64 -xc -\nint main() {}\n"
},
{
"path": "test/arch-x86_64-init-array-readonly.sh",
"chars": 685,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.section .init_array,\"aw\",@init_arra"
},
{
"path": "test/arch-x86_64-init-array.sh",
"chars": 678,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl init1, init2, fini1, fini2\n\n."
},
{
"path": "test/arch-x86_64-isa-level.sh",
"chars": 537,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe2 $t/a.o "
},
{
"path": "test/arch-x86_64-large-bss.sh",
"chars": 394,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -mcmodel=large\n#include <stdio.h>\nchar arr1[0"
},
{
"path": "test/arch-x86_64-mergeable-records.sh",
"chars": 827,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n .te"
},
{
"path": "test/arch-x86_64-mergeable-strings-nonalloc.sh",
"chars": 429,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\ncat <<'EOF' | $CC -o $t/"
},
{
"path": "test/arch-x86_64-mergeable-strings.sh",
"chars": 556,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n .te"
},
{
"path": "test/arch-x86_64-note-property.sh",
"chars": 453,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\ntest_cflag"
},
{
"path": "test/arch-x86_64-note-property2.sh",
"chars": 2483,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# OneTBB isn't tsan-clean\nnm mold | grep '__tsan_init' && skip\n\n# Binutils 2.32 "
},
{
"path": "test/arch-x86_64-note.sh",
"chars": 972,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -static || skip\n\n# Binutils 2.32 injects their own .note.gnu.propert"
},
{
"path": "test/arch-x86_64-note2.sh",
"chars": 723,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Binutils 2.32 injects their own .note.gnu.property section interfering with th"
},
{
"path": "test/arch-x86_64-plt.sh",
"chars": 420,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n .text\n .globl main\nmain:\n sub "
},
{
"path": "test/arch-x86_64-preinit-array.sh",
"chars": 648,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nis_musl && skip\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl preinit, ini"
},
{
"path": "test/arch-x86_64-relax.sh",
"chars": 3046,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if target is not x86-64\necho ret | cc -c -o /dev/null -xassembler -Wa,-mr"
},
{
"path": "test/arch-x86_64-reloc-overflow.sh",
"chars": 226,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n .globl foo\n .data\nfoo:\n .short f"
},
{
"path": "test/arch-x86_64-reloc-zero.sh",
"chars": 194,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\nfoo: jmp 0\nEOF\n\ncat <<EOF | $CC -o $"
},
{
"path": "test/arch-x86_64-reloc.sh",
"chars": 3331,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -fPIC -c -o $t/a.o -x assembler -\n.data\n.globl ext_var\n.type e"
},
{
"path": "test/arch-x86_64-section-alignment.sh",
"chars": 698,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -c -o $t/a.o -xc -\n#include <stdint.h>\n#include <stdio.h>\n\n__a"
},
{
"path": "test/arch-x86_64-section-name.sh",
"chars": 1766,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<'EOF' | $CC -o $t/a.o -c -x assembler -\n.globl _start\n.text\n_start:\n ret\n"
},
{
"path": "test/arch-x86_64-tbss-only.sh",
"chars": 381,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Test if grep supports backreferences\necho abab | grep -E '(ab)\\1' || skip\n\ncat"
},
{
"path": "test/arch-x86_64-tls-gd-mcmodel-large.sh",
"chars": 1039,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -mtls-dialect=gnu -fPIC -c -o $t/a.o -xc - -mcmodel=large\n#incl"
},
{
"path": "test/arch-x86_64-tls-gd-to-ie.sh",
"chars": 942,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -fPIC -c -o $t/a.o -xc - -mcmodel=large\n#include <stdio.h>\n\n__a"
},
{
"path": "test/arch-x86_64-tls-large-tbss.sh",
"chars": 512,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.globl x, y\n.section .tbss,\"awT\",@no"
},
{
"path": "test/arch-x86_64-tls-ld-mcmodel-large.sh",
"chars": 679,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $GCC -ftls-model=local-dynamic -fPIC -c -o $t/a.o -xc - -mcmodel=lar"
},
{
"path": "test/arch-x86_64-tls-module-base.sh",
"chars": 845,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xassembler -\n.glob"
},
{
"path": "test/arch-x86_64-tlsdesc.sh",
"chars": 893,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\nsupports_tlsdesc || skip\n\ncat <<EOF | $GCC -c -o $t/a.o -xassembler -\n.globl ge"
},
{
"path": "test/arch-x86_64-unique.sh",
"chars": 527,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -x assembler -\n.section .data.foo.1,\"aw\",@progbits\n"
},
{
"path": "test/arch-x86_64-warn-execstack.sh",
"chars": 275,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xassembler -\n.section .note.GNU-stack, \"x\"\nEOF\n\nca"
},
{
"path": "test/arch-x86_64-warn-shared-textrel.sh",
"chars": 450,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assemb"
},
{
"path": "test/arch-x86_64-warn-textrel.sh",
"chars": 439,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assemb"
},
{
"path": "test/arch-x86_64-z-dynamic-undefined-weak.sh",
"chars": 337,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n[ \"$(uname)\" = FreeBSD ] && skip\n\ncat <<EOF | $CC -o $t/b.o -c -xc - -fno-PIE\n#i"
},
{
"path": "test/arch-x86_64-z-ibt.sh",
"chars": 337,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\n\ncat <<EOF"
},
{
"path": "test/arch-x86_64-z-ibtplt.sh",
"chars": 460,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n#include <stdio.h>\nvoid hello() { print"
},
{
"path": "test/arch-x86_64-z-rewrite-endbr.sh",
"chars": 693,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -ffuncti"
},
{
"path": "test/arch-x86_64-z-rewrite-endbr2.sh",
"chars": 699,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n\ncat <<EOF | $CC -o $t/a.o -c -xc - -fno-fun"
},
{
"path": "test/arch-x86_64-z-rewrite-endbr3.sh",
"chars": 399,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ntest_cflags -fcf-protection || skip\n[ \"$QEMU\" == '' ] || skip\n\n# Check if Intel "
},
{
"path": "test/arch-x86_64-z-shstk.sh",
"chars": 324,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\necho endbr64 | $CC -o /dev/null -c -xassembler - 2> /dev/null || skip\n\ncat <<EOF"
},
{
"path": "test/arch-x86_64-z-text.sh",
"chars": 538,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# Skip if libc is musl\nis_musl && skip\n\ncat <<'EOF' | $CC -c -o $t/a.o -x assemb"
},
{
"path": "test/as-needed-dso.sh",
"chars": 475,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/libfoo.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn"
},
{
"path": "test/as-needed-dso2.sh",
"chars": 640,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/libfoo.so -shared -fPIC -Wl,-soname,libfoo.so -xc -\nint fn"
},
{
"path": "test/as-needed-weak.sh",
"chars": 747,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -fPIC -o $t/a.o -c -xc -\n__attribute__((weak)) int fn1();\n\nint m"
},
{
"path": "test/as-needed.sh",
"chars": 686,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nvoid fn1();\nint main() {\n fn1();\n}\nEOF\n\ncat "
},
{
"path": "test/audit.sh",
"chars": 397,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -xc -\nint main() {}\nEOF\n\n$CC -B. -o $t/exe1 $t/a.o\n"
},
{
"path": "test/auxiliary.sh",
"chars": 445,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -o $t/a.o -c -x assembler -\n .text\n .globl _start\n_start:\n no"
},
{
"path": "test/bno-symbolic.sh",
"chars": 685,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\n# GCC produces buggy code for this test case on s390x.\n# https://sourceware.org/"
},
{
"path": "test/bsymbolic-functions.sh",
"chars": 492,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\nint foo = 4;\n\nint get_foo() { return fo"
},
{
"path": "test/bsymbolic-non-weak-functions.sh",
"chars": 883,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n__attribute__((weak)) int foo = 4;\nint "
},
{
"path": "test/bsymbolic-non-weak.sh",
"chars": 873,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -o $t/a.o -fPIC -xc -\n__attribute__((weak)) int foo = 4;\nint "
},
{
"path": "test/bsymbolic.sh",
"chars": 401,
"preview": "#!/bin/bash\n. $(dirname $0)/common.inc\n\ncat <<EOF | $CC -c -fPIC -o$t/a.o -xc -\nint foo = 4;\nint get_foo() { return foo;"
}
]
// ... and 2320 more files (download for full content)
About this extraction
This page contains the full source code of the rui314/mold GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2520 files (25.6 MB), approximately 4.5M tokens, and a symbol index with 9680 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.