[lld][MachO] Pool relocation storage per input section
Compilers split input sections into many subsections, and each subsection currently grows its own relocation vector. In a Chromium link, that means 3.41 million small allocations for 51.3 million relocations. Allocation dominates parallel relocation parsing: glibc grows worker arenas with `mprotect`, and the workers contend on the process's `mmap_lock`.
## Design
I allocate one relocation array per input Section and let its subsections borrow slices of it. Chromium then needs 82,210 arrays. The arrays come from a thread-local bump allocator, which this PR adds to `lld/Common`: the existing thread-local allocators are typed and construct and destroy their elements, which a buffer filled by placement does not want.
Compilers emit relocations by descending address, so each subsection's relocations arrive one after another. `ld -r` output may not be sorted: the parser checks the order as it goes, and on the first out-of-order relocation it sorts the section's relocations and parses them again, holding back diagnostics until it can no longer start over. A slice that later passes append to moves to a buffer of its own.
The parser fills each array from the back, so relocations end up in ascending address order, both across subsections and within each one. A SUBTRACTOR still precedes its paired UNSIGNED. Upstream stores each subsection's relocations in descending order, and the thunk pass walks them in reverse to visit branches by ascending address. With ascending storage, the relocation scan and the thunk pass both read a section's relocations front to back, and the thunk pass becomes a forward loop.
Passes that act on relocations in storage order now do so in ascending address order within a subsection. GOT, stub and binding entries are therefore created in source order, as are undefined-symbol diagnostics and `-why_live` output. The affected tests are updated; only the order of entries changes.
## Measurements
Both tables compare this PR, merged into `main` at 950baabb7fdf, against that commit. They give means and cbdr 95% confidence intervals over 30 interleaved paired rounds at the default thread count.
Linux (AMD Ryzen 7 7700):
[36 lines not shown]
[mlir][tosa] Move reshape num elements check into verifier (#243920)
In https://github.com/llvm/llvm-project/pull/239046 the element count
check was moved to the validation pass as part of the migrations for
https://github.com/llvm/llvm-project/issues/233457. However, the check
is not dependent on the values of the 'shape' input, therefore making
the check local to the operations and, as a result, valid for checking
in the verifier. This ensures invalid IR is detected earlier.
Small cleanup in validation to align error if comment with the
specification for easier reference.
mail/rspamd: Update to 4.3.1
Adds the dynconf framework: runtime overrides of plugin options,
actions and scores with file and Redis backends, managed through
rspamadm configdump --dynamic and new controller endpoints. Selected
symbols can be timed on every scan and stored in ClickHouse, and RBL
rules get a per-message cap on DNS requests.
Fixes include all DKIM results being hidden by one unresolved
signature, SPF reporting a malformed domain as a DNS failure, external
scanners passing error replies as clean, forked workers drawing the
same random sequences, and use-after-free bugs in lua_tcp.
Incompatible changes: the legacy dynamic_conf file and Redis hash are
imported into dynconf once (the file is renamed), time intervals are
parsed strictly ("500ms" is now milliseconds, unknown units are
rejected), and the order of unsorted task URLs differs between
processes.
[4 lines not shown]
japanese/fcitx5-hazkey: fix build on powerpc64le
The bundled llama.cpp also redefines bool to _Bool on POWER9, which
breaks the C++ files. Pull in the upstream fix for that too.
misc/pytorch: fix packaging on !amd64
The 2.15.0 update regenerated pkg-plist on amd64 and dropped the
%%AMD64%% markers again. The bundled oneDNN and ittapi files are only
installed on amd64.
misc/mcp-inspector: fix powerpc64* distinfo
bae77909aea6 replaced them with copies of distinfo.aarch64, so every
entry pointed to mcp-inspector/aarch64 and fetch failed. Restore the
files from 319a0707ad01.
Approved by: portmgr (blanket)
security/dropbear: fix GROUP1 and SHA1_96 options, add TRACE
GROUP1 and SHA1_96 are disabled by default upstream, so enabling them
did nothing. SHA1_96 also needs SHA1, otherwise connections using it
die with "HMAC error". MD5 is gone upstream, so remove it.
TRACE builds in the debug output enabled with -v.
PR: 300936
Submitted by: Toshimichi Masubuchi <t.masub at gmail.com>
sysutils/rust-coreutils: update to 0.13.0
Install manual pages and shell completions. Install libstdbuf.so
instead of having stdbuf unpack it to a temporary directory on every
run. Add NLS option and CPE information. Drop the locale patch, it's
upstream now.
Changelog: https://github.com/uutils/coreutils/releases/tag/0.13.0
devel/hs-git-annex: fix build on powerpc64*
blake3, which git-annex now uses, builds its x86 SIMD code on every
architecture. Backport hs-blake3 2a3b564ad9, which only builds it on x86.
lang/gnustep-base: fix NSDate on big-endian
Small NSDate objects are stored as tagged pointers using bit-fields laid
out for little-endian. On powerpc64 the tag ends up in the wrong bits, so
depending on the current time dates turn into bogus pointers and GNUstep
tools like autogsdoc crash. Pull the upstream fix.
Approved by: portmgr (blanket)
[DAG] isGuaranteedNotToBeUndefOrPoison - always handle Constant/ConstantFP nodes (#245062)
Similar to the other DAG value tracking methods - always process
Constant/ConstantFP nodes, don't limit them to MaxRecursionDepth like
heavy nodes.
[libc] Prepare a new armv6m-none-eabi.cmake to run tests (#243454)
Create a new CMake cache file in a dedicated Arm-specific folder for
testing configurations. This specific testing configuration is for
Armv6-M.
All the configurations are based on what Arm Toolchain for Embedded uses
for its downstream testing, and are known to work.