Commit Graph
4438 Commits
Author SHA1 Message Date
Ryan Fleury aa94eb6901 fix find-text-forward 2026-07-27 14:47:38 -07:00
Ryan Fleury 65f5b81d49 fix incorrect multiline hotkey mode setting in text view 2026-07-27 14:47:38 -07:00
Ryan Fleury a27dc03ca2 start meta tokens correctly 2026-07-27 14:47:37 -07:00
Ryan Fleury e55fa733fd mostly restore existing read-only functionality, keep existing patching infrastructure but do not use 2026-07-27 14:47:36 -07:00
Ryan Fleury 9ed2e020e8 checkpoint 2026-07-27 14:47:36 -07:00
Ryan Fleury f247d3c52d fix chunk-up/down 2026-07-27 14:47:35 -07:00
Ryan Fleury 150a2247bb fix page-up 2026-07-27 14:47:34 -07:00
Ryan Fleury 604fe35d91 fix navigations when zero-delta-on-select is enabled in multi-line controls; thread line break parsing 2026-07-27 14:47:34 -07:00
Ryan Fleury 36da346590 binary search for off -> line num 2026-07-27 14:47:33 -07:00
Ryan Fleury c8dae72968 cleanup around single vs. multiline text mutation controls 2026-07-27 14:47:32 -07:00
Ryan Fleury 315e0672d3 checkpoint on text patches 2026-07-27 14:47:31 -07:00
Ryan Fleury bb85f6f692 text patches: checkpoint 2026-07-27 14:47:31 -07:00
Nikita SmithandRyan Fleury cd82268a07 polish ICF section color-space picker 2026-07-27 14:47:30 -07:00
Nikita SmithandRyan Fleury 4235fa85b4 search small libraries on the main thread to reduce wait times in barriers 2026-07-27 14:47:29 -07:00
Nikita SmithandRyan Fleury db0151c3e2 parallel radix sort and coalesce adjacent section contribs 2026-07-27 14:47:29 -07:00
Nikita SmithandRyan Fleury bbb136c9ea radix sort pass over section contribs 2026-07-27 14:47:28 -07:00
Nikita SmithandRyan Fleury 2d827ac15d make const data eligible for ICF 2026-07-27 14:47:28 -07:00
Nikita SmithandRyan Fleury c629c5b10e refactor PDB background file output
Add a shared multi-file background writer with lazy worker startup.
Represent PDB output as a file artifact, keep PDB output state internal
to the builder, and overlap deferred PDB writers with the file maps release.
2026-07-27 14:47:27 -07:00
Nikita SmithandRyan Fleury c96c9620d0 WIP PDB Writer Thread 2026-07-27 14:47:26 -07:00
Nikita SmithandRyan Fleury a73e3e0790 use cycle tracking only on weak and undefined symbols
* profile of /OPT:REF shows that early push to seen_hm dominates the pass;
  cost: 74.23ms -> 6.81ms (-90.8%)
2026-07-27 14:47:26 -07:00
Nikita SmithandRyan Fleury fcee35f3e9 rename RAD_TypeHashAlg; extend /RAD_DEBUG_TYPE_HASH with XXHASH option 2026-07-27 14:47:25 -07:00
Nikita SmithandRyan Fleury 97a1fe6006 radix sort PSI address map 2026-07-27 14:47:24 -07:00
Nikita SmithandRyan Fleury 134cfce799 merge debug info and llvm_addrsig finders into lnk_obj_initer to reduce
time spent in barrier_wait
2026-07-27 14:47:24 -07:00
Nikita SmithandRyan Fleury 4cc0f4813b WIP cache COFF symbol interp 2026-07-27 14:47:23 -07:00
Nikita SmithandRyan Fleury a779d3f1a5 WIP assigned symbols 2026-07-27 14:47:22 -07:00
Nikita SmithandRyan Fleury 493241c1da WIP light COFF symbol table parse 2026-07-27 14:47:22 -07:00
Nikita SmithandRyan Fleury bd2cbfc127 gate for page pre-faulting on windows 2026-07-27 14:47:21 -07:00
Nikita SmithandRyan Fleury cb6443ce4e release file maps before exit in parallel before exit 2026-07-27 14:47:20 -07:00
Nikita SmithandRyan Fleury 58b5b3d92d search chunks only grow while resolving libraries, so revisit only symbols appended since this library's last search 2026-07-27 14:47:20 -07:00
Nikita SmithandRyan Fleury b84d32d9fb optimize ICF refinement and COMDAT handling
Cache immutable section and relocation metadata before color refinement,
then reuse generated-tagged concurrent tables.

Parallelize grouping and fold marking.

Include associative COMDAT descendants in contribution hashes and
canonicalize relocation targets to selected COMDAT leaders.
2026-07-27 14:47:19 -07:00
Nikita SmithandRyan Fleury abfea7c33a update CHANGELOG.md 2026-07-27 14:47:18 -07:00
Nikita SmithandRyan Fleury d1b0bc0af7 refine COMDAT symlink handling
Stop treating COMDAT section-definition symbols as symlink anchors.
Keep zero-sized COMDAT sections only when they have an owned symlink,
so referenced empty COMDAT symbols still resolve while marker sections
like .gsspr/.gssep are skipped.

Update COMDAT/ICF tests to cover zero-sized COMDAT relocation behavior
and the adjusted removed-COMDAT handling.
2026-07-27 14:47:18 -07:00
Nikita SmithandRyan Fleury 8ec931d724 fix import data directory bounds
Include the null import descriptor in the import directory size and derive
the IAT directory RVA from the first import descriptor of the start of
the .idata contribution.
2026-07-27 14:47:17 -07:00
Nikita SmithandRyan Fleury 048b93b166 remove empty sections if it does not have any section contributions too 2026-07-27 14:47:17 -07:00
Nikita SmithandRyan Fleury f3d2792fb8 simplify COMDAT leader symbol patching
Collapse COMDAT leader symbol patching to a single raw-symbol write path
and make the same-object versus cross-object symlink handling explicit.
Preserve public symbol offsets for ICF folds while avoiding cross-object
section number rewrites.
2026-07-27 14:47:16 -07:00
Nikita SmithandRyan Fleury 7197398f31 split external-symbol handling from section-definition fallbacks 2026-07-27 14:47:15 -07:00
Nikita SmithandRyan Fleury d790412219 refactor radlink section gathering
Fold section definition and contributions collection into a worker-count
task with barriers around the serial merge. Share section filtering
between both phases and keep zero-size COMDATs so offset-zero symbols
still map to a section.
2026-07-27 14:47:15 -07:00
Nikita SmithandRyan Fleury b77c958b5f add DEF, GUARD, and SECTION config support
Parse /DEF, /GUARD, and /SECTION switches, including DEF
handling for NAME/LIBRARY, BASE, VERSION, HEAPSIZE, STACKSIZE, EXPORTS,
and SECTIONS.

Store section directives in linker config and apply them consistently
when gathering object sections when pushing/searching image sections.

Pull load-config symbols for /GUARD without setting GUARD_CF until guard
tables are emitted.

Add coverage for DEF file parity, section directives, and guard
load-config handling.
2026-07-27 14:47:14 -07:00
Nikita SmithandRyan Fleury 35722f2a01 handle BOMs in linker response files
Decode UTF-16LE response files with a BOM and strip UTF-8 BOMs before
parsing arguments. Add coverage for UTF-16 response-file input.
2026-07-27 14:47:13 -07:00
Nikita SmithandRyan Fleury 25430ea522 assign COMDAT symlinks after weak symbol replacement
Previously, COMDAT symlinks were assigned as each object batch was loaded.
Weak symbol replacement could later change the selected leader, leaving
objects from earlier passes with stale COMDAT leader refs. Library search
does not need symlinks to be valid, so solve this by doing a single sweep
assignment of COMDAT leaders after a fixed point is found.
2026-07-27 14:47:13 -07:00
Nikita SmithandRyan Fleury 65541eaf91 LLVM BC magic sniffer 2026-07-27 14:47:12 -07:00
Nikita SmithandRyan Fleury afd454b41f fix DBI SC image-section range mapping
Log and skip section contributions that fail to map into the linked image.
Keep a file-range-to-section-number map so compact file ranges produce the
correct DBI section numbers.
2026-07-27 14:47:12 -07:00
Nikita SmithandRyan Fleury 541727b819 debug log unresolved symbols specified in .llvm_addrsig 2026-07-27 14:47:11 -07:00
Nikita SmithandRyan Fleury 3eeae8d365 enable binary for stdout and stderr to bypass CRLF mangling issues in
captured output under build systems
2026-07-27 14:47:10 -07:00
Nikita SmithandRyan Fleury 83c55aebdc check that __imp_* archive symbols are import members before applying
import queue flags to the member
2026-07-27 14:47:09 -07:00
Nikita SmithandRyan Fleury 941b8a011e duplicate identical search aliases are not an error case 2026-07-27 14:47:09 -07:00
Nikita SmithandRyan Fleury d34e1a7802 implement /OPT:ICF
Add identical COMDAT folding using a color-refinement over foldable
read-only sections. Hash section contents, relocation targets, and target
colors until partitions stabilize, then redirect folded COMDAT symlinks
and discard duplicate sections.

Honor .llvm_addrsig via /LLVM_ADDRSIG so address-significant sections
are not folded, keep separate color space for code, unwind info, and
MSVC vftables, and update COMDAT symbol/section mapping after folding.

Add linker tests covering function folding, relocation-sensitive folds,
alignment, color-space separation, symlink chains, .llvm_addrsig,
pdata/xdata, and C++ ICF cases.
2026-07-27 14:47:08 -07:00
Nikita SmithandRyan Fleury 1ea9fae835 debug report live stats after /OPT:REF pass 2026-07-27 14:47:08 -07:00
Ryan Fleury 62328cea3f checkpoint on text patches 2026-07-27 14:47:07 -07:00
Ryan Fleury 20cd955cc9 eval2: first pass at type_key -> string path 2026-07-27 14:47:06 -07:00