├── third-party ├── zstd │ ├── build │ │ ├── LICENSE │ │ ├── cmake │ │ │ ├── lib │ │ │ │ └── .gitignore │ │ │ ├── zstdConfig.cmake │ │ │ ├── programs │ │ │ │ └── .gitignore │ │ │ ├── tests │ │ │ │ └── .gitignore │ │ │ ├── .gitignore │ │ │ └── CMakeModules │ │ │ │ └── GetZstdLibraryVersion.cmake │ │ ├── single_file_libs │ │ │ ├── .gitignore │ │ │ ├── examples │ │ │ │ └── testcard.png │ │ │ ├── create_single_file_library.sh │ │ │ └── create_single_file_decoder.sh │ │ ├── VS_scripts │ │ │ ├── build.VS2012.cmd │ │ │ ├── build.VS2010.cmd │ │ │ ├── build.VS2013.cmd │ │ │ ├── build.VS2015.cmd │ │ │ ├── build.VS2017.cmd │ │ │ ├── build.VS2017Community.cmd │ │ │ ├── build.VS2017Enterprise.cmd │ │ │ └── build.VS2017Professional.cmd │ │ ├── VS2010 │ │ │ └── CompileAsCpp.props │ │ └── .gitignore │ ├── programs │ │ ├── zstdless │ │ ├── windres │ │ │ ├── zstd32.res │ │ │ └── zstd64.res │ │ ├── zstdless.1.md │ │ ├── zstdless.1 │ │ └── .gitignore │ ├── .buckversion │ ├── contrib │ │ ├── diagnose_corruption │ │ │ └── .gitignore │ │ ├── pzstd │ │ │ ├── .gitignore │ │ │ └── images │ │ │ │ ├── Cspeed.png │ │ │ │ └── Dspeed.png │ │ ├── seekable_format │ │ │ ├── tests │ │ │ │ └── .gitignore │ │ │ └── examples │ │ │ │ └── .gitignore │ │ ├── largeNbDicts │ │ │ └── .gitignore │ │ ├── gen_html │ │ │ └── .gitignore │ │ ├── linux-kernel │ │ │ ├── .gitignore │ │ │ └── test │ │ │ │ └── include │ │ │ │ └── linux │ │ │ │ ├── errno.h │ │ │ │ ├── limits.h │ │ │ │ ├── stddef.h │ │ │ │ ├── printk.h │ │ │ │ └── types.h │ │ ├── cleanTabs │ │ ├── VS2005 │ │ │ └── README.md │ │ ├── premake │ │ │ └── premake4.lua │ │ └── docker │ │ │ └── README.md │ ├── doc │ │ ├── educational_decoder │ │ │ └── .gitignore │ │ └── images │ │ │ ├── CSpeed2.png │ │ │ ├── DCspeed5.png │ │ │ ├── DSpeed3.png │ │ │ ├── dict-cr.png │ │ │ ├── dict-cs.png │ │ │ ├── dict-ds.png │ │ │ ├── cdict_v136.png │ │ │ ├── zstd_logo86.png │ │ │ └── zstd_cdict_v1_3_5.png │ ├── lib │ │ ├── .gitignore │ │ └── libzstd.pc.in │ ├── tests │ │ ├── regression │ │ │ └── .gitignore │ │ ├── gzip │ │ │ ├── hufts-segv.gz │ │ │ └── init.cfg │ │ ├── dict-files │ │ │ └── zero-weight-dict │ │ ├── golden-compression │ │ │ └── huffman-compressed-larger │ │ └── golden-dictionaries │ │ │ └── http-dict-missing-symbols │ ├── CODE_OF_CONDUCT.md │ ├── examples │ │ └── .gitignore │ ├── .cirrus.yml │ ├── zlibWrapper │ │ ├── .gitignore │ │ └── BUCK │ ├── .circleci │ │ └── images │ │ │ └── primary │ │ │ └── Dockerfile │ ├── .buckconfig │ └── .gitattributes ├── tbb │ ├── .bazelversion │ ├── examples │ │ ├── common │ │ │ └── gui │ │ │ │ └── xcode │ │ │ │ └── tbbExample │ │ │ │ ├── PkgInfo │ │ │ │ └── en.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── MainMenu.nib │ │ ├── task_arena │ │ │ ├── fractal │ │ │ │ └── gui │ │ │ │ │ ├── gui.ico │ │ │ │ │ └── small.ico │ │ │ └── README.md │ │ ├── parallel_for │ │ │ ├── tachyon │ │ │ │ └── gui │ │ │ │ │ ├── gui.ico │ │ │ │ │ └── small.ico │ │ │ ├── seismic │ │ │ │ └── gui │ │ │ │ │ ├── small.ico │ │ │ │ │ └── SeismicSimulation.ico │ │ │ ├── polygon_overlay │ │ │ │ └── speedup.gif │ │ │ └── README.md │ │ ├── task_group │ │ │ ├── README.md │ │ │ └── sudoku │ │ │ │ ├── input2 │ │ │ │ ├── input1 │ │ │ │ ├── input3 │ │ │ │ └── input4 │ │ ├── test_all │ │ │ └── README.md │ │ ├── parallel_for_each │ │ │ └── README.md │ │ ├── parallel_pipeline │ │ │ └── README.md │ │ ├── concurrent_hash_map │ │ │ └── README.md │ │ ├── parallel_reduce │ │ │ └── README.md │ │ ├── concurrent_priority_queue │ │ │ └── README.md │ │ └── getting_started │ │ │ └── README.md │ ├── cmake │ │ └── suppressions │ │ │ ├── lsan.suppressions │ │ │ └── tsan.suppressions │ ├── doc │ │ ├── _static │ │ │ ├── favicons.png │ │ │ ├── oneAPI-rgb-rev-100.png │ │ │ └── theme_overrides.css │ │ ├── GSG │ │ │ ├── _static │ │ │ │ ├── favicons.png │ │ │ │ ├── oneAPI-rgb-rev-100.png │ │ │ │ └── theme_overrides.css │ │ │ ├── Images │ │ │ │ └── how-oneTBB-works.png │ │ │ ├── system_requirements.rst │ │ │ ├── installation.rst │ │ │ └── get_started.rst │ │ ├── main │ │ │ ├── _static │ │ │ │ ├── favicons.png │ │ │ │ ├── oneAPI-rgb-rev-100.png │ │ │ │ └── theme_overrides.css │ │ │ ├── intro │ │ │ │ ├── Resources │ │ │ │ │ └── TBB-128x128.gif │ │ │ │ └── help_support.rst │ │ │ ├── tbb_userguide │ │ │ │ ├── Images │ │ │ │ │ ├── image002.jpg │ │ │ │ │ ├── image004.jpg │ │ │ │ │ ├── image006.jpg │ │ │ │ │ ├── image007.jpg │ │ │ │ │ ├── image008.jpg │ │ │ │ │ ├── image009.jpg │ │ │ │ │ ├── image010.jpg │ │ │ │ │ ├── image011.jpg │ │ │ │ │ ├── image012.jpg │ │ │ │ │ ├── image013.jpg │ │ │ │ │ ├── flow_graph.jpg │ │ │ │ │ ├── dependence_graph.jpg │ │ │ │ │ ├── flow_graph_complex.jpg │ │ │ │ │ ├── execution_timeline2node.jpg │ │ │ │ │ ├── flow_graph_reserve_buffers_1.png │ │ │ │ │ ├── flow_graph_reserve_buffers_2.png │ │ │ │ │ ├── flow_graph_reserve_buffers_3.png │ │ │ │ │ ├── flow_graph_reserve_buffers_4.png │ │ │ │ │ ├── flow_graph_reserve_buffers_5.png │ │ │ │ │ ├── flow_graph_reserve_buffers_6.png │ │ │ │ │ ├── flow_graph_reserve_buffers_7.png │ │ │ │ │ ├── execution_timeline_dependence.jpg │ │ │ │ │ └── flow_graph_message_passing_protocol.jpg │ │ │ │ ├── design_patterns │ │ │ │ │ └── Images │ │ │ │ │ │ ├── image002a.jpg │ │ │ │ │ │ ├── image003a.jpg │ │ │ │ │ │ ├── image004a.jpg │ │ │ │ │ │ ├── image005a.jpg │ │ │ │ │ │ ├── image006a.jpg │ │ │ │ │ │ ├── image007a.jpg │ │ │ │ │ │ ├── image008a.jpg │ │ │ │ │ │ └── image009a.jpg │ │ │ │ ├── Flow_Graph_nested_parallelism_tips.rst │ │ │ │ ├── parallel_for_toctree.rst │ │ │ │ ├── Summary_of_Containers.rst │ │ │ │ ├── Parallelizing_Simple_Loops_toctree.rst │ │ │ │ ├── Flow_Graph_waiting_tips.rst │ │ │ │ ├── Flow_Graph_making_edges_tips.rst │ │ │ │ ├── Flow_Graph_Tips.rst │ │ │ │ ├── Flow_Graph.rst │ │ │ │ ├── Package_Contents.rst │ │ │ │ └── Basic_Flow_Graph_concepts.rst │ │ │ └── reference │ │ │ │ └── Resources │ │ │ │ ├── make_edges_usage.png │ │ │ │ ├── make_edges_example.png │ │ │ │ └── fg_api_graph_structure.png │ │ └── index │ │ │ ├── useful_topics.rst │ │ │ └── index_intro.rst │ └── third-party-programs.txt ├── rust-demangle │ ├── .gitignore │ ├── Cargo.toml │ ├── .clang-format │ ├── test-harness │ │ ├── Cargo.toml │ │ └── build.rs │ └── rust-demangle.h ├── zlib │ ├── contrib │ │ ├── blast │ │ │ ├── test.txt │ │ │ ├── README │ │ │ ├── test.pk │ │ │ └── Makefile │ │ ├── infback9 │ │ │ └── README │ │ ├── puff │ │ │ └── zeros.raw │ │ ├── dotzlib │ │ │ ├── DotZLib.chm │ │ │ └── DotZLib │ │ │ │ ├── CodecBase.cs │ │ │ │ ├── Deflater.cs │ │ │ │ ├── DotZLib.cs │ │ │ │ ├── Inflater.cs │ │ │ │ ├── GZipStream.cs │ │ │ │ ├── ChecksumImpl.cs │ │ │ │ └── CircularBuffer.cs │ │ ├── minizip │ │ │ ├── MiniZip64_Changes.txt │ │ │ └── minizip.pc.in │ │ ├── delphi │ │ │ └── ZLibConst.pas │ │ ├── testzlib │ │ │ └── testzlib.txt │ │ └── untgz │ │ │ ├── Makefile │ │ │ └── Makefile.msc │ ├── zlib.3.pdf │ ├── doc │ │ └── crc-doc.1.0.pdf │ ├── Makefile │ ├── old │ │ └── README │ ├── win32 │ │ └── VisualC.txt │ ├── nintendods │ │ └── README │ ├── zlib.pc.in │ ├── zlib.pc.cmakein │ └── inffast.h ├── xxhash │ ├── tests │ │ ├── bench │ │ │ ├── .clang_complete │ │ │ └── .gitignore │ │ └── collisions │ │ │ ├── .gitignore │ │ │ └── allcodecs │ │ │ └── README.md │ ├── cmake_unofficial │ │ ├── xxHashConfig.cmake.in │ │ └── .gitignore │ ├── .gitattributes │ ├── cli │ │ └── README.md │ ├── doc │ │ └── README.md │ └── libxxhash.pc.in └── mimalloc │ ├── bin │ ├── minject.exe │ ├── minject32.exe │ ├── mimalloc-redirect.dll │ ├── mimalloc-redirect.lib │ ├── mimalloc-redirect32.dll │ └── mimalloc-redirect32.lib │ ├── doc │ ├── ds-logo.jpg │ ├── ds-logo.png │ ├── spades-logo.png │ ├── mimalloc-logo.png │ └── mimalloc-logo-100.png │ ├── .gitignore │ ├── .gitattributes │ └── mimalloc.pc.in ├── docs ├── htop.gif ├── comparison.png ├── cyboze-logo.png └── mercury-logo.png ├── test ├── elf │ ├── help.sh │ ├── empty-input.sh │ ├── icf-small.sh │ ├── missing-but-ok.sh │ ├── gdb-index-empty.sh │ ├── z-unknown.sh │ ├── defsym2.sh │ ├── gnu-hash.sh │ ├── verbose.sh │ ├── symtab-dso.sh │ ├── z-start-stop-visibility.sh │ ├── comment.sh │ ├── linker-script3.sh │ ├── start-stop.sh │ ├── hello-dynamic.sh │ ├── z-now.sh │ ├── trace.sh │ ├── duplicate-error.sh │ ├── symtab-section-symbols.sh │ ├── missing-error.sh │ ├── nostdlib.sh │ ├── x86_64_reloc-zero.sh │ ├── z-nodefaultlib.sh │ ├── no-quick-exit.sh │ ├── x86_64_emulation-deduction.sh │ ├── hello-static.sh │ ├── invalid-version-script.sh │ ├── large-max-page-size.sh │ ├── x86_64_large-bss.sh │ ├── initfirst.sh │ ├── interpose.sh │ ├── package-metadata.sh │ ├── stdout.sh │ ├── emit-relocs.sh │ ├── dependency-file.sh │ ├── linker-script2.sh │ ├── no-eh-frame-header.sh │ ├── empty-file.sh │ ├── z-nodump.sh │ ├── init-in-dso.sh │ ├── mold-wrapper2.sh │ ├── no-undefined-version.sh │ ├── omagic.sh │ ├── version-script16.sh │ ├── x86_64_reloc-overflow.sh │ ├── hidden-weak-undef.sh │ ├── print-dependencies.sh │ ├── x86_64_warn-execstack.sh │ ├── z-origin.sh │ ├── filter.sh │ ├── large-text.sh │ ├── auxiliary.sh │ ├── hidden-undef.sh │ ├── init.sh │ ├── allow-multiple-definition.sh │ ├── empty-version.sh │ ├── soname.sh │ ├── x86_64_z-shstk.sh │ ├── cmdline.sh │ ├── default-symver.sh │ ├── many-sections.sh │ ├── pie.sh │ ├── tls-le-error.sh │ ├── x86_64_z-ibt.sh │ ├── version-script9.sh │ ├── weak-export-exe.sh │ ├── lto-llvm.sh │ ├── response-file.sh │ ├── riscv64_weak-undef.sh │ ├── version-script7.sh │ ├── many-sections2.sh │ ├── thread-count.sh │ ├── bug178.sh │ ├── emit-relocs-cpp.sh │ ├── exclude-libs2.sh │ ├── linker-script4.sh │ ├── relax-got-load.sh │ ├── tls-common.sh │ ├── static-pie.sh │ ├── version-script.sh │ ├── dynamic-dt-debug.sh │ ├── warn-symbol-type.sh │ ├── func-addr.sh │ ├── reloc-rodata.sh │ ├── version-script13.sh │ ├── now.sh │ ├── oformat-binary.sh │ ├── version-script5.sh │ ├── weak-undef2.sh │ ├── dynamic-linker.sh │ ├── exclude-libs3.sh │ ├── fatal-warnings.sh │ ├── warn-once.sh │ ├── ifunc-alias.sh │ ├── start-lib.sh │ ├── tls-df-static-tls.sh │ ├── compressed-debug-info.sh │ ├── execstack.sh │ ├── hash-style.sh │ ├── relocatable.sh │ ├── x86_64_incompatible-obj.sh │ ├── compress-debug-sections.sh │ ├── version-script10.sh │ ├── defsym.sh │ ├── tls-large-static-image.sh │ ├── warn-common.sh │ ├── defsym-lto.sh │ ├── lto-dso.sh │ ├── noinhibit-exec.sh │ ├── relocatable-debug-info.sh │ ├── sysroot-linker-script.sh │ ├── x86_64_gotpcrelx.sh │ ├── version-script-search-paths.sh │ ├── version-script11.sh │ ├── weak-export-dso.sh │ ├── x86_64_execstack-if-needed.sh │ ├── s390x_got.sh │ ├── linker-script.sh │ ├── rpath.sh │ ├── bsymbolic.sh │ ├── gnu-unique.sh │ ├── push-pop-state.sh │ ├── large-max-page-size-strip.sh │ ├── version-script12.sh │ ├── warn-unresolved-symbols.sh │ ├── relocatable-no-ehframe.sh │ ├── retain-symbols-file.sh │ ├── disable-new-dtags.sh │ ├── dynamic.sh │ ├── ifunc-noplt.sh │ ├── ifunc-static.sh │ ├── section-align.sh │ ├── common.sh │ ├── debug-macro-section.sh │ ├── gnu-warning.sh │ ├── pltgot.sh │ ├── x86_64_exception-mcmodel-large.sh │ ├── export-dynamic.sh │ ├── export-from-exe.sh │ ├── linker-script-defsym.sh │ ├── ar-alignment.sh │ ├── ifunc-static-pie.sh │ ├── linker-script-relocatable.sh │ ├── x86_64_empty-mergeable-section.sh │ ├── copyrel-protected.sh │ ├── ifunc-export.sh │ ├── version-script4.sh │ ├── dso-undef.sh │ ├── riscv64_obj-compatible.sh │ ├── symbol-version2.sh │ ├── version-script15.sh │ ├── link-order.sh │ ├── color-diagnostics.sh │ ├── run-clang.sh │ ├── visibility.sh │ └── aarch64_range-extension-thunk-disassembly.sh └── macho │ ├── response-file.sh │ ├── basic.sh │ ├── reproducible.sh │ ├── headerpad-max-install-names.sh │ ├── lc-linker-option.sh │ ├── lc-build-version.sh │ ├── U.sh │ ├── Z.sh │ ├── install-name.sh │ ├── umbrella.sh │ ├── lto.sh │ ├── bundle.sh │ ├── llvm-section.sh │ ├── strip.sh │ ├── hello2.sh │ ├── indirect-symtab.sh │ ├── missing-error.sh │ ├── exception.sh │ ├── hello3.sh │ ├── dependency-info.sh │ ├── macos-version-min.sh │ ├── add-empty-section.sh │ ├── headerpad.sh │ ├── platform-version.sh │ ├── lto-dead-strip-dylibs.sh │ ├── add-ast-path.sh │ ├── baserel.sh │ ├── no-compact-unwind.sh │ ├── bss.sh │ ├── undefined.sh │ ├── private-symbols.sh │ ├── lib1.sh │ ├── pagezero-size3.sh │ ├── version.sh │ ├── object-path-lto.sh │ ├── stack-size.sh │ ├── rpath.sh │ ├── private-extern.sh │ ├── duplicate-error.sh │ ├── reproducibility.sh │ ├── literals.sh │ ├── no-function-starts.sh │ ├── pagezero-size2.sh │ ├── hello.sh │ ├── syslibroot.sh │ ├── eh-frame.sh │ ├── hello5.sh │ ├── weak-def-ref.sh │ ├── hello4.sh │ ├── objc-selector.sh │ ├── uuid2.sh │ ├── needed-l.sh │ ├── sectcreate.sh │ ├── x.sh │ ├── S.sh │ ├── universal.sh │ ├── filepath.sh │ ├── application-extension2.sh │ ├── all-load.sh │ ├── entry.sh │ ├── filepath2.sh │ ├── fixup-chains-unaligned-error.sh │ ├── framework.sh │ ├── undef.sh │ ├── cstring.sh │ ├── lazy-ptr-optimize.sh │ ├── tls.sh │ ├── data-in-code-info.sh │ ├── data-reloc.sh │ ├── bind-at-load.sh │ ├── fixup-chains-os-version.sh │ ├── fixup-chains.sh │ ├── weak-undef.sh │ ├── oso-prefix.sh │ ├── print-dependencies.sh │ ├── common-alignment.sh │ ├── objc.sh │ ├── tls2.sh │ ├── weak-def.sh │ ├── tls-dylib.sh │ ├── merge-scope.sh │ ├── force-load.sh │ ├── init-offsets-fixup-chains.sh │ ├── common.sh │ ├── w.sh │ ├── dylib.sh │ ├── dead-strip.sh │ ├── dlinfo.sh │ └── comdat.sh ├── elf └── lto.cc ├── macho ├── lto.cc └── lto-win32.cc ├── common ├── output-file.h ├── config.h.in ├── uuid.cc └── hyperloglog.cc ├── .gitignore ├── README.md └── .github ├── ISSUE_TEMPLATE └── bug_report.md └── workflows └── linux-packages.yml /third-party/zstd/build/LICENSE: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third-party/tbb/.bazelversion: -------------------------------------------------------------------------------- 1 | 5.0.0 2 | -------------------------------------------------------------------------------- /third-party/rust-demangle/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /third-party/xxhash/tests/bench/.clang_complete: -------------------------------------------------------------------------------- 1 | -I../.. 2 | -------------------------------------------------------------------------------- /third-party/tbb/examples/common/gui/xcode/tbbExample/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /third-party/zstd/programs/zstdless: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | zstdcat "$@" | less 3 | -------------------------------------------------------------------------------- /third-party/zstd/.buckversion: -------------------------------------------------------------------------------- 1 | c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b 2 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/diagnose_corruption/.gitignore: -------------------------------------------------------------------------------- 1 | check_flipped_bits 2 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/pzstd/.gitignore: -------------------------------------------------------------------------------- 1 | # compilation result 2 | pzstd 3 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/seekable_format/tests/.gitignore: -------------------------------------------------------------------------------- 1 | seekable_tests 2 | -------------------------------------------------------------------------------- /docs/htop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/docs/htop.gif -------------------------------------------------------------------------------- /third-party/xxhash/tests/collisions/.gitignore: -------------------------------------------------------------------------------- 1 | #build artefacts 2 | collisionsTest 3 | -------------------------------------------------------------------------------- /third-party/zstd/build/cmake/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # cmake build artefact 2 | libzstd.pc 3 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/largeNbDicts/.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | largeNbDicts 3 | -------------------------------------------------------------------------------- /third-party/zstd/doc/educational_decoder/.gitignore: -------------------------------------------------------------------------------- 1 | # Build artifacts 2 | harness 3 | -------------------------------------------------------------------------------- /third-party/zstd/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # make install artefact 2 | libzstd.pc 3 | libzstd-nomt 4 | -------------------------------------------------------------------------------- /docs/comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/docs/comparison.png -------------------------------------------------------------------------------- /docs/cyboze-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/docs/cyboze-logo.png -------------------------------------------------------------------------------- /third-party/zlib/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/gen_html/.gitignore: -------------------------------------------------------------------------------- 1 | # make artefact 2 | gen_html 3 | zstd_manual.html 4 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/.gitignore: -------------------------------------------------------------------------------- 1 | !lib/zstd 2 | !lib/zstd/* 3 | *.o 4 | *.a 5 | -------------------------------------------------------------------------------- /docs/mercury-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/docs/mercury-logo.png -------------------------------------------------------------------------------- /test/elf/help.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | ./mold --help | grep -q Usage 5 | -------------------------------------------------------------------------------- /third-party/zstd/tests/regression/.gitignore: -------------------------------------------------------------------------------- 1 | # regression test artifacts 2 | data-cache 3 | test 4 | -------------------------------------------------------------------------------- /elf/lto.cc: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | # include "lto-win32.cc" 3 | #else 4 | # include "lto-unix.cc" 5 | #endif 6 | -------------------------------------------------------------------------------- /macho/lto.cc: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | # include "lto-win32.cc" 3 | #else 4 | # include "lto-unix.cc" 5 | #endif 6 | -------------------------------------------------------------------------------- /third-party/zstd/build/cmake/zstdConfig.cmake: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/zstdTargets.cmake") 2 | -------------------------------------------------------------------------------- /third-party/xxhash/tests/collisions/allcodecs/README.md: -------------------------------------------------------------------------------- 1 | Put in this directory all hash algorithms to test 2 | -------------------------------------------------------------------------------- /third-party/zlib/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/zlib.3.pdf -------------------------------------------------------------------------------- /third-party/rust-demangle/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["test-harness"] 3 | default-members = ["test-harness"] 4 | -------------------------------------------------------------------------------- /third-party/zstd/build/cmake/programs/.gitignore: -------------------------------------------------------------------------------- 1 | # produced by make 2 | zstd 3 | zstd-frugal 4 | unzstd 5 | zstdcat 6 | -------------------------------------------------------------------------------- /common/output-file.h: -------------------------------------------------------------------------------- 1 | #if _WIN32 2 | # include "output-file-win32.h" 3 | #else 4 | # include "output-file-unix.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /third-party/tbb/cmake/suppressions/lsan.suppressions: -------------------------------------------------------------------------------- 1 | # LSAN suppression for ltdl library known issue. 2 | leak:libltdl.so 3 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /third-party/zstd/build/cmake/tests/.gitignore: -------------------------------------------------------------------------------- 1 | # produced by make 2 | datagen 3 | fullbench 4 | fuzzer 5 | paramgrill 6 | 7 | -------------------------------------------------------------------------------- /third-party/mimalloc/bin/minject.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/minject.exe -------------------------------------------------------------------------------- /third-party/mimalloc/bin/minject32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/minject32.exe -------------------------------------------------------------------------------- /third-party/mimalloc/doc/ds-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/doc/ds-logo.jpg -------------------------------------------------------------------------------- /third-party/mimalloc/doc/ds-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/doc/ds-logo.png -------------------------------------------------------------------------------- /third-party/tbb/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/blast/test.pk -------------------------------------------------------------------------------- /third-party/zlib/doc/crc-doc.1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/doc/crc-doc.1.0.pdf -------------------------------------------------------------------------------- /third-party/mimalloc/doc/spades-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/doc/spades-logo.png -------------------------------------------------------------------------------- /third-party/tbb/doc/_static/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/_static/favicons.png -------------------------------------------------------------------------------- /third-party/tbb/third-party-programs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/third-party-programs.txt -------------------------------------------------------------------------------- /third-party/zlib/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /third-party/zstd/doc/images/CSpeed2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/CSpeed2.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/DCspeed5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/DCspeed5.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/DSpeed3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/DSpeed3.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/dict-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/dict-cr.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/dict-cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/dict-cs.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/dict-ds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/dict-ds.png -------------------------------------------------------------------------------- /test/macho/response-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo ' -help' > $t/rsp 5 | ./ld64 @$t/rsp | grep -q Usage 6 | -------------------------------------------------------------------------------- /third-party/mimalloc/doc/mimalloc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/doc/mimalloc-logo.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/cdict_v136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/cdict_v136.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/zstd_logo86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/zstd_logo86.png -------------------------------------------------------------------------------- /third-party/zstd/tests/gzip/hufts-segv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/tests/gzip/hufts-segv.gz -------------------------------------------------------------------------------- /common/config.h.in: -------------------------------------------------------------------------------- 1 | #define MOLD_VERSION "@mold_VERSION@" 2 | #define MOLD_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@" 3 | #cmakedefine01 MOLD_IS_SOLD 4 | -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/_static/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/GSG/_static/favicons.png -------------------------------------------------------------------------------- /third-party/tbb/doc/main/_static/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/_static/favicons.png -------------------------------------------------------------------------------- /third-party/xxhash/cmake_unofficial/xxHashConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(${CMAKE_CURRENT_LIST_DIR}/xxHashTargets.cmake) 4 | 5 | -------------------------------------------------------------------------------- /third-party/zlib/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /third-party/zstd/programs/windres/zstd32.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/programs/windres/zstd32.res -------------------------------------------------------------------------------- /third-party/zstd/programs/windres/zstd64.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/programs/windres/zstd64.res -------------------------------------------------------------------------------- /third-party/mimalloc/bin/mimalloc-redirect.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/mimalloc-redirect.dll -------------------------------------------------------------------------------- /third-party/mimalloc/bin/mimalloc-redirect.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/mimalloc-redirect.lib -------------------------------------------------------------------------------- /third-party/mimalloc/bin/mimalloc-redirect32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/mimalloc-redirect32.dll -------------------------------------------------------------------------------- /third-party/mimalloc/bin/mimalloc-redirect32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/bin/mimalloc-redirect32.lib -------------------------------------------------------------------------------- /third-party/mimalloc/doc/mimalloc-logo-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/mimalloc/doc/mimalloc-logo-100.png -------------------------------------------------------------------------------- /third-party/zstd/contrib/pzstd/images/Cspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/contrib/pzstd/images/Cspeed.png -------------------------------------------------------------------------------- /third-party/zstd/contrib/pzstd/images/Dspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/contrib/pzstd/images/Dspeed.png -------------------------------------------------------------------------------- /third-party/tbb/doc/_static/oneAPI-rgb-rev-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/_static/oneAPI-rgb-rev-100.png -------------------------------------------------------------------------------- /third-party/zstd/doc/images/zstd_cdict_v1_3_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/doc/images/zstd_cdict_v1_3_5.png -------------------------------------------------------------------------------- /third-party/zstd/tests/dict-files/zero-weight-dict: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/tests/dict-files/zero-weight-dict -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/Images/how-oneTBB-works.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/GSG/Images/how-oneTBB-works.png -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /third-party/rust-demangle/.clang-format: -------------------------------------------------------------------------------- 1 | # Attempt to mimic the Rust official style. 2 | BasedOnStyle: LLVM 3 | IndentWidth: 4 4 | AlignAfterOpenBracket: BlockIndent 5 | -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/_static/oneAPI-rgb-rev-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/GSG/_static/oneAPI-rgb-rev-100.png -------------------------------------------------------------------------------- /third-party/tbb/doc/main/_static/oneAPI-rgb-rev-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/_static/oneAPI-rgb-rev-100.png -------------------------------------------------------------------------------- /third-party/tbb/examples/task_arena/fractal/gui/gui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/task_arena/fractal/gui/gui.ico -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /third-party/tbb/doc/main/intro/Resources/TBB-128x128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/intro/Resources/TBB-128x128.gif -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image002.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image004.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image006.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image007.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image008.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image009.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image010.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image011.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image012.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/image013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/image013.jpg -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_for/tachyon/gui/gui.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/parallel_for/tachyon/gui/gui.ico -------------------------------------------------------------------------------- /third-party/tbb/examples/task_arena/fractal/gui/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/task_arena/fractal/gui/small.ico -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /third-party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /third-party/zlib/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /third-party/zlib/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/flow_graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/flow_graph.jpg -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_for/seismic/gui/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/parallel_for/seismic/gui/small.ico -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_for/tachyon/gui/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/parallel_for/tachyon/gui/small.ico -------------------------------------------------------------------------------- /third-party/zstd/build/single_file_libs/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # build artifacts 3 | zstddeclib.c 4 | zstdenclib.c 5 | zstd.c 6 | zstd.h 7 | 8 | # test artifacts 9 | temp* 10 | -------------------------------------------------------------------------------- /third-party/zstd/build/single_file_libs/examples/testcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/build/single_file_libs/examples/testcard.png -------------------------------------------------------------------------------- /third-party/zstd/contrib/cleanTabs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed -i '' $'s/\t/ /g' ../lib/**/*.{h,c} ../programs/*.{h,c} ../tests/*.c ./**/*.{h,cpp} ../examples/*.c ../zlibWrapper/*.{h,c} 3 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/reference/Resources/make_edges_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/reference/Resources/make_edges_usage.png -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_for/polygon_overlay/speedup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/examples/parallel_for/polygon_overlay/speedup.gif -------------------------------------------------------------------------------- /third-party/zlib/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/reference/Resources/make_edges_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/reference/Resources/make_edges_example.png -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/dependence_graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/dependence_graph.jpg -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Images/flow_graph_complex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/tbb/doc/main/tbb_userguide/Images/flow_graph_complex.jpg -------------------------------------------------------------------------------- /third-party/xxhash/tests/bench/.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | 3 | *.o 4 | benchHash 5 | benchHash32 6 | benchHash_avx2 7 | benchHash_hw 8 | 9 | # test files 10 | 11 | test* 12 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/seekable_format/examples/.gitignore: -------------------------------------------------------------------------------- 1 | seekable_compression 2 | seekable_decompression 3 | seekable_decompression_mem 4 | parallel_processing 5 | parallel_compression 6 | -------------------------------------------------------------------------------- /third-party/zstd/tests/golden-compression/huffman-compressed-larger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/tests/golden-compression/huffman-compressed-larger -------------------------------------------------------------------------------- /third-party/zstd/tests/golden-dictionaries/http-dict-missing-symbols: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bluewhalesystems/sold/HEAD/third-party/zstd/tests/golden-dictionaries/http-dict-missing-symbols -------------------------------------------------------------------------------- /test/elf/empty-input.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | rm -f $t/a.o 5 | touch $t/a.o 6 | ! $CC -B. -o $t/exe $t/a.o &> $t/log || false 7 | grep -q 'unknown file type' $t/log 8 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /test/elf/icf-small.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() {} 7 | EOF 8 | 9 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 10 | -------------------------------------------------------------------------------- /third-party/tbb/doc/index/index_intro.rst: -------------------------------------------------------------------------------- 1 | .. _index_intro: 2 | 3 | This document contains information about |short_name|. 4 | It is a flexible performance library that let you break computation into parallel running tasks. 5 | 6 | -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2010.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2010 Win32 Release v100 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2010 x64 Release v100 -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2013.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2013 Win32 Release v120 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2013 x64 Release v120 -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2015.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2015 Win32 Release v140 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2015 x64 Release v140 -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2017.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2017 Win32 Release v141 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2017 x64 Release v141 -------------------------------------------------------------------------------- /third-party/zstd/tests/gzip/init.cfg: -------------------------------------------------------------------------------- 1 | # This file is sourced by init.sh, *before* its initialization. 2 | 3 | # This goes hand in hand with the "exec 9>&2;" in Makefile.am's 4 | # TESTS_ENVIRONMENT definition. 5 | stderr_fileno_=9 6 | -------------------------------------------------------------------------------- /test/elf/gdb-index-empty.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'void _start() {}' | $CC -c -o $t/a.o -xc - 5 | ./mold -o $t/exe $t/a.o -gdb-index 6 | readelf -WS $t/exe > $t/log 7 | ! grep -Fq .gdb_index $t/log || false 8 | -------------------------------------------------------------------------------- /test/elf/z-unknown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | ./mold -z no-such-opt 2>&1 | grep -q 'unknown command line option: -z no-such-opt' 5 | ./mold -zno-such-opt 2>&1 | grep -q 'unknown command line option: -zno-such-opt' 6 | -------------------------------------------------------------------------------- /test/macho/lc-build-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <`_. -------------------------------------------------------------------------------- /third-party/xxhash/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior 2 | * text eol=lf 3 | 4 | # Explicitly declare source files 5 | *.c text eol=lf 6 | *.h text eol=lf 7 | 8 | # Denote files that should not be modified. 9 | *.odt binary 10 | 11 | -------------------------------------------------------------------------------- /test/elf/defsym2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 2>&1 9 | grep -q 'library not found: -lSystem' $t/log 10 | -------------------------------------------------------------------------------- /third-party/zlib/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2017Community.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2017Community Win32 Release v141 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2017Community x64 Release v141 -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/installation.rst: -------------------------------------------------------------------------------- 1 | .. _installation: 2 | 3 | Installation 4 | ============ 5 | 6 | See the `installation instructions `_ 7 | that will help you to install |short_name| successfully. -------------------------------------------------------------------------------- /third-party/tbb/examples/task_group/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | Examples using `task_group` interface. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | sudoku | Compute all solutions for a Sudoku board. 7 | -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2017Enterprise.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2017Enterprise Win32 Release v141 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2017Enterprise x64 Release v141 -------------------------------------------------------------------------------- /third-party/zstd/contrib/premake/premake4.lua: -------------------------------------------------------------------------------- 1 | -- Include zstd.lua in your GENie or premake4 file, which exposes a project_zstd function 2 | dofile('zstd.lua') 3 | 4 | solution 'example' 5 | configurations { 'Debug', 'Release' } 6 | project_zstd('../../lib/') 7 | -------------------------------------------------------------------------------- /test/elf/verbose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC -B. -Wl,--verbose -o $t/exe $t/a.o > /dev/null 13 | -------------------------------------------------------------------------------- /third-party/zstd/build/VS_scripts/build.VS2017Professional.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem build 32-bit 4 | call "%~p0%build.generic.cmd" VS2017Professional Win32 Release v141 5 | 6 | rem build 64-bit 7 | call "%~p0%build.generic.cmd" VS2017Professional x64 Release v141 -------------------------------------------------------------------------------- /test/elf/symtab-dso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | puts("Hello world"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o 12 | nm $t/exe | grep -q 'U puts$' 13 | -------------------------------------------------------------------------------- /test/elf/z-start-stop-visibility.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | ./mold -z start-stop-visibility=hidden --version > /dev/null 5 | ! ./mold -z start-stop-visibility=protected --version 2> $t/log 6 | grep -q 'unsupported visibility: protected' $t/log 7 | -------------------------------------------------------------------------------- /third-party/tbb/examples/test_all/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | Examples that test various components of oneTBB. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | fibonacci | Compute Fibonacci numbers in different ways. 7 | -------------------------------------------------------------------------------- /test/elf/comment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/b.script 11 | INPUT(a.o) 12 | EOF 13 | 14 | $CC -B. -o $t/exe -L$t/foo $t/b.script 15 | -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_for_each/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | Examples using `parallel_for_each` algorithm. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | parallel_preorder | Parallel preorder traversal of a graph. 7 | -------------------------------------------------------------------------------- /test/elf/start-stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -flto 12 | $t/exe | grep -q 'Hello world' 13 | -------------------------------------------------------------------------------- /third-party/zstd/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. 4 | Please read the [full text](https://code.fb.com/codeofconduct/) 5 | so that you can understand what actions will and will not be tolerated. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sold linker 2 | 3 | _sold_ is a high-performance linker for macOS. I built it because Apple's ld 4 | was too slow at the time, and I wasn't aware that they were developing a new 5 | linker. Xcode 15 or later are shipped with Apple's new faster linker. 6 | I recommend using that instead. 7 | -------------------------------------------------------------------------------- /test/elf/hello-dynamic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -no-pie 12 | $QEMU $t/exe | grep -q 'Hello world' 13 | -------------------------------------------------------------------------------- /test/elf/z-now.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello "); 8 | puts("world"); 9 | } 10 | EOF 11 | 12 | $CC -B. -o $t/exe $t/a.o -Wl,-z,now 13 | $QEMU $t/exe | grep -q 'Hello world' 14 | -------------------------------------------------------------------------------- /test/macho/bundle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/bundle $t/a.o -Wl,-bundle 12 | file $t/exe | grep -qi bundle 13 | -------------------------------------------------------------------------------- /test/macho/llvm-section.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { printf("Hello world\n"); } 7 | EOF 8 | 9 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 10 | $t/exe | grep -q 'Hello world' 11 | -------------------------------------------------------------------------------- /test/macho/strip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 12 | strip $t/exe 13 | $t/exe | grep -q 'Hello world' 14 | -------------------------------------------------------------------------------- /third-party/mimalloc/.gitattributes: -------------------------------------------------------------------------------- 1 | # default behavior is to always use unix style line endings 2 | * text eol=lf 3 | *.png binary 4 | *.pdn binary 5 | *.jpg binary 6 | *.sln binary 7 | *.suo binary 8 | *.vcproj binary 9 | *.patch binary 10 | *.dll binary 11 | *.lib binary 12 | *.exe binary 13 | -------------------------------------------------------------------------------- /test/elf/trace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | return 0; 10 | } 11 | EOF 12 | 13 | $CC -B. -o $t/exe $t/a.o -Wl,-trace > $t/log 14 | grep -q '/a\.o$' $t/log 15 | -------------------------------------------------------------------------------- /test/macho/hello2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello"); 9 | puts(" world"); 10 | } 11 | EOF 12 | 13 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 14 | $t/exe | grep -q 'Hello world' 15 | -------------------------------------------------------------------------------- /test/elf/duplicate-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log || false 12 | grep -q 'duplicate symbol: .*\.o: .*\.o: main' $t/log 13 | -------------------------------------------------------------------------------- /test/elf/symtab-section-symbols.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o 12 | readelf -s $t/exe | grep -q 'SECTION LOCAL DEFAULT' 13 | -------------------------------------------------------------------------------- /test/macho/indirect-symtab.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { printf("Hello world\n"); } 7 | EOF 8 | 9 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 10 | objdump --macho --indirect-symbols $t/exe | grep -q _printf 11 | -------------------------------------------------------------------------------- /test/macho/missing-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log || false 13 | grep -q 'undefined symbol: .*\.o: _foo' $t/log 14 | -------------------------------------------------------------------------------- /third-party/tbb/examples/parallel_pipeline/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | Examples using `parallel_pipeline` algorithm. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | square | Another string transformation example that squares numbers read from a file. 7 | -------------------------------------------------------------------------------- /test/macho/exception.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log || false 13 | grep -q 'undefined symbol: foo' $t/log 14 | grep -q '>>> .*a\.o' $t/log 15 | -------------------------------------------------------------------------------- /test/elf/nostdlib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 11 | ! grep -Fq ' .dynsym ' $t/log || false 12 | ! grep -Fq ' .dynstr ' $t/log || false 13 | -------------------------------------------------------------------------------- /test/elf/x86_64_reloc-zero.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -Wl,-z,nodefaultlib 12 | readelf --dynamic $t/exe | grep -q 'Flags:.*NODEFLIB' 13 | -------------------------------------------------------------------------------- /test/macho/hello3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello"); 9 | fprintf(stdout, " world\n"); 10 | } 11 | EOF 12 | 13 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 14 | $t/exe | grep -q 'Hello world' 15 | -------------------------------------------------------------------------------- /third-party/zstd/build/VS2010/CompileAsCpp.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CompileAsCpp 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/elf/no-quick-exit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | return 0; 10 | } 11 | EOF 12 | 13 | $CC -B. -o $t/exe $t/a.o -Wl,-no-quick-exit 14 | $QEMU $t/exe | grep -q 'Hello world' 15 | -------------------------------------------------------------------------------- /test/elf/x86_64_emulation-deduction.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # Skip if target is not x86-64 5 | [ $MACHINE = x86_64 ] || skip 6 | 7 | cat < $t/log 10 | grep -q 'platform 1' $t/log 11 | grep -q 'minos 10.9' $t/log 12 | -------------------------------------------------------------------------------- /test/elf/hello-static.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | test_cflags -static || skip 5 | 6 | cat < 8 | int main() { 9 | printf("Hello world\n"); 10 | } 11 | EOF 12 | 13 | $CC -B. -o $t/exe $t/a.o -static 14 | $QEMU $t/exe | grep -q 'Hello world' 15 | -------------------------------------------------------------------------------- /test/elf/invalid-version-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'int main() {}' | $CC -c -o $t/a.o -xc - 5 | 6 | echo 'VER1 { foo[12; };' > $t/b.ver 7 | 8 | ! $CC -B. -shared -o $t/c.so -Wl,-version-script,$t/b.ver \ 9 | $t/a.o >& $t/log || false 10 | grep -q 'invalid version pattern' $t/log 11 | -------------------------------------------------------------------------------- /test/elf/large-max-page-size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -pie -Wl,-zmax-page-size=0x200000 12 | $QEMU $t/exe | grep -q 'Hello world' 13 | -------------------------------------------------------------------------------- /test/elf/x86_64_large-bss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat < /dev/null || skip 7 | volatile char arr[0x100000000]; 8 | int main() { 9 | return arr[2000]; 10 | } 11 | EOF 12 | 13 | $CC -B. -o $t/exe $t/a.o 14 | $QEMU $t/exe 15 | -------------------------------------------------------------------------------- /test/elf/initfirst.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | void foo() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,initfirst 13 | readelf --dynamic $t/b.so | grep -q 'Flags:.*INITFIRST' 14 | -------------------------------------------------------------------------------- /test/elf/interpose.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | void foo() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,interpose 13 | readelf --dynamic $t/b.so | grep -q 'Flags:.*INTERPOSE' 14 | -------------------------------------------------------------------------------- /test/macho/add-empty-section.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 11 | grep -Fq 'minos 13.5' $t/log 12 | grep -Fq 'sdk 12.0' $t/log 13 | -------------------------------------------------------------------------------- /test/macho/lto-dead-strip-dylibs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | std::cout << "Hello world\n"; 8 | } 9 | EOF 10 | 11 | $CXX --ld-path=./ld64 -o $t/exe $t/a.o -flto -dead_strip_dylibs 12 | $t/exe | grep -q 'Hello world' 13 | -------------------------------------------------------------------------------- /third-party/tbb/examples/concurrent_hash_map/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | This directory contains examples of the `concurrent_hash_map` container. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | count_strings | Concurrently inserts strings into a `concurrent_hash_map` container. 7 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /third-party/zlib/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /test/elf/package-metadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -Wl,-package-metadata='{"foo":"bar"}' 12 | readelf -x .note.package $t/exe | grep -Fq '{"foo":"bar"}' 13 | -------------------------------------------------------------------------------- /test/elf/stdout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | return 0; 10 | } 11 | EOF 12 | 13 | $CC -B. -Wl,-build-id=sha1 $t/a.o -o - > $t/exe 14 | chmod 755 $t/exe 15 | $QEMU $t/exe | grep -q 'Hello world' 16 | -------------------------------------------------------------------------------- /test/macho/add-ast-path.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | char msg[] = "Hello world\n"; 8 | char *p = msg; 9 | 10 | int main() { 11 | printf("%s", p); 12 | } 13 | EOF 14 | 15 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 16 | $t/exe | grep -q 'Hello world' 17 | -------------------------------------------------------------------------------- /test/macho/no-compact-unwind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | static int foo[100]; 8 | 9 | int main() { 10 | foo[1] = 5; 11 | printf("%d %d %p\n", foo[0], foo[1], foo); 12 | } 13 | EOF 14 | 15 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 16 | $t/exe | grep -q '^0 5 ' 17 | -------------------------------------------------------------------------------- /test/macho/undefined.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | puts("Hello world"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -Wl,-emit-relocs 12 | $QEMU $t/exe | grep -q 'Hello world' 13 | 14 | readelf -S $t/exe | grep -Eq 'rela?\.text' 15 | -------------------------------------------------------------------------------- /test/macho/private-symbols.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { printf("Hello world\n"); } 7 | int main() { hello(); } 8 | EOF 9 | 10 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 11 | objdump --macho --syms $t/exe > $t/log 12 | ! grep ' ltmp' $t/log || false 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | Delete this message and describe the bug here. Note that we only fix bugs in the most recent release of mold, so please make sure that you are using the most recent version. 11 | -------------------------------------------------------------------------------- /test/elf/dependency-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -Wl,-dependency-file=$t/dep 12 | 13 | grep -q "dependency-file/exe:.*/a.o " $t/dep 14 | grep -q ".*/a.o:$" $t/dep 15 | -------------------------------------------------------------------------------- /test/elf/linker-script2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/b.script 13 | INPUT(-lfoo) 14 | EOF 15 | 16 | $CC -B. -o $t/exe -L$t/foo/bar $t/b.script 17 | -------------------------------------------------------------------------------- /test/elf/no-eh-frame-header.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 13 | ! grep -F .eh_frame_hdr $t/log || false 14 | 15 | $QEMU $t/exe 16 | -------------------------------------------------------------------------------- /test/macho/lib1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -shared -o $t/b.dylib $t/a.o 12 | otool -l $t/b.dylib > $t/log 13 | ! grep -q 'segname: __PAGEZERO' $t/log || false 14 | -------------------------------------------------------------------------------- /test/macho/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | ./ld64 -v | grep -q '[ms]old' 5 | 6 | cat < 8 | 9 | int main() { 10 | printf("Hello world\n"); 11 | } 12 | EOF 13 | 14 | $CC --ld-path=./ld64 -Wl,-v -o $t/exe $t/a.o | grep -q '[ms]old' 15 | $t/exe | grep -q 'Hello world' 16 | -------------------------------------------------------------------------------- /third-party/zstd/examples/.gitignore: -------------------------------------------------------------------------------- 1 | #build 2 | simple_compression 3 | simple_decompression 4 | multiple_simple_compression 5 | dictionary_compression 6 | dictionary_decompression 7 | streaming_compression 8 | streaming_decompression 9 | multiple_streaming_compression 10 | streaming_memory_usage 11 | 12 | #test artefact 13 | tmp* 14 | test* 15 | *.zst 16 | -------------------------------------------------------------------------------- /test/elf/empty-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | rm -f $t/b.script 12 | touch $t/b.script 13 | 14 | $CC -B. -o $t/exe $t/a.o -Wl,--version-script,$t/b.script 15 | $QEMU $t/exe | grep -q 'Hello world' 16 | -------------------------------------------------------------------------------- /test/macho/object-path-lto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -flto -Wl,-object_path_lto,$t/obj 12 | $t/exe | grep -q 'Hello world' 13 | otool -l $t/obj > /dev/null 14 | -------------------------------------------------------------------------------- /test/macho/stack-size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 10 | 11 | grep -A3 'cmd LC_RPATH' $t/log | grep -q 'path foo' 12 | grep -A3 'cmd LC_RPATH' $t/log | grep -q 'path @bar' 13 | -------------------------------------------------------------------------------- /third-party/tbb/examples/concurrent_priority_queue/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | This directory contains examples of the `concurrent_priority_queue` container. 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | shortpath | Solves the single source shortest path problem using a `concurrent_priority_queue` container. 7 | -------------------------------------------------------------------------------- /test/elf/init-in-dso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 15 | ! grep -Fq '(INIT)' $t/log || false 16 | -------------------------------------------------------------------------------- /test/elf/mold-wrapper2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | ldd mold-wrapper.so | grep -q libasan && skip 5 | 6 | nm mold | grep -q '__[at]san_init' && skip 7 | 8 | rm -rf $t 9 | mkdir -p $t/bin $t/lib/mold 10 | cp mold $t/bin 11 | cp mold-wrapper.so $t/bin 12 | 13 | $t/bin/mold -run bash -c 'echo $LD_PRELOAD' | grep -q '/bin/mold-wrapper.so' 14 | -------------------------------------------------------------------------------- /test/elf/no-undefined-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'ver_x { global: foo; };' > $t/a.ver 5 | 6 | cat < $t/log 11 | grep -Fq 'a.ver: cannot assign version `ver_x` to symbol `foo`: symbol not found' $t/log 12 | -------------------------------------------------------------------------------- /test/elf/omagic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | test_cflags -static || skip 5 | 6 | cat < 8 | 9 | int main() { 10 | printf("Hello world\n"); 11 | return 0; 12 | } 13 | EOF 14 | 15 | $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic 16 | readelf -W --segments $t/exe | grep -qw RWE 17 | -------------------------------------------------------------------------------- /test/elf/version-script16.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | { local: *; global: extern "C++" { *foo*; }; }; 6 | EOF 7 | 8 | cat < $t/log || false 14 | grep -Fq 'relocation R_X86_64_16 against foo out of range' $t/log 15 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/parallel_for_toctree.rst: -------------------------------------------------------------------------------- 1 | .. _parallel_for_toctree: 2 | 3 | .. toctree:: 4 | :maxdepth: 4 5 | 6 | ../tbb_userguide/Lambda_Expressions 7 | ../tbb_userguide/Automatic_Chunking 8 | ../tbb_userguide/Controlling_Chunking_os 9 | ../tbb_userguide/Bandwidth_and_Cache_Affinity_os 10 | ../tbb_userguide/Partitioner_Summary -------------------------------------------------------------------------------- /test/elf/hidden-weak-undef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 12 | ! grep -qw foo $t/log || false 13 | grep -qw bar $t/log 14 | -------------------------------------------------------------------------------- /test/elf/print-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 2> /dev/null 14 | grep -q 'b\.o.*a\.o.*foo$' $t/log 15 | -------------------------------------------------------------------------------- /test/elf/x86_64_warn-execstack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat <&1 | grep -q 'may cause a segmentation fault' 15 | -------------------------------------------------------------------------------- /test/elf/z-origin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC -B. -o $t/exe $t/a.o -Wl,-z,origin 13 | 14 | readelf --dynamic $t/exe | grep -Eq '\(FLAGS\)\s+ORIGIN' 15 | readelf --dynamic $t/exe | grep -Eq 'Flags:.*ORIGIN' 16 | -------------------------------------------------------------------------------- /test/macho/private-extern.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 11 | grep -q _foo $t/log 12 | ! grep -q _bar $t/log || false 13 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Summary_of_Containers.rst: -------------------------------------------------------------------------------- 1 | .. _Summary_of_Containers: 2 | 3 | Summary of Containers 4 | ===================== 5 | 6 | 7 | The high-level containers in |full_name| 8 | enable common idioms for concurrent access. They are suitable for 9 | scenarios where the alternative would be a serial container with a lock 10 | around it. 11 | 12 | -------------------------------------------------------------------------------- /test/elf/filter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 14 | grep -Fq 'Filter library: [foo]' $t/log 15 | grep -Fq 'Filter library: [bar]' $t/log 16 | -------------------------------------------------------------------------------- /test/macho/duplicate-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log || false 14 | grep -q 'duplicate symbol: .*/b.o: .*/a.o: _hello' $t/log 15 | -------------------------------------------------------------------------------- /test/macho/reproducibility.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 12 | cp $t/exe $t/exe1 13 | 14 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 15 | cp $t/exe $t/exe2 16 | 17 | diff $t/exe1 $t/exe2 18 | -------------------------------------------------------------------------------- /third-party/zlib/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /test/elf/large-text.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 12 | int main() { printf("Hello world\n"); } 13 | EOF 14 | 15 | $CC -B. -o $t/exe $t/a.o $t/b.o 16 | $QEMU $t/exe | grep -q 'Hello world' 17 | -------------------------------------------------------------------------------- /.github/workflows/linux-packages.yml: -------------------------------------------------------------------------------- 1 | name: linux-packages 2 | on: 3 | push: 4 | branches: [ main ] 5 | jobs: 6 | build: 7 | runs-on: ubuntu-20.04 8 | steps: 9 | - uses: actions/checkout@v3 10 | - name: build 11 | run: ./dist.sh x86_64 12 | - name: upload 13 | uses: actions/upload-artifact@v3 14 | with: 15 | path: mold-*-linux.tar.gz 16 | -------------------------------------------------------------------------------- /test/elf/auxiliary.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 14 | grep -Fq 'Auxiliary library: [foo]' $t/log 15 | grep -Fq 'Auxiliary library: [bar]' $t/log 16 | -------------------------------------------------------------------------------- /test/elf/hidden-undef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log 14 | grep -q 'undefined symbol: foo' $t/log 15 | -------------------------------------------------------------------------------- /test/elf/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 14 | ! grep -Fq '(INIT)' $t/log || false 15 | -------------------------------------------------------------------------------- /test/elf/allow-multiple-definition.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'int main() { return 0; }' | $CC -c -o $t/a.o -xc - 5 | echo 'int main() { return 1; }' | $CC -c -o $t/b.o -xc - 6 | 7 | ! $CC -B. -o $t/exe $t/a.o $t/b.o 2> /dev/null || false 8 | $CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-allow-multiple-definition 9 | $CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-z,muldefs 10 | -------------------------------------------------------------------------------- /test/elf/empty-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 10 | ! grep -Fq 'Library soname' $t/log || false 11 | 12 | $CC -B. -o $t/b.so -shared $t/a.o -Wl,-soname,foo 13 | readelf --dynamic $t/b.so | grep -Fq 'Library soname: [foo]' 14 | -------------------------------------------------------------------------------- /test/elf/x86_64_z-shstk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat < $t/log 13 | ! grep -qw SHSTK $t/log 14 | 15 | $CC -B. -o $t/exe $t/a.o -Wl,-z,shstk 16 | readelf --notes $t/exe | grep -qw SHSTK 17 | -------------------------------------------------------------------------------- /test/macho/literals.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 13 | ! grep -q LC_FUNCTION_STARTS $t/log || false 14 | -------------------------------------------------------------------------------- /test/macho/pagezero-size2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | ! $CC --ld-path=./ld64 -shared -o $t/b.dylib $t/a.o -Wl,-pagezero_size,0x1000 >& $t/log 12 | grep -Fq ' -pagezero_size option can only be used when linking a main executable' $t/log 13 | -------------------------------------------------------------------------------- /third-party/zlib/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /test/elf/cmdline.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | { ./mold -zfoo || true; } 2>&1 | grep -q 'unknown command line option: -zfoo' 5 | { ./mold -z foo || true; } 2>&1 | grep -q 'unknown command line option: -z foo' 6 | { ./mold -abcdefg || true; } 2>&1 | grep -q 'unknown command line option: -abcdefg' 7 | { ./mold --abcdefg || true; } 2>&1 | grep -q 'unknown command line option: --abcdefg' 8 | -------------------------------------------------------------------------------- /test/elf/default-symver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < 9 | 10 | int main() { 11 | printf("Hello\n"); 12 | return 0; 13 | } 14 | EOF 15 | 16 | $CC -B. -o $t/exe $t/a.o $t/b.o 17 | $QEMU $t/exe | grep -q Hello 18 | -------------------------------------------------------------------------------- /test/elf/pie.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | return 0; 10 | } 11 | EOF 12 | 13 | $CC -B. -pie -o $t/exe $t/a.o 14 | readelf --file-header $t/exe | grep -q -E '(Shared object file|Position-Independent Executable file)' 15 | $QEMU $t/exe | grep -q 'Hello world' 16 | -------------------------------------------------------------------------------- /test/elf/tls-le-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log 10 | grep -q 'relocation .* against `foo` can not be used when making a shared object; recompile with -fPIC' $t/log 11 | -------------------------------------------------------------------------------- /test/elf/x86_64_z-ibt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat < $t/log 14 | ! grep -qw SHSTK $t/log 15 | 16 | $CC -B. -o $t/exe $t/a.o -Wl,-z,ibt 17 | readelf --notes $t/exe | grep -qw IBT 18 | -------------------------------------------------------------------------------- /test/macho/eh-frame.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $CXX -xc -femit-dwarf-unwind=always /dev/null 2> /dev/null ] || skip 5 | 6 | cat < 10 | 11 | extern char msg[]; 12 | 13 | int main() { 14 | printf("%s\n", msg); 15 | } 16 | EOF 17 | 18 | $CC --ld-path=./ld64 -o $t/exe $t/a.o $t/b.o 19 | $t/exe | grep -q 'Hello world' 20 | -------------------------------------------------------------------------------- /test/macho/weak-def-ref.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | struct Foo { 8 | Foo() { std::cout << "foo\n"; } 9 | }; 10 | 11 | Foo x; 12 | 13 | int main() {} 14 | EOF 15 | 16 | $CXX --ld-path=./ld64 -o $t/exe $t/a.o 17 | objdump --macho --exports-trie $t/exe > $t/log 18 | ! grep -q __ZN3FooC1Ev $t/log || false 19 | -------------------------------------------------------------------------------- /test/elf/version-script9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'VER1 { extern "C++" {}; foo; }; VER2 {};' > $t/a.ver 5 | 6 | cat < $t/b.s 7 | .globl foo, bar, baz 8 | foo: 9 | nop 10 | bar: 11 | nop 12 | baz: 13 | nop 14 | EOF 15 | 16 | $CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s 17 | readelf --dyn-syms $t/c.so > $t/log 18 | grep -q ' foo@@VER1$' $t/log 19 | -------------------------------------------------------------------------------- /test/elf/weak-export-exe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | __attribute__((weak)) int foo(); 8 | 9 | int main() { 10 | printf("%d\n", foo ? foo() : 3); 11 | } 12 | EOF 13 | 14 | $CC -B. -o $t/exe $t/a.o 15 | ! readelf --dyn-syms $t/exe | grep -q 'WEAK DEFAULT UND foo' || false 16 | $QEMU $t/exe | grep -q '^3$' 17 | -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/get_started.rst: -------------------------------------------------------------------------------- 1 | .. _Get_Started_Guide: 2 | 3 | Get Started with |short_name| 4 | ============================== 5 | 6 | .. include:: intro_gsg.rst 7 | 8 | .. include:: system_requirements.rst 9 | 10 | .. include:: before_beginning_and_example.rst 11 | 12 | Find more 13 | ********* 14 | 15 | See our `documentation `_ to learn more about |short_name|. 16 | -------------------------------------------------------------------------------- /test/elf/lto-llvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = $(uname -m) ] || skip 5 | 6 | echo 'int main() {}' | clang -flto -o /dev/null -xc - >& /dev/null \ 7 | || skip 8 | 9 | cat < 11 | int main() { 12 | printf("Hello world\n"); 13 | } 14 | EOF 15 | 16 | clang -B. -o $t/exe -flto $t/a.o 17 | $t/exe | grep -q 'Hello world' 18 | -------------------------------------------------------------------------------- /test/elf/response-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/rsp 19 | 20 | $CC -o $t/exe $t/a.o -Wl,@$t/rsp 21 | -------------------------------------------------------------------------------- /test/elf/riscv64_weak-undef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 14 | long foo(); 15 | int main() { printf("%ld\n", foo()); } 16 | EOF 17 | 18 | $CC -B. -static -o $t/exe $t/a.o $t/b.o 19 | $QEMU $t/exe | grep -q '^0$' 20 | -------------------------------------------------------------------------------- /test/elf/version-script7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | VER_X1 { *; }; 6 | EOF 7 | 8 | cat < $t/log 16 | grep -q 'foo$' $t/log 17 | grep -q 'bar@@VER_X1' $t/log 18 | -------------------------------------------------------------------------------- /test/macho/hello4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello"); 9 | fprintf(stdout, " world\n"); 10 | fprintf(stderr, "Hello stderr\n"); 11 | } 12 | EOF 13 | 14 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 15 | $t/exe 2> /dev/null | grep -q 'Hello world' 16 | $t/exe 2>&1 > /dev/null | grep -q 'Hello stderr' 17 | -------------------------------------------------------------------------------- /third-party/mimalloc/mimalloc.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=@libdir_for_pc_file@ 3 | includedir=@includedir_for_pc_file@ 4 | 5 | Name: @PROJECT_NAME@ 6 | Description: A compact general purpose allocator with excellent performance 7 | Version: @PACKAGE_VERSION@ 8 | URL: https://github.com/microsoft/mimalloc/ 9 | Libs: -L${libdir} -lmimalloc 10 | Libs.private: @pc_libraries@ 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Parallelizing_Simple_Loops_toctree.rst: -------------------------------------------------------------------------------- 1 | .. _Parallelizing_Simple_Loops_toctree: 2 | 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | ../tbb_userguide/Initializing_and_Terminating_the_Library 8 | ../tbb_userguide/parallel_for_os 9 | ../tbb_userguide/parallel_reduce 10 | ../tbb_userguide/Advanced_Example 11 | ../tbb_userguide/Advanced_Topic_Other_Kinds_of_Iteration_Spaces -------------------------------------------------------------------------------- /third-party/zstd/zlibWrapper/.gitignore: -------------------------------------------------------------------------------- 1 | # object artifacts 2 | *.o 3 | 4 | # Default result files 5 | _* 6 | example 7 | example_zstd.* 8 | example_gz.* 9 | fitblk 10 | fitblk_zstd.* 11 | zwrapbench 12 | foo.gz 13 | 14 | minigzip 15 | minigzip_zstd 16 | example 17 | example_zstd 18 | fitblk 19 | fitblk_zstd 20 | zwrapbench 21 | 22 | # Misc files 23 | *.bat 24 | *.zip 25 | *.txt 26 | 27 | # Directories 28 | minizip/ 29 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Flow_Graph_waiting_tips.rst: -------------------------------------------------------------------------------- 1 | .. _Flow_Graph_waiting_tips: 2 | 3 | Flow Graph Tips for Waiting for and Destroying a Flow Graph 4 | =========================================================== 5 | 6 | .. toctree:: 7 | :maxdepth: 4 8 | 9 | ../tbb_userguide/always_use_wait_for_all 10 | ../tbb_userguide/avoid_dynamic_node_removal 11 | ../tbb_userguide/destroy_graphs_outside_main_thread -------------------------------------------------------------------------------- /test/elf/many-sections2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # OneTBB isn't tsan-clean 5 | nm mold | grep -q '__tsan_init' && skip 6 | 7 | seq 1 100000 | sed 's/.*/.section .data.\0,"aw"\n.globl x\0\nx\0: .word 0\n/g' | \ 8 | $CC -c -xassembler -o $t/a.o - 9 | 10 | ./mold --relocatable -o $t/b.o $t/a.o 11 | readelf -WS $t/b.o | grep -Fq .data.100000 12 | readelf -Ws $t/b.o | grep -Fq 'GLOBAL DEFAULT 100000' 13 | -------------------------------------------------------------------------------- /test/elf/thread-count.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC -B. -o $t/exe $t/a.o -Wl,-no-threads 12 | $CC -B. -o $t/exe $t/a.o -Wl,-thread-count=1 13 | $CC -B. -o $t/exe $t/a.o -Wl,-threads 14 | $CC -B. -o $t/exe $t/a.o -Wl,-threads=1 15 | $CC -B. -o $t/exe $t/a.o -Wl,--threads=1 16 | -------------------------------------------------------------------------------- /test/macho/objc-selector.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | NSProcessInfo *info = [NSProcessInfo processInfo]; 8 | NSLog(@"processName: %@", [info processName]); 9 | } 10 | EOF 11 | 12 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -framework foundation -Wl,-ObjC 13 | $t/exe 2>&1 | grep -Fq 'processName: exe' 14 | -------------------------------------------------------------------------------- /test/macho/uuid2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int main() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC --ld-path=./ld64 -B. -o $t/exe1 $t/a.o -Wl,-adhoc_codesign 13 | $CC --ld-path=./ld64 -B. -o $t/exe2 $t/a.o -Wl,-adhoc_codesign 14 | 15 | [ "$(otool -l $t/exe1 | grep 'uuid ')" != "$(otool -l $t/exe2 | grep 'uuid ')" ] 16 | -------------------------------------------------------------------------------- /third-party/tbb/examples/getting_started/README.md: -------------------------------------------------------------------------------- 1 | # Code Samples of oneAPI Threading Building Blocks (oneTBB) 2 | This directory contains the examples referenced by the [oneAPI Threading Building Blocks Get Started Guide](https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-onetbb/top.html) 3 | 4 | | Code sample name | Description 5 | |:--- |:--- 6 | | sub_string_finder | Finds largest matching substrings. 7 | -------------------------------------------------------------------------------- /third-party/zstd/.circleci/images/primary/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM circleci/buildpack-deps:bionic 2 | 3 | RUN sudo dpkg --add-architecture i386 4 | RUN sudo apt-get -y -qq update 5 | RUN sudo apt-get -y install \ 6 | gcc-multilib-powerpc-linux-gnu gcc-arm-linux-gnueabi \ 7 | libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross \ 8 | libc6-dev-ppc64-powerpc-cross zstd gzip coreutils \ 9 | libcurl4-openssl-dev 10 | -------------------------------------------------------------------------------- /test/elf/bug178.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # Verify that mold does not crash if no object file is included 5 | # in the output. The resulting executable doesn't contain any 6 | # meaningful code or data, so this is an edge case, though. 7 | 8 | cat < 8 | int main() { printf("Hello world\n"); } 9 | EOF 10 | 11 | $CXX -B. -o $t/exe $t/a.o -Wl,-emit-relocs 12 | $QEMU $t/exe | grep -q 'Hello world' 13 | 14 | readelf -SW $t/exe | grep -Eq 'rela?\.text' 15 | readelf -SW $t/exe | grep -Eq 'rela?\.eh_frame' 16 | -------------------------------------------------------------------------------- /test/elf/exclude-libs2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 20 | grep -Fq foo $t/log 21 | -------------------------------------------------------------------------------- /test/elf/linker-script4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'VERSION { ver_x { global: *; }; };' > $t/a.script 5 | 6 | cat < $t/b.s 7 | .globl foo, bar, baz 8 | foo: 9 | nop 10 | bar: 11 | nop 12 | baz: 13 | nop 14 | EOF 15 | 16 | $CC -B. -shared -o $t/c.so $t/a.script $t/b.s 17 | readelf --version-info $t/c.so > $t/log 18 | 19 | grep -Fq 'Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_x' $t/log 20 | -------------------------------------------------------------------------------- /test/elf/relax-got-load.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | extern char *msg; 7 | void hello() { printf("%s\n", msg); } 8 | EOF 9 | 10 | cat < 11 | 12 | extern _Thread_local int foo; 13 | 14 | int main() { 15 | printf("foo=%d\n", foo); 16 | } 17 | EOF 18 | 19 | $CC -B. -o $t/exe $t/a.o $t/b.o 20 | $QEMU $t/exe | grep -q '^foo=0$' 21 | -------------------------------------------------------------------------------- /test/macho/needed-l.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < $t/contents 9 | 10 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -Wl,-sectcreate,__TEXT,__foo,$t/contents 11 | 12 | otool -l $t/exe | grep -A3 'sectname __foo' > $t/log 13 | grep -q 'segname __TEXT' $t/log 14 | grep -q 'segname __TEXT' $t/log 15 | grep -q 'size 0x0*7$' $t/log 16 | -------------------------------------------------------------------------------- /test/macho/x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/a.c 5 | #include 6 | static void hello() { printf("Hello world\n"); } 7 | int main(){ hello(); } 8 | EOF 9 | 10 | $CC -o $t/a.o -c $t/a.c 11 | 12 | $CC --ld-path=./ld64 -o $t/exe1 $t/a.o 13 | nm $t/exe1 | grep -qw _hello 14 | 15 | $CC --ld-path=./ld64 -o $t/exe2 $t/a.o -Wl,-x 16 | nm $t/exe2 > $t/log2 17 | ! grep -qw _hello $t/log2 || false 18 | -------------------------------------------------------------------------------- /third-party/zstd/build/single_file_libs/create_single_file_library.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Where to find the sources 4 | ZSTD_SRC_ROOT="../../lib" 5 | 6 | # Amalgamate the sources 7 | echo "Amalgamating files... this can take a while" 8 | ./combine.sh -r "$ZSTD_SRC_ROOT" -o zstd.c zstd-in.c 9 | # Did combining work? 10 | if [ $? -ne 0 ]; then 11 | echo "Combine script: FAILED" 12 | exit 1 13 | fi 14 | echo "Combine script: PASSED" 15 | -------------------------------------------------------------------------------- /test/elf/static-pie.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | test_cflags -static-pie || skip 5 | 6 | cat < 8 | int main() { 9 | printf("Hello world\n"); 10 | } 11 | EOF 12 | 13 | $CC -B. -o $t/exe1 $t/a.o -static-pie 14 | $QEMU $t/exe1 | grep -q 'Hello world' 15 | 16 | $CC -B. -o $t/exe2 $t/a.o -static-pie -Wl,--no-relax 17 | $QEMU $t/exe2 | grep -q 'Hello world' 18 | -------------------------------------------------------------------------------- /test/elf/version-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'ver_x { global: *; };' > $t/a.ver 5 | 6 | cat < $t/b.s 7 | .globl foo, bar, baz 8 | foo: 9 | nop 10 | bar: 11 | nop 12 | baz: 13 | nop 14 | EOF 15 | 16 | $CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s 17 | readelf --version-info $t/c.so > $t/log 18 | 19 | grep -Fq 'Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_x' $t/log 20 | -------------------------------------------------------------------------------- /test/macho/S.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/a.c 5 | #include 6 | void hello() { printf("Hello world\n"); } 7 | int main(){ hello(); } 8 | EOF 9 | 10 | $CC -o $t/a.o -c -g $t/a.c 11 | 12 | $CC --ld-path=./ld64 -o $t/exe1 $t/a.o -g 13 | nm -pa $t/exe1 | grep -qw OSO 14 | 15 | $CC --ld-path=./ld64 -o $t/exe2 $t/a.o -g -Wl,-S 16 | nm -pa $t/exe2 > $t/log2 17 | ! grep -qw OSO $t/log2 || false 18 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Flow_Graph_making_edges_tips.rst: -------------------------------------------------------------------------------- 1 | .. _Flow_Graph_making_edges_tips: 2 | 3 | Flow Graph Tips on Making Edges 4 | =============================== 5 | 6 | .. toctree:: 7 | :maxdepth: 4 8 | 9 | ../tbb_userguide/use_make_edge 10 | ../tbb_userguide/broadcast_or_send 11 | ../tbb_userguide/communicate_with_nodes 12 | ../tbb_userguide/use_input_node 13 | ../tbb_userguide/avoiding_data_races 14 | -------------------------------------------------------------------------------- /test/elf/dynamic-dt-debug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 10 | grep -Fq '(DEBUG)' $t/log 11 | 12 | cat < $t/log 18 | ! grep -Fq '(DEBUG)' $t/log || false 19 | -------------------------------------------------------------------------------- /test/elf/warn-symbol-type.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int times = -1; /* times collides with clock_t times(struct tms *buffer); */ 7 | 8 | int 9 | main () 10 | { 11 | printf ("times: %d\n", times); 12 | return 0; 13 | } 14 | EOF 15 | 16 | $CC -B. -shared -o $t/a.so $t/a.o >& $t/log 17 | 18 | grep -q "warning: symbol type mismatch: times" $t/log 19 | -------------------------------------------------------------------------------- /test/elf/func-addr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 10 | 11 | typedef void Func(); 12 | 13 | void fn(); 14 | Func *const ptr = fn; 15 | 16 | int main() { 17 | printf("%d\n", fn == ptr); 18 | } 19 | EOF 20 | 21 | $CC -B. -o $t/exe -no-pie $t/b.o $t/a.so 22 | $QEMU $t/exe | grep -q 1 23 | -------------------------------------------------------------------------------- /test/elf/reloc-rodata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | exit 4 | 5 | [ $MACHINE = aarch64 ] && skip 6 | 7 | cat < 9 | 10 | int foo; 11 | int * const bar = &foo; 12 | 13 | int main() { 14 | printf("%d\n", *bar); 15 | } 16 | EOF 17 | 18 | ! $CC -B. -o $t/exe $t/a.o -pie >& $t/log 19 | grep -Eq 'relocation against symbol .+ can not be used; recompile with -fPIC' $t/log 20 | -------------------------------------------------------------------------------- /test/elf/version-script13.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | { 6 | global: *; 7 | local: foo; 8 | }; 9 | EOF 10 | 11 | cat < $t/log 19 | grep -q ' foobar$' $t/log 20 | ! grep -q ' foo$' $t/log || false 21 | -------------------------------------------------------------------------------- /test/macho/universal.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | lipo $t/a.o -create -output $t/fat.o 12 | 13 | cat < 6 | 7 | void foo() { 8 | printf("Hello world\n"); 9 | } 10 | EOF 11 | 12 | $CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,now 13 | readelf --dynamic $t/b.so | grep -q 'Flags: NOW' 14 | 15 | $CC -B. -shared -o $t/b.so $t/a.o -Wl,-z,now,-z,lazy 16 | readelf --dynamic $t/b.so > $t/log 17 | ! grep -q 'Flags: NOW' $t/log || false 18 | -------------------------------------------------------------------------------- /test/elf/oformat-binary.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/a.ver 5 | { 6 | extern "C" { foo }; 7 | local: *; 8 | }; 9 | EOF 10 | 11 | cat < $t/log 19 | grep -Fq foo $t/log 20 | ! grep -Fq ' main' $t/log || false 21 | -------------------------------------------------------------------------------- /test/elf/weak-undef2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | __attribute__((weak)) int foo(); 8 | 9 | int main() { 10 | printf("%d\n", foo ? foo() : -1); 11 | } 12 | EOF 13 | 14 | cat <& $t/log 20 | grep -q 'undefined symbol: foo' $t/log 21 | -------------------------------------------------------------------------------- /test/macho/filepath.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { printf("Hello world\n"); } 7 | EOF 8 | 9 | cat < $t/filelist 15 | $t/a.o 16 | $t/b.o 17 | EOF 18 | 19 | $CC --ld-path=./ld64 -o $t/exe -Wl,-filelist,$t/filelist 20 | $t/exe | grep -q 'Hello world' 21 | -------------------------------------------------------------------------------- /test/elf/dynamic-linker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 12 | ! grep -Fq .interp $t/log || false 13 | 14 | readelf --dynamic $t/exe > $t/log 15 | 16 | ./mold -o $t/exe $t/a.o --dynamic-linker=/foo/bar 17 | 18 | readelf --sections $t/exe > $t/log 19 | grep -Fq .interp $t/log 20 | -------------------------------------------------------------------------------- /test/elf/exclude-libs3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 19 | grep -Fq foo $t/log 20 | -------------------------------------------------------------------------------- /test/elf/fatal-warnings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < /dev/null 18 | 19 | ! $CC -B. -o $t/exe $t/a.o $t/b.o \ 20 | -Wl,-warn-common -Wl,-fatal-warnings 2> /dev/null || false 21 | -------------------------------------------------------------------------------- /test/elf/warn-once.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log 16 | 17 | [ "$(grep 'undefined symbol:.* foo$' $t/log | wc -l)" = 1 ] 18 | -------------------------------------------------------------------------------- /test/macho/application-extension2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log 16 | 17 | grep -q 'not safe for use in application extensions' $t/log 18 | -------------------------------------------------------------------------------- /third-party/tbb/doc/_static/theme_overrides.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | white-space: normal !important; 8 | } 9 | 10 | .wy-table-responsive { 11 | overflow: visible !important; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /third-party/zstd/programs/zstdless.1.md: -------------------------------------------------------------------------------- 1 | zstdless(1) -- view zstandard-compressed files 2 | ============================================================================ 3 | 4 | SYNOPSIS 5 | -------- 6 | 7 | `zstdless` [*flags*] [_file_ ...] 8 | 9 | 10 | DESCRIPTION 11 | ----------- 12 | `zstdless` runs `less (1)` on files or stdin, if no files argument is given, after decompressing them with `zstdcat (1)`. 13 | 14 | SEE ALSO 15 | -------- 16 | `zstd (1)` 17 | -------------------------------------------------------------------------------- /test/elf/ifunc-alias.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | supports_ifunc || skip 5 | 6 | cat < 8 | 9 | void foo() {} 10 | int bar() __attribute__((ifunc("resolve_bar"))); 11 | void *resolve_bar() { return foo; } 12 | void *bar2 = bar; 13 | 14 | int main() { 15 | printf("%p %p\n", bar, bar2); 16 | } 17 | EOF 18 | 19 | $CC -B. -o $t/exe $t/a.o 20 | $QEMU $t/exe | grep -Eq '^(\S+) \1$' 21 | -------------------------------------------------------------------------------- /test/elf/start-lib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 18 | ! grep -q ' foo$' $t/log || false 19 | grep -q ' bar$' $t/log 20 | -------------------------------------------------------------------------------- /test/elf/tls-df-static-tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | static _Thread_local int foo = 5; 7 | int bar() { return foo; } 8 | EOF 9 | 10 | $CC -B. -shared -o $t/b.so $t/a.o -Wl,--relax 11 | readelf --dynamic $t/b.so | grep -q STATIC_TLS 12 | 13 | $CC -B. -shared -o $t/c.so $t/a.o -Wl,--no-relax 14 | readelf --dynamic $t/c.so | grep -q STATIC_TLS 15 | -------------------------------------------------------------------------------- /third-party/tbb/doc/GSG/_static/theme_overrides.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | white-space: normal !important; 8 | } 9 | 10 | .wy-table-responsive { 11 | overflow: visible !important; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/_static/theme_overrides.css: -------------------------------------------------------------------------------- 1 | /* override table width restrictions */ 2 | @media screen and (min-width: 767px) { 3 | 4 | .wy-table-responsive table td { 5 | /* !important prevents the common CSS stylesheets from overriding 6 | this as on RTD they are loaded after this stylesheet */ 7 | white-space: normal !important; 8 | } 9 | 10 | .wy-table-responsive { 11 | overflow: visible !important; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /third-party/zstd/.buckconfig: -------------------------------------------------------------------------------- 1 | [cxx] 2 | cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 3 | cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith 4 | cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 5 | cxxflags = -std=c++11 -Wno-deprecated-declarations 6 | gtest_dep = //contrib/pzstd:gtest 7 | 8 | [httpserver] 9 | port = 0 10 | -------------------------------------------------------------------------------- /test/macho/all-load.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int hello() { 8 | printf("Hello world\n"); 9 | return 0; 10 | } 11 | EOF 12 | 13 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -Wl,-e,_hello 14 | $t/exe | grep -q 'Hello world' 15 | 16 | ! $CC --ld-path=./ld64 -o $t/exe $t/a.o -Wl,-e,no_such_symbol 2> $t/log || false 17 | grep -q 'undefined entry point symbol: no_such_symbol' $t/log 18 | -------------------------------------------------------------------------------- /test/macho/filepath2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { printf("Hello world\n"); } 7 | EOF 8 | 9 | cat < $t/filelist 15 | a.o 16 | b.o 17 | EOF 18 | 19 | $CC --ld-path=./ld64 -o $t/exe -Xlinker -filelist -Xlinker $t/filelist,$t 20 | $t/exe | grep -q 'Hello world' 21 | -------------------------------------------------------------------------------- /third-party/rust-demangle/rust-demangle.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define RUST_DEMANGLE_FLAG_VERBOSE 1 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | bool rust_demangle_with_callback( 11 | const char *mangled, int flags, 12 | void (*callback)(const char *data, size_t len, void *opaque), void *opaque 13 | ); 14 | char *rust_demangle(const char *mangled, int flags); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /third-party/zstd/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior 2 | * text eol=lf 3 | 4 | # Explicitly declare source files 5 | *.c text eol=lf 6 | *.h text eol=lf 7 | 8 | # Denote files that should not be modified. 9 | *.odt binary 10 | *.png binary 11 | 12 | # Visual Studio 13 | *.sln text eol=crlf 14 | *.vcxproj* text eol=crlf 15 | *.vcproj* text eol=crlf 16 | *.suo binary 17 | *.rc text eol=crlf 18 | 19 | # Windows 20 | *.bat text eol=crlf 21 | *.cmd text eol=crlf 22 | -------------------------------------------------------------------------------- /test/elf/compressed-debug-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | command -v dwarfdump >& /dev/null || skip 5 | 6 | cat < /dev/null 20 | readelf --sections $t/exe | grep -Fq .debug_info 21 | -------------------------------------------------------------------------------- /test/elf/execstack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 16 | ! grep -Fq ' .hash' $t/log || false 17 | ! grep -Fq ' .gnu.hash' $t/log || false 18 | -------------------------------------------------------------------------------- /test/elf/relocatable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # OneTBB isn't tsan-clean 5 | nm mold | grep -q '__tsan_init' && skip 6 | 7 | cat < 9 | void hello() { printf("Hello world\n"); } 10 | EOF 11 | 12 | cat <& /dev/null \ 7 | || skip 8 | 9 | cat <& $t/log 17 | grep -q "$t/b.o: incompatible file type: x86_64 is expected but got i386" $t/log 18 | -------------------------------------------------------------------------------- /test/macho/fixup-chains-unaligned-error.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log 19 | grep -Fq '/a.o(__DATA,__data): unaligned base relocation' $t/log 20 | -------------------------------------------------------------------------------- /test/macho/framework.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | mkdir -p $t/Foo.framework 5 | 6 | cat < 8 | void hello() { 9 | printf("Hello world\n"); 10 | } 11 | EOF 12 | 13 | cat <& /dev/null || skip 5 | 6 | cat < 8 | 9 | int main() { 10 | printf("Hello world\n"); 11 | return 0; 12 | } 13 | EOF 14 | 15 | $CC -B. -o $t/exe $t/a.o -Wl,--compress-debug-sections=zlib 16 | dwarfdump $t/exe > $t/log 17 | grep -Fq '.debug_info SHF_COMPRESSED' $t/log 18 | grep -Fq '.debug_str SHF_COMPRESSED' $t/log 19 | -------------------------------------------------------------------------------- /test/elf/version-script10.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'VER1 { foo[12]; }; VER2 {};' > $t/a.ver 5 | 6 | cat < $t/b.s 7 | .globl foo1, foo2, foo3 8 | foo1: 9 | nop 10 | foo2: 11 | nop 12 | foo3: 13 | nop 14 | EOF 15 | 16 | $CC -B. -shared -o $t/c.so -Wl,-version-script,$t/a.ver $t/b.s 17 | readelf --dyn-syms $t/c.so > $t/log 18 | grep -q ' foo1@@VER1$' $t/log 19 | grep -q ' foo2@@VER1$' $t/log 20 | ! grep -q ' foo3@@VER1$' $t/log || false 21 | -------------------------------------------------------------------------------- /test/elf/defsym.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | extern char foo; 7 | extern char bar; 8 | void baz(); 9 | 10 | void print() { 11 | printf("Hello %p %p\n", &foo, &bar); 12 | } 13 | 14 | int main() { 15 | baz(); 16 | } 17 | EOF 18 | 19 | $CC -B. -o $t/exe $t/a.o -pie -Wl,-defsym=foo=16 \ 20 | -Wl,-defsym=bar=0x2000 -Wl,-defsym=baz=print 21 | 22 | $QEMU $t/exe | grep -q '^Hello 0x10 0x2000$' 23 | -------------------------------------------------------------------------------- /test/elf/tls-large-static-image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 10 | extern _Thread_local int x[]; 11 | 12 | int main() { 13 | printf("%d %d %d %d %d\n", x[0], x[1], x[2], x[3], x[10000]); 14 | } 15 | EOF 16 | 17 | $CC -B. -o $t/exe $t/a.o $t/b.o 18 | $QEMU $t/exe | grep -q '^1 2 3 0 5$' 19 | -------------------------------------------------------------------------------- /test/elf/warn-common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 17 | ! grep -Fq 'multiple common symbols' $t/log || false 18 | 19 | $CC -B. -o $t/exe $t/a.o $t/b.o -Wl,-warn-common 2> $t/log 20 | grep -Fq 'multiple common symbols' $t/log 21 | -------------------------------------------------------------------------------- /test/macho/undef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log1 17 | ! grep -q _foo $t/log1 || false 18 | 19 | $CC --ld-path=./ld64 -o $t/exe2 $t/b.a $t/c.o -Wl,-u,_foo 20 | nm $t/exe2 > $t/log2 21 | grep -q _foo $t/log2 22 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/intro/help_support.rst: -------------------------------------------------------------------------------- 1 | .. _help_support: 2 | 3 | Getting Help and Support 4 | ======================== 5 | 6 | 7 | .. container:: section 8 | 9 | 10 | .. rubric:: Getting Technical Support 11 | :class: sectiontitle 12 | 13 | For general information about oneTBB technical support, product 14 | updates, user forums, FAQs, tips and tricks and other support 15 | questions, go to `GitHub issues `_. 16 | -------------------------------------------------------------------------------- /test/elf/defsym-lto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'int main() {}' | $CC -flto -o /dev/null -xc - >& /dev/null \ 5 | || skip 6 | 7 | cat < 9 | 10 | extern void live_func(); 11 | void dead_func() { 12 | printf("OK\n"); 13 | } 14 | 15 | int main() { 16 | live_func(); 17 | } 18 | EOF 19 | 20 | $CC -B. -flto -o $t/exe $t/a.o -Wl,-defsym,live_func=dead_func 21 | 22 | $QEMU $t/exe | grep -q "^OK$" 23 | -------------------------------------------------------------------------------- /test/elf/lto-dso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | echo 'int main() {}' | $CC -flto -o /dev/null -xc - >& /dev/null \ 5 | || skip 6 | 7 | cat <& $t/log1 || false 11 | grep -q 'undefined symbol: no-such-sym' $t/log1 12 | 13 | $CC -B. -shared -o $t/b.o $t/a.o -Wl,-require-defined=no-such-sym -Wl,-noinhibit-exec >& $t/log2 14 | grep -q 'undefined symbol: no-such-sym' $t/log2 15 | -------------------------------------------------------------------------------- /test/elf/relocatable-debug-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # OneTBB isn't tsan-clean 5 | nm mold | grep -q '__tsan_init' && skip 6 | 7 | cat < 9 | void hello() { printf("Hello world\n"); } 10 | EOF 11 | 12 | cat < $t/foo/bar/b.script 13 | INPUT(/foo/bar/libfoo.a) 14 | EOF 15 | 16 | cat < 11 | 12 | extern char foo[5000L * 1000 * 1000]; 13 | extern char bar[1000 * 1000]; 14 | 15 | int main() { 16 | printf("%d %d\n", foo[0], bar[0]); 17 | } 18 | EOF 19 | 20 | $CC -B. -o $t/exe $t/a.o $t/b.o 21 | 22 | $QEMU $t/exe 23 | -------------------------------------------------------------------------------- /test/macho/cstring.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 10 | 11 | extern const char *x; 12 | const char *y = "Hello world\n"; 13 | const char *z = "Howdy world\n"; 14 | 15 | int main() { 16 | printf("%d %d\n", x == y, y == z); 17 | } 18 | EOF 19 | 20 | $CC --ld-path=./ld64 -o $t/exe $t/a.o $t/b.o 21 | $t/exe | grep -q '^1 0$' 22 | -------------------------------------------------------------------------------- /third-party/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/docker/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Requirement 3 | 4 | The `Dockerfile` script requires a version of `docker` >= 17.05 5 | 6 | ## Installing docker 7 | 8 | The official docker install docs use a ppa with a modern version available: 9 | https://docs.docker.com/install/linux/docker-ce/ubuntu/ 10 | 11 | ## How to run 12 | 13 | `docker build -t zstd .` 14 | 15 | ## test 16 | 17 | ``` 18 | echo foo | docker run -i --rm zstd | docker run -i --rm zstd zstdcat 19 | foo 20 | ``` 21 | -------------------------------------------------------------------------------- /test/elf/version-script-search-paths.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | mkdir -p $t/foo/bar 5 | echo 'ver_x { global: *; };' > $t/foo/bar/a.ver 6 | 7 | cat < $t/b.s 8 | .globl foo, bar, baz 9 | foo: 10 | nop 11 | bar: 12 | nop 13 | baz: 14 | nop 15 | EOF 16 | 17 | $CC -B. -shared -o $t/c.so -Wl,-L$t/foo/bar -Wl,-version-script,a.ver $t/b.s 18 | readelf --version-info $t/c.so > $t/log 19 | 20 | grep -Fq 'Rev: 1 Flags: none Index: 2 Cnt: 1 Name: ver_x' $t/log 21 | -------------------------------------------------------------------------------- /test/elf/version-script11.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | VER_X1 { global: *; local: b*; }; 6 | EOF 7 | 8 | cat < $t/log 17 | grep -q 'foo@@VER_X1$' $t/log 18 | ! grep -q ' bar$' $t/log || false 19 | ! grep -q ' baz$' $t/log || false 20 | -------------------------------------------------------------------------------- /test/elf/weak-export-dso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | __attribute__((weak)) int foo(); 8 | 9 | int main() { 10 | printf("%d\n", foo ? foo() : 3); 11 | } 12 | EOF 13 | 14 | $CC -B. -o $t/b.so $t/a.o -shared 15 | $CC -B. -o $t/c.so $t/a.o -shared -Wl,-z,defs 16 | 17 | readelf --dyn-syms $t/b.so | grep -q 'WEAK DEFAULT UND foo' 18 | readelf --dyn-syms $t/c.so | grep -q 'WEAK DEFAULT UND foo' 19 | -------------------------------------------------------------------------------- /test/elf/x86_64_execstack-if-needed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = x86_64 ] || skip 5 | 6 | cat <& /dev/null 14 | readelf --segments -W $t/exe | grep -q 'GNU_STACK.* RW ' 15 | 16 | $CC -B. -o $t/exe $t/a.o -Wl,-z,execstack-if-needed 17 | readelf --segments -W $t/exe | grep -q 'GNU_STACK.* RWE ' 18 | -------------------------------------------------------------------------------- /test/macho/lazy-ptr-optimize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | void *foo() { 8 | return printf; 9 | } 10 | 11 | int main() { 12 | printf("Hello world\n"); 13 | } 14 | EOF 15 | 16 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 17 | $t/exe | grep -q 'Hello world' 18 | 19 | objdump --macho --bind $t/exe | grep -q _printf 20 | 21 | objdump --macho --lazy-bind $t/exe > $t/log 22 | ! grep -q _printf $t/log || false 23 | -------------------------------------------------------------------------------- /test/macho/tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 11 | 12 | int a = 3; 13 | extern _Thread_local int b; 14 | extern _Thread_local int c; 15 | 16 | int main() { 17 | printf("%d %d %d\n", a, b, c); 18 | } 19 | EOF 20 | 21 | $CC --ld-path=./ld64 -o $t/exe $t/a.dylib $t/b.o 22 | $t/exe | grep -q '^3 0 5$' 23 | -------------------------------------------------------------------------------- /test/macho/data-in-code-info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log3 16 | ! grep -q DATA_IN_CODE $t/log3 || false 17 | -------------------------------------------------------------------------------- /test/macho/data-reloc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int a = 5; 8 | int *b = &a; 9 | 10 | void print() { 11 | printf("%d %d\n", a, *b); 12 | } 13 | EOF 14 | 15 | $CC --ld-path=./ld64 -shared -o $t/b.dylib $t/a.o 16 | 17 | cat < 10 | 11 | extern char _DYNAMIC; 12 | extern void *got[]; 13 | 14 | int main() { 15 | printf("%p %p\n", &_DYNAMIC, got[0]); 16 | } 17 | EOF 18 | 19 | $CC -B. -o $t/exe $t/a.o -Wl,-defsym=got=_GLOBAL_OFFSET_TABLE_ -no-pie 20 | $QEMU $t/exe | grep -Eq '^(\S+) \1$' 21 | -------------------------------------------------------------------------------- /test/macho/bind-at-load.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < $t/log 21 | ! grep -q _hello $t/log || false 22 | -------------------------------------------------------------------------------- /test/macho/fixup-chains-os-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe1 $t/a.o -Wl,-platform_version,macos,11,11 12 | otool -l $t/exe1 > $t/log1 13 | ! grep -q LC_DYLD_CHAINED_FIXUPS %t/log1 || false 14 | 15 | $CC --ld-path=./ld64 -o $t/exe2 $t/a.o -Wl,-platform_version,macos,13,13 16 | otool -l $t/exe2 | grep -q LC_DYLD_CHAINED_FIXUPS 17 | -------------------------------------------------------------------------------- /test/macho/fixup-chains.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { printf("Hello world\n"); } 7 | EOF 8 | 9 | cat < 6 | int foo() __attribute__((weak)); 7 | int main() { 8 | printf("%d\n", foo ? foo() : 5); 9 | } 10 | EOF 11 | 12 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < $t/script 12 | GROUP("$t/a.o") 13 | EOF 14 | 15 | $CC -B. -o $t/exe $t/script 16 | $QEMU $t/exe | grep -q 'Hello world' 17 | 18 | $CC -B. -o $t/exe -Wl,-T,$t/script 19 | $QEMU $t/exe | grep -q 'Hello world' 20 | 21 | $CC -B. -o $t/exe -Wl,--script,$t/script 22 | $QEMU $t/exe | grep -q 'Hello world' 23 | -------------------------------------------------------------------------------- /test/elf/rpath.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int main() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | $CC --ld-path=./ld64 -o $t/exe1 $t/a.o -g 12 | nm -pa $t/exe1 | grep -q 'OSO /' 13 | 14 | $CC --ld-path=./ld64 -o $t/exe2 $t/a.o -g -Wl,-oso_prefix,. 15 | nm -pa $t/exe2 | grep -Eq 'OSO out' 16 | 17 | $CC --ld-path=./ld64 -o $t/exe3 $t/a.o -g -Wl,-oso_prefix,"`pwd`/" 18 | nm -pa $t/exe3 | grep -Eq 'OSO out' 19 | -------------------------------------------------------------------------------- /test/macho/print-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | void hello() { 7 | printf("Hello world\n"); 8 | } 9 | EOF 10 | 11 | cat < $t/log 19 | 20 | grep -Eq '/a\.o\t.*libSystem\S+\tu\t_printf' $t/log 21 | grep -Eq '/b\.o\t.*a.o\tu\t_hello' $t/log 22 | -------------------------------------------------------------------------------- /third-party/zstd/build/.gitignore: -------------------------------------------------------------------------------- 1 | # Visual C++ 2 | .vs/ 3 | *Copy 4 | *.db 5 | *.opensdf 6 | *.sdf 7 | *.suo 8 | *.user 9 | *.opendb 10 | 11 | VS2008/bin/ 12 | VS2010/bin/ 13 | VS2010/zwrapbench/ 14 | VS2012/ 15 | VS2013/ 16 | VS2015/ 17 | Studio* 18 | 19 | # CMake 20 | cmake/build/ 21 | CMakeCache.txt 22 | CMakeFiles 23 | CMakeScripts 24 | Testing 25 | Makefile 26 | cmake_install.cmake 27 | install_manifest.txt 28 | compile_commands.json 29 | CTestTestfile.cmake 30 | build 31 | lib 32 | !cmake/lib 33 | !meson/lib 34 | -------------------------------------------------------------------------------- /test/elf/bsymbolic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 13 | 14 | int foo = 3; 15 | int get_foo(); 16 | 17 | int main() { 18 | printf("%d %d\n", foo, get_foo()); 19 | } 20 | EOF 21 | 22 | $CC -B. -no-pie -o $t/exe $t/c.o $t/b.so 23 | $QEMU $t/exe | grep -q '3 4' 24 | -------------------------------------------------------------------------------- /test/elf/gnu-unique.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | command -v $GXX >& /dev/null || skip 5 | 6 | cat < 13 | 14 | inline int foo = 5; 15 | 16 | int main() { 17 | printf("foo=%d\n", foo); 18 | } 19 | EOF 20 | 21 | $CC -B. -o $t/exe $t/a.o $t/b.o 22 | $QEMU $t/exe | grep -q 'foo=5' 23 | -------------------------------------------------------------------------------- /test/elf/push-pop-state.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 20 | grep -Fq a.so $t/log 21 | ! grep -Fq b.so $t/log || false 22 | -------------------------------------------------------------------------------- /common/uuid.cc: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | #include 4 | 5 | namespace mold { 6 | 7 | std::array get_uuid_v4() { 8 | std::array bytes; 9 | 10 | std::random_device rand; 11 | u32 buf[4] = { rand(), rand(), rand(), rand() }; 12 | memcpy(bytes.data(), buf, 16); 13 | 14 | // Indicate that this is UUIDv4 as defined by RFC4122. 15 | bytes[6] = (bytes[6] & 0b00001111) | 0b01000000; 16 | bytes[8] = (bytes[8] & 0b00111111) | 0b10000000; 17 | return bytes; 18 | } 19 | 20 | } // namespace mold 21 | -------------------------------------------------------------------------------- /test/elf/large-max-page-size-strip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # ARM32's strip command crashes on the output of this test for some reason. 5 | [ $MACHINE = arm ] && skip 6 | 7 | strip=$STRIP 8 | command -v $strip >& /dev/null || skip 9 | 10 | cat < 12 | int main() { 13 | printf("Hello world\n"); 14 | } 15 | EOF 16 | 17 | $CC -B. -o $t/exe $t/a.o -pie -Wl,-zmax-page-size=0x200000 18 | $strip $t/exe 19 | $QEMU $t/exe | grep -q 'Hello world' 20 | -------------------------------------------------------------------------------- /test/elf/version-script12.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | { 6 | global: 7 | *; 8 | *foo_*; 9 | local: 10 | *foo*; 11 | }; 12 | EOF 13 | 14 | cat < $t/log 23 | grep -q ' xyz$' $t/log 24 | grep -q ' foo_bar$' $t/log 25 | ! grep -q ' foo$' $t/log || false 26 | -------------------------------------------------------------------------------- /test/elf/warn-unresolved-symbols.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <&1 \ 12 | | grep -q 'undefined symbol:.*foo' 13 | 14 | $CC -B. -o $t/exe $t/a.o -Wl,-warn-unresolved-symbols 2>&1 \ 15 | | grep -q 'undefined symbol:.*foo' 16 | 17 | ! $CC -B. -o $t/exe $t/a.o -Wl,-warn-unresolved-symbols \ 18 | --error-unresolved-symbols 2>&1 \ 19 | | grep -q 'undefined symbol:.*foo' 20 | -------------------------------------------------------------------------------- /test/macho/common-alignment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 11 | #include 12 | 13 | extern int foo; 14 | extern int bar; 15 | 16 | int main() { 17 | printf("%lu %lu\n", (uintptr_t)&foo % 4, (uintptr_t)&bar % 4096); 18 | } 19 | EOF 20 | 21 | $CC --ld-path=./ld64 -o $t/exe $t/a.o $t/b.o 22 | $t/exe | grep -q '^0 0$' 23 | -------------------------------------------------------------------------------- /test/macho/objc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | @interface MyClass : NSObject 7 | @end 8 | @implementation MyClass 9 | @end 10 | EOF 11 | 12 | ar rcs $t/b.a $t/a.o 13 | 14 | cat < $t/log 2>&1 22 | grep -q _OBJC_CLASS_ $t/log 23 | -------------------------------------------------------------------------------- /third-party/xxhash/libxxhash.pc.in: -------------------------------------------------------------------------------- 1 | # xxHash - Extremely fast hash algorithm 2 | # Copyright (C) 2012-2020, Yann Collet, Facebook 3 | # BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) 4 | 5 | prefix=@PREFIX@ 6 | exec_prefix=@EXECPREFIX@ 7 | includedir=${prefix}/@INCLUDEDIR@ 8 | libdir=${exec_prefix}/@LIBDIR@ 9 | 10 | Name: xxhash 11 | Description: extremely fast hash algorithm 12 | URL: http://www.xxhash.com/ 13 | Version: @VERSION@ 14 | Libs: -L${libdir} -lxxhash 15 | Cflags: -I${includedir} 16 | -------------------------------------------------------------------------------- /macho/lto-win32.cc: -------------------------------------------------------------------------------- 1 | #include "lto.h" 2 | #include "mold.h" 3 | 4 | namespace mold::macho { 5 | 6 | template 7 | void load_lto_plugin(Context &ctx) { 8 | Fatal(ctx) << "LTO is not supported on Windows"; 9 | } 10 | 11 | template 12 | void do_lto(Context &ctx) {} 13 | 14 | #ifdef MOLD_ARM64 15 | LTOPlugin::~LTOPlugin() {} 16 | #endif 17 | 18 | using E = MOLD_TARGET; 19 | 20 | template void load_lto_plugin(Context &); 21 | template void do_lto(Context &); 22 | 23 | } // namespace mold::macho 24 | -------------------------------------------------------------------------------- /test/elf/relocatable-no-ehframe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = alpha ] && skip 5 | 6 | # OneTBB isn't tsan-clean 7 | nm mold | grep -q '__tsan_init' && skip 8 | 9 | cat < $t/log1 14 | ! grep -Fq .eh_frame $t/log1 || false 15 | 16 | ./mold --relocatable -o $t/b.o $t/a.o 17 | readelf -WS $t/b.o > $t/log2 18 | ! grep -Fq .eh_frame $t/log2 || false 19 | -------------------------------------------------------------------------------- /test/elf/retain-symbols-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/symbols 12 | foo 13 | baz 14 | EOF 15 | 16 | $CC -B. -o $t/exe $t/a.o -Wl,--retain-symbols-file=$t/symbols 17 | readelf -W --symbols $t/exe > $t/log 18 | 19 | ! grep -qw foo $t/log || false 20 | ! grep -qw bar $t/log || false 21 | ! grep -qw main $t/log || false 22 | 23 | grep -qw baz $t/log 24 | -------------------------------------------------------------------------------- /test/elf/disable-new-dtags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 9 | grep -Eq 'Shared library:.*\blibc\b' $t/log 10 | 11 | readelf -W --dyn-syms --use-dynamic $t/exe > $t/log2 12 | grep -Eq 'FUNC\s+GLOBAL\s+DEFAULT.*UND\s+__libc_start_main' $t/log2 13 | 14 | cat < 16 | 17 | int main() { 18 | printf("Hello world\n"); 19 | } 20 | EOF 21 | -------------------------------------------------------------------------------- /test/elf/ifunc-noplt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | supports_ifunc || skip 5 | 6 | cat < 8 | 9 | __attribute__((ifunc("resolve_foo"))) 10 | void foo(void); 11 | 12 | void hello(void) { 13 | printf("Hello world\n"); 14 | } 15 | 16 | typedef void Fn(); 17 | 18 | Fn *resolve_foo(void) { 19 | return hello; 20 | } 21 | 22 | int main() { 23 | foo(); 24 | } 25 | EOF 26 | 27 | $CC -B. -o $t/exe $t/a.o 28 | $QEMU $t/exe | grep -q 'Hello world' 29 | -------------------------------------------------------------------------------- /test/elf/ifunc-static.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | test_cflags -static || skip 5 | supports_ifunc || skip 6 | 7 | cat < 9 | 10 | void foo() __attribute__((ifunc("resolve_foo"))); 11 | 12 | void hello() { 13 | printf("Hello world\n"); 14 | } 15 | 16 | void *resolve_foo() { 17 | return hello; 18 | } 19 | 20 | int main() { 21 | foo(); 22 | return 0; 23 | } 24 | EOF 25 | 26 | $CC -B. -o $t/exe $t/a.o -static 27 | $QEMU $t/exe | grep -q 'Hello world' 28 | -------------------------------------------------------------------------------- /test/elf/section-align.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <&1 | \ 16 | grep -q 'must be a power of 2' 17 | -------------------------------------------------------------------------------- /test/macho/tls2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # For some reason, this test fails only on GitHub CI. 5 | [ "$GITHUB_ACTIONS" = true ] && { echo skipped; exit; } 6 | 7 | cat < 9 | 10 | _Thread_local int a; 11 | static _Thread_local int b = 5; 12 | static _Thread_local int *c; 13 | 14 | int main() { 15 | b = 5; 16 | c = &b; 17 | printf("%d %d %d\n", a, b, *c); 18 | } 19 | EOF 20 | 21 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 22 | $t/exe | grep -q '^0 5 5$' 23 | -------------------------------------------------------------------------------- /test/macho/weak-def.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | int foo() __attribute__((weak)); 8 | 9 | int foo() { 10 | return 3; 11 | } 12 | 13 | int main() { 14 | printf("%d\n", foo()); 15 | } 16 | EOF 17 | 18 | cat < 12 | 13 | int foo; 14 | int bar = 5; 15 | int baz; 16 | 17 | int main() { 18 | printf("%d %d %d\n", foo, bar, baz); 19 | } 20 | EOF 21 | 22 | $CC -B. -o $t/exe $t/a.o $t/b.o 23 | $QEMU $t/exe | grep -q '0 5 42' 24 | 25 | readelf --sections $t/exe > $t/log 26 | grep -q '.common .*NOBITS' $t/log 27 | -------------------------------------------------------------------------------- /test/elf/debug-macro-section.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/a.h 5 | #define A 23 6 | #define B 99 7 | EOF 8 | 9 | cat < $t/log 22 | ! grep 'DW_MACRO_import -.* 0x0$' $t/log || false 23 | -------------------------------------------------------------------------------- /test/macho/tls-dylib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 13 | 14 | extern _Thread_local int foo; 15 | extern _Thread_local int bar; 16 | 17 | int main() { 18 | printf("%d %d\n", foo, bar); 19 | } 20 | EOF 21 | 22 | $CC --ld-path=./ld64 -o $t/exe $t/c.o $t/b.dylib 23 | $t/exe | grep -q '^0 5$' 24 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Package_Contents.rst: -------------------------------------------------------------------------------- 1 | .. _Package_Contents: 2 | 3 | Package Contents 4 | ================ 5 | 6 | 7 | |full_name| includes dynamic library files and header files for Windows\*, Linux\* 8 | and macOS\* operating systems as described in this section. 9 | 10 | .. toctree:: 11 | :maxdepth: 4 12 | 13 | ../tbb_userguide/Debug_Versus_Release_Libraries 14 | ../tbb_userguide/Scalable_Memory_Allocator 15 | ../tbb_userguide/Windows_OS_ug 16 | ../tbb_userguide/Linux_OS 17 | ../tbb_userguide/Mac_OS -------------------------------------------------------------------------------- /third-party/zstd/lib/libzstd.pc.in: -------------------------------------------------------------------------------- 1 | # ZSTD - standard compression algorithm 2 | # Copyright (C) 2014-2016, Yann Collet, Facebook 3 | # BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) 4 | 5 | prefix=@PREFIX@ 6 | exec_prefix=@EXEC_PREFIX@ 7 | includedir=@INCLUDEDIR@ 8 | libdir=@LIBDIR@ 9 | 10 | Name: zstd 11 | Description: fast lossless compression algorithm library 12 | URL: http://www.zstd.net/ 13 | Version: @VERSION@ 14 | Libs: -L${libdir} -lzstd 15 | Libs.private: @LIBS_PRIVATE@ 16 | Cflags: -I${includedir} 17 | -------------------------------------------------------------------------------- /common/hyperloglog.cc: -------------------------------------------------------------------------------- 1 | // This file implements HyperLogLog algorithm, which estimates 2 | // the number of unique items in a given multiset. 3 | // 4 | // For more info, read 5 | // https://engineering.fb.com/2018/12/13/data-infrastructure/hyperloglog 6 | 7 | #include "common.h" 8 | 9 | #include 10 | 11 | namespace mold { 12 | 13 | i64 HyperLogLog::get_cardinality() const { 14 | double z = 0; 15 | for (i64 val : buckets) 16 | z += pow(2, -val); 17 | return ALPHA * NBUCKETS * NBUCKETS / z; 18 | } 19 | 20 | } // namespace mold 21 | -------------------------------------------------------------------------------- /test/elf/gnu-warning.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | __attribute__((section(".gnu.warning.foo"))) 8 | static const char foo[] = "foo is deprecated"; 9 | 10 | __attribute__((section(".gnu.warning.bar"))) 11 | const char bar[] = "bar is deprecated"; 12 | 13 | int main() { 14 | printf("Hello world\n"); 15 | } 16 | EOF 17 | 18 | # Make sure that we do not copy .gnu.warning.* sections. 19 | $CC -B. -o $t/exe $t/a.o 20 | $QEMU $t/exe | grep -q 'Hello world' 21 | -------------------------------------------------------------------------------- /test/elf/pltgot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | void ignore(void *foo) {} 8 | 9 | void hello() { 10 | printf("Hello world\n"); 11 | } 12 | EOF 13 | 14 | $CC -B. -shared -o $t/b.so $t/a.o 15 | 16 | cat <& /dev/null; then 21 | $CXX -B. -o $t/exe $t/a.o -static -mcmodel=large 22 | $QEMU $t/exe 23 | fi 24 | -------------------------------------------------------------------------------- /test/macho/merge-scope.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 22 | grep -Eq 'NOTYPE\s+GLOBAL DEFAULT\s+[0-9]+ bar' $t/log 23 | grep -Eq 'NOTYPE\s+GLOBAL DEFAULT\s+[0-9]+ _start' $t/log 24 | -------------------------------------------------------------------------------- /test/elf/export-from-exe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/script 9 | bar = foo; 10 | EOF 11 | 12 | $CC -B. -o $t/b.so -shared $t/script $t/a.o 13 | readelf -sW $t/b.so | grep -q 'FUNC .* bar' 14 | 15 | cat < 17 | int bar(); 18 | int main() { 19 | printf("%d\n", bar()); 20 | return 0; 21 | } 22 | EOF 23 | 24 | $CC -B. -o $t/exe $t/c.o $t/b.so 25 | $QEMU $t/exe | grep -q 42 26 | -------------------------------------------------------------------------------- /test/macho/force-load.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 25 | grep -q 'D _foo$' $t/log 26 | ! grep -q 'D _bar$' $t/log || false 27 | -------------------------------------------------------------------------------- /third-party/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake: -------------------------------------------------------------------------------- 1 | function(GetZstdLibraryVersion _header _major _minor _patch) 2 | # Read file content 3 | file(READ ${_header} CONTENT) 4 | 5 | string(REGEX MATCH ".*define ZSTD_VERSION_MAJOR *([0-9]+).*define ZSTD_VERSION_MINOR *([0-9]+).*define ZSTD_VERSION_RELEASE *([0-9]+)" VERSION_REGEX "${CONTENT}") 6 | set(${_major} ${CMAKE_MATCH_1} PARENT_SCOPE) 7 | set(${_minor} ${CMAKE_MATCH_2} PARENT_SCOPE) 8 | set(${_patch} ${CMAKE_MATCH_3} PARENT_SCOPE) 9 | endfunction() 10 | 11 | -------------------------------------------------------------------------------- /test/elf/ar-alignment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <> $t/a.o 9 | 10 | cat < 16 | 17 | int two(); 18 | int three(); 19 | 20 | int main() { 21 | printf("%d\n", two() + three()); 22 | } 23 | EOF 24 | 25 | rm -f $t/d.a 26 | ar rcs $t/d.a $t/a.o $t/b.o 27 | 28 | $CC -B. -o $t/exe $t/c.o $t/d.a 29 | -------------------------------------------------------------------------------- /test/elf/ifunc-static-pie.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | test_cflags -static-pie || skip 5 | supports_ifunc || skip 6 | 7 | cat < 9 | 10 | void foo() __attribute__((ifunc("resolve_foo"))); 11 | 12 | void hello() { 13 | printf("Hello world\n"); 14 | } 15 | 16 | void *resolve_foo() { 17 | return hello; 18 | } 19 | 20 | int main() { 21 | foo(); 22 | return 0; 23 | } 24 | EOF 25 | 26 | $CC -B. -o $t/exe2 $t/a.o -static-pie 27 | $QEMU $t/exe2 | grep -q 'Hello world' 28 | -------------------------------------------------------------------------------- /test/elf/linker-script-relocatable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | # OneTBB isn't tsan-clean 5 | nm mold | grep -q '__tsan_init' && skip 6 | 7 | cat < 9 | void hello() { printf("Hello world\n"); } 10 | EOF 11 | 12 | cat < $t/c.script 18 | 19 | ./mold --relocatable -o $t/d.o $t/c.script 20 | 21 | $CC -B. -o $t/exe $t/d.o 22 | $QEMU $t/exe | grep -q Hello 23 | -------------------------------------------------------------------------------- /test/elf/x86_64_empty-mergeable-section.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 22 | ! grep -Fq .rodata.str1.1 $t/log || false 23 | -------------------------------------------------------------------------------- /test/macho/init-offsets-fixup-chains.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | int foo() { std::cout << "foo "; return 3; } 7 | int x = foo(); 8 | int main() {} 9 | EOF 10 | 11 | # -fixup_chains implies -init_offsets 12 | $CXX --ld-path=./ld64 -o $t/exe1 $t/a.o -Wl,-no_fixup_chains 13 | objdump -h $t/exe1 > $t/log1 14 | ! grep -q __init_offsets $t/log1 || false 15 | 16 | $CXX --ld-path=./ld64 -o $t/exe2 $t/a.o -Wl,-fixup_chains 17 | objdump -h $t/exe2 | grep -q __init_offsets 18 | -------------------------------------------------------------------------------- /third-party/zstd/zlibWrapper/BUCK: -------------------------------------------------------------------------------- 1 | cxx_library( 2 | name='zlib_wrapper', 3 | visibility=['PUBLIC'], 4 | exported_linker_flags=['-lz'], 5 | header_namespace='', 6 | exported_headers=['zstd_zlibwrapper.h'], 7 | headers=[ 8 | 'gzcompatibility.h', 9 | 'gzguts.h', 10 | ], 11 | srcs=glob(['*.c']), 12 | deps=[ 13 | '//lib:zstd', 14 | '//lib:zstd_common', 15 | ], 16 | ) 17 | 18 | cxx_binary( 19 | name='minigzip', 20 | srcs=['examples/minigzip.c'], 21 | deps=[':zlib_wrapper'], 22 | ) 23 | -------------------------------------------------------------------------------- /third-party/tbb/doc/main/tbb_userguide/Basic_Flow_Graph_concepts.rst: -------------------------------------------------------------------------------- 1 | .. _Basic_Flow_Graph_concepts: 2 | 3 | Basic Flow Graph Concepts 4 | ========================= 5 | 6 | .. toctree:: 7 | :maxdepth: 4 8 | 9 | ../tbb_userguide/Graph_Object 10 | ../tbb_userguide/Nodes 11 | ../tbb_userguide/Edges 12 | ../tbb_userguide/Mapping_Nodes2Tasks 13 | ../tbb_userguide/Flow_Graph_Message_Passing_Protocol 14 | ../tbb_userguide/Flow_Graph_Single_Vs_Broadcast 15 | ../tbb_userguide/Flow_Graph_Buffering_in_Nodes 16 | ../tbb_userguide/Flow_Graph_Reservation -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/test/include/linux/errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_ERRNO_H 11 | #define LINUX_ERRNO_H 12 | 13 | #define EINVAL 22 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /test/elf/copyrel-protected.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = ppc64 ] && skip 5 | [ $MACHINE = ppc64le ] && skip 6 | [ $MACHINE = alpha ] && skip 7 | 8 | cat <& $t/log -no-pie || false 21 | grep -Fq 'cannot make copy relocation for protected symbol' $t/log 22 | -------------------------------------------------------------------------------- /test/macho/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 16 | 17 | extern int foo; 18 | extern int bar; 19 | static int baz[10000]; 20 | 21 | int main() { 22 | printf("%d %d %d\n", foo, bar, baz[0]); 23 | } 24 | EOF 25 | 26 | $CC --ld-path=./ld64 -o $t/exe $t/a.o $t/b.o $t/c.o 27 | $t/exe | grep -q '^0 5 0$' 28 | -------------------------------------------------------------------------------- /test/macho/w.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <& $t/log1 16 | 17 | grep -q warning $t/log1 18 | 19 | $CC --ld-path=./ld64 -shared -o $t/d.so $t/b.so $t/c.o \ 20 | -Wl,-application_extension -Wl,-w >& $t/log2 21 | 22 | ! grep -q warning $t/log2 || false 23 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/test/include/linux/limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_LIMITS_H 11 | #define LINUX_LIMITS_H 12 | 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/test/include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_STDDEF_H 11 | #define LINUX_STDDEF_H 12 | 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /test/elf/ifunc-export.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | supports_ifunc || skip 5 | 6 | cat < 8 | 9 | __attribute__((ifunc("resolve_foobar"))) 10 | void foobar(void); 11 | 12 | void real_foobar(void) { 13 | printf("Hello world\n"); 14 | } 15 | 16 | typedef void Func(); 17 | 18 | Func *resolve_foobar(void) { 19 | return real_foobar; 20 | } 21 | EOF 22 | 23 | $CC -B. -shared -o $t/b.so $t/a.o 24 | readelf --dyn-syms $t/b.so | grep -Eq '(IFUNC|: 10)\s+GLOBAL DEFAULT.* foobar' 25 | -------------------------------------------------------------------------------- /test/elf/version-script4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/a.ver 5 | { 6 | global: 7 | extern "C++" { 8 | foo::bar; 9 | }; 10 | 11 | local: *; 12 | }; 13 | EOF 14 | 15 | cat < $t/log 29 | grep -Fq _ZN3foo3barE $t/log 30 | ! grep -Fq ' bar' $t/log || false 31 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/test/include/linux/printk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_PRINTK_H 11 | #define LINUX_PRINTK_H 12 | 13 | #define pr_debug(...) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /test/elf/dso-undef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log || false 22 | grep -q 'cannot link object files with different floating-point ABI' $t/log 23 | -------------------------------------------------------------------------------- /test/elf/symbol-version2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/b.version 13 | TEST { global: foo; }; 14 | EOF 15 | 16 | $CC -B. -o $t/c.so -shared $t/a.o -Wl,--version-script=$t/b.version 17 | readelf -W --dyn-syms $t/c.so > $t/log 18 | 19 | grep -q ' foo@TEST$' $t/log 20 | grep -q ' bar@TEST$' $t/log 21 | grep -q ' bar1$' $t/log 22 | ! grep -q ' foo@@TEST$' $t/log || false 23 | -------------------------------------------------------------------------------- /test/elf/version-script15.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat <<'EOF' > $t/a.ver 5 | { 6 | local: 7 | *; 8 | global: 9 | [abc][^abc][^\]a-zABC]; 10 | }; 11 | EOF 12 | 13 | cat < $t/log 23 | grep -q ' azZ$' $t/log 24 | grep -q ' czZ$' $t/log 25 | ! grep -q ' azC$' $t/log || false 26 | ! grep -q ' aaZ$' $t/log || false 27 | -------------------------------------------------------------------------------- /test/macho/dylib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | char world[] = "world"; 7 | 8 | char *hello() { 9 | return "Hello"; 10 | } 11 | EOF 12 | 13 | $CC --ld-path=./ld64 -o $t/b.dylib -shared $t/a.o 14 | 15 | cat < 17 | 18 | char *hello(); 19 | extern char world[]; 20 | 21 | int main() { 22 | printf("%s %s\n", hello(), world); 23 | } 24 | EOF 25 | 26 | $CC --ld-path=./ld64 -o $t/exe $t/c.o $t/b.dylib 27 | $t/exe | grep -q 'Hello world' 28 | -------------------------------------------------------------------------------- /third-party/rust-demangle/test-harness/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let src = "../rust-demangle.c"; 3 | let header = "../rust-demangle.h"; 4 | println!("cargo:rerun-if-changed={}", src); 5 | println!("cargo:rerun-if-changed={}", header); 6 | 7 | cc::Build::new() 8 | .file("../rust-demangle.c") 9 | .flag_if_supported("-std=c99") 10 | .flag_if_supported("-pedantic") 11 | .warnings(true) 12 | .warnings_into_errors(true) 13 | .flag_if_supported("-Werror=uninitialized") 14 | .compile("rust-demangle"); 15 | } 16 | -------------------------------------------------------------------------------- /test/elf/link-order.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | 7 | char msg1[] = "Hello world"; 8 | char msg2[] = "Howdy world"; 9 | 10 | void hello() { 11 | printf("%s\n", msg1); 12 | } 13 | 14 | void howdy() { 15 | printf("%s\n", msg2); 16 | } 17 | 18 | int main() { 19 | hello(); 20 | } 21 | EOF 22 | 23 | $CC --ld-path=./ld64 -o $t/exe $t/a.o -Wl,-dead_strip 24 | $t/exe | grep -q 'Hello world' 25 | otool -tVj $t/exe > $t/log 26 | grep -q 'hello:' $t/log 27 | ! grep -q 'howdy:' $t/log || false 28 | -------------------------------------------------------------------------------- /test/macho/dlinfo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | #include 7 | 8 | int main(int argc, char **argv) { 9 | Dl_info info; 10 | 11 | if (!dladdr((char *)main + 4, &info)) { 12 | printf("dladdr failed\n"); 13 | return 1; 14 | } 15 | 16 | printf("fname=%s fbase=%p sname=%s saddr=%p\n", 17 | info.dli_fname, info.dli_fbase, info.dli_sname, info.dli_saddr); 18 | return 0; 19 | } 20 | EOF 21 | 22 | $CC --ld-path=./ld64 -o $t/exe $t/a.o 23 | $t/exe | grep -q sname=main 24 | -------------------------------------------------------------------------------- /third-party/zstd/programs/.gitignore: -------------------------------------------------------------------------------- 1 | # local binary (Makefile) 2 | zstd 3 | zstd32 4 | zstd4 5 | zstd-compress 6 | zstd-decompress 7 | zstd-frugal 8 | zstd-small 9 | zstd-nolegacy 10 | zstd-dictBuilder 11 | zstd-dll 12 | 13 | # Object files 14 | *.o 15 | *.ko 16 | default.profraw 17 | have_zlib 18 | 19 | # Executables 20 | *.exe 21 | *.out 22 | *.app 23 | 24 | # Default result files 25 | dictionary 26 | grillResults.txt 27 | _* 28 | tmp* 29 | *.zst 30 | result 31 | out 32 | 33 | # fuzzer 34 | afl 35 | 36 | # Misc files 37 | *.bat 38 | !windres/generate_res.bat 39 | dirTest* 40 | -------------------------------------------------------------------------------- /test/elf/color-diagnostics.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 10 | ! grep -q $'\033' $t/log || false 11 | 12 | ! ./mold -o $t/exe $t/a.o --color-diagnostics=always 2> $t/log 13 | grep -q $'\033' $t/log 14 | 15 | ! ./mold -o $t/exe $t/a.o --color-diagnostics=never 2> $t/log 16 | ! grep -q $'\033' $t/log || false 17 | 18 | ! ./mold -o $t/exe $t/a.o --color-diagnostics=auto 2> $t/log 19 | ! grep -q $'\033' $t/log || false 20 | -------------------------------------------------------------------------------- /test/elf/run-clang.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ "$CC" = cc ] || skip 5 | 6 | # ASAN doesn't work with LD_PRELOAD 7 | nm mold-wrapper.so | grep -q '__[at]san_init' && skip 8 | 9 | clang --version >& /dev/null || skip 10 | 11 | cat <<'EOF' | $CC -xc -c -o $t/a.o - 12 | #include 13 | 14 | int main() { 15 | printf("Hello\n"); 16 | return 0; 17 | } 18 | EOF 19 | 20 | LD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=`pwd`/mold \ 21 | clang -no-pie -o $t/exe $t/a.o -fuse-ld=/usr/bin/ld 22 | readelf -p .comment $t/exe > $t/log 23 | grep -q '[ms]old' $t/log 24 | -------------------------------------------------------------------------------- /test/elf/visibility.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < $t/log 23 | ! grep -Fq foo $t/log || false 24 | -------------------------------------------------------------------------------- /test/macho/comdat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | cat < 6 | struct T { 7 | T() { std::cout << "foo "; } 8 | }; 9 | T x; 10 | EOF 11 | 12 | cat < 14 | struct T { 15 | T() { std::cout << "foo "; } 16 | }; 17 | T y; 18 | EOF 19 | 20 | cat < 22 | int main() { 23 | std::cout << "bar\n"; 24 | } 25 | EOF 26 | 27 | $CXX --ld-path=./ld64 -o $t/exe $t/a.o $t/b.o $t/c.o 28 | $t/exe | grep -q '^foo foo bar$' 29 | -------------------------------------------------------------------------------- /third-party/zstd/contrib/linux-kernel/test/include/linux/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2021, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_TYPES_H 11 | #define LINUX_TYPES_H 12 | 13 | #include 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /test/elf/aarch64_range-extension-thunk-disassembly.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . $(dirname $0)/common.inc 3 | 4 | [ $MACHINE = aarch64 ] || skip 5 | 6 | cat < 8 | 9 | void fn1(); 10 | void fn2(); 11 | 12 | __attribute__((section(".low"))) void fn1() { fn2(); } 13 | __attribute__((section(".high"))) void fn2() { fn1(); } 14 | 15 | int main() { 16 | fn1(); 17 | } 18 | EOF 19 | 20 | $CC -B. -o $t/exe $t/a.o \ 21 | -Wl,--section-start=.low=0x10000000,--section-start=.high=0x20000000 22 | 23 | $OBJDUMP -dr $t/exe | grep -Fq ':' 24 | --------------------------------------------------------------------------------