[lld-macho] Include ICF safe thunks in balanced partitioning (#212096) Mach-O balanced partitioning currently discovers candidate sections by walking the input-file section graph. In `--icf=safe_thunks` mode, address-significant functions can instead be emitted as linker-created thunk sections after that graph has been built. A temporal-profile name then resolves to the dead folded input while the callable section present in the final binary is never eligible for BP ordering. Factor candidate collection into a helper, then inspect the final `inputSections` set for sections containing a `Defined` symbol marked `ICFFoldKind::Thunk`. This makes emitted ICF safe thunks visible while keeping unrelated synthetic metadata outside BP. The new arm64 regression folds a profiled address-significant function into a 4-byte safe thunk and verifies both the BP startup count and final symbol order. Without the change, BP orders zero startup sections for that profile; with the change it orders the emitted thunk first. GitOrigin-RevId: 25d130fc7efffd4d6b87ad9ab5193ce10cf37edb
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.