Commit Graph
33 Commits
Author SHA1 Message Date
Nikita Smith fd6e2bb6b2 radlink: relax rules for relocations pointing into removed associative sections 2026-09-10 14:28:34 -07:00
Nikita Smith 40c1ac39ba radlink: set target section offset so COMDATs data offsets contribute to the color too 2026-09-10 14:28:33 -07:00
Nikita Smith da23fa1607 msf: update msf_header_matches_saved_extent
* changed test to apply full page allocation pattern in a stream
* added new test cases for the page allocation pattern
* bugfix stream growth logic
2026-09-10 14:28:33 -07:00
Nikita Smith 1603bcf11e tests: make determ_test artifacts reproducible 2026-09-10 14:28:32 -07:00
Henrik Karlsson 8649b28865 radlink: derive MSF header page count from serialized extent 2026-09-10 14:28:32 -07:00
Nikita Smith 6f824e4b09 minor cleanups
* updated the comments
* simplified the test
2026-09-10 14:28:31 -07:00
Henrik Karlsson 3093f23de8 radlink: satisfy default-library names with explicitly supplied paths 2026-09-10 14:28:31 -07:00
Nikita Smith 5fe1bac74e test big obj generation 2026-09-10 14:28:28 -07:00
Nikita Smith e8aaf00629 prune dead static imports with /OPT:REF 2026-08-25 00:10:50 -07:00
Nikita Smith 5894d3eaa2 count merged BSS in initialized data size 2026-08-25 00:10:50 -07:00
Nikita Smith d1171dcabb fix PE initialized data size 2026-08-25 00:10:30 -07:00
Nikita Smith c9acc3f1ad match LINK import group placement 2026-08-25 00:10:29 -07:00
Nikita Smith 0a328898d0 sort contributions after section merges 2026-08-24 22:27:27 -07:00
Nikita Smith ad8fe1c61e implement LINK-compatible map output 2026-08-24 22:27:26 -07:00
Nikita Smith 736a6c63a5 remove per-section linker side arrays 2026-08-24 22:27:21 -07:00
Nikita Smith 646ff97b3c centralize canonical COFF object data 2026-08-24 22:27:20 -07:00
Nikita Smith cf67aca7da keep COFF input metadata immutable 2026-08-24 22:27:19 -07:00
Nikita Smith 993df2d9d8 pack CodeView leaf refs and share radix sort
centralize leaf ref index casts
2026-08-24 22:27:17 -07:00
Nikita Smith 2d827ac15d make const data eligible for ICF 2026-07-27 14:47:28 -07:00
Nikita Smith c96c9620d0 WIP PDB Writer Thread 2026-07-27 14:47:26 -07:00
Nikita Smith fcee35f3e9 rename RAD_TypeHashAlg; extend /RAD_DEBUG_TYPE_HASH with XXHASH option 2026-07-27 14:47:25 -07:00
Nikita Smith 97a1fe6006 radix sort PSI address map 2026-07-27 14:47:24 -07:00
Nikita Smith 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 Smith 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 Smith 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 Smith 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 Smith 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 Smith 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 Smith 956df5527a switch type server from PDB to a custom file format (RRT) 2026-06-16 17:22:50 -07:00
Nikita Smith c030488814 fallback on PCH signature when file path match fails 2026-06-13 06:20:40 -07:00
Nikita Smith 7d8aa18e4d make debug hash section tests error number agnostic 2026-06-12 13:54:29 -07:00
Nikita Smith 541d3afefa WIP /RAD_TYPE_SERVER
env vars

replace HashTable with HashMap in config
2026-06-02 12:11:12 -07:00
Ryan Fleury 4e72553006 promote test-definition concepts from torture to base layer; reorganize tests to be nested in their respective layer; eliminate 't_group', just use containing layer 2026-06-02 12:11:01 -07:00