After PR #150846 changed MCFragment to use fixed 16KB blocks, large sections like .debug_names produce thousands of fragments. The DW_IDX_parent emission called emitLabelDifference(ParentSymbol, EntryPool, 4) per entry, which fell through to attemptToFoldSymbolOffsetDifference's O(n) fragment walk when symbols were in different fragments. This caused O(entries * fragments) quadratic behavior, regressing dsymutil on large binaries like clang. Fix by pre-computing byte offsets from EntryPool for each entry in a first pass, then emitting emitInt32(offset) directly for DW_IDX_parent instead of symbol differences. This also eliminates per-entry MCSymbol allocation that was only needed for parent references. Fix #188376
30 KiB
30 KiB