Commit Graph
116 Commits
Author SHA1 Message Date
Nikita Smith dcea1b49a1 radlink: update /BRepro and /RAD_LOG help lines 2026-09-10 14:28:27 -07:00
Nikita Smith ad8fe1c61e implement LINK-compatible map output 2026-08-24 22:27:26 -07:00
Nikita Smith 109180131a bugfix forwarder export detection 2026-08-21 10:56:16 -07:00
Nikita Smith 4eae2a2ecc clang fixes 2026-08-21 10:56:14 -07:00
Nikita Smith efe2a78019 type command-line option values
* pass argv inputs directly to the config command line
* define each option's value type in the switch table so comma splitting
  is applied only to list typed switches
2026-08-17 22:55:58 -07:00
Nikita Smith 76e267482f improve handling of the response files
* reject cyclic response files
* prepend and append command line defined in LINK and _LINK_
* reduce config wrappers
2026-08-17 18:21:05 -07:00
Nikita Smith 72c3dfd30c improve diagnostics for the missing entry point 2026-08-13 15:02:19 -07:00
Nikita Smith 6a34ee168f update /OPT:ICF
* pass over fold stats diagnostic
* implement /RAD_ICF_HASH_KIND
* rename color space -> scope
2026-08-13 15:02:18 -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 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 4daefad31e map GNU lib extension 2026-06-23 12:32:52 -07:00
Nikita Smith 765b61152d sort import library member refs by input index 2026-06-23 12:32:52 -07:00
Nikita Smith 05a024ddb3 remove /RAD_ALT_PCH_DIR
* Instead of matching on file path in LF_PRECOMP, loop over the objects
  with .debug$P and probe leaves at the index specified in LF_PRECOMP.
  If signatures match, use the PCH.
* Demote LNK_Error_PrecompObjNotFound to a recoverable error.
2026-06-19 20:12:27 -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 3f6d5df899 apply merge fixes 2026-06-12 11:53:15 -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
Nikita Smith 4ff6d2cc6c use the make library to generate RDI 2026-06-02 12:10:49 -07:00
Nikita Smith 58fc57f6a3 torture_dbg: reuse Windows env-var expander in the harness compile/link/launch steps 2026-06-02 12:10:28 -07:00
Ryan Fleury aea4a4ff9d eliminate os_core, move into base; eliminate regs, move into arch abstraction layer, define x64 regs in x64 layer; move win32 backend for os core (now base) functionality to top-level win32 layer 2026-05-08 15:21:21 -07:00
Nikita Smith 7ed5977d20 improve determinism test speed 2026-04-23 17:18:24 -07:00
Nikita Smith 435b5183fb warn only if override subsystem is different 2026-04-22 18:38:03 -07:00
Nikita Smith a2aab5967c add support for /DEBUG:GHASH 2026-04-22 09:30:45 -07:00
Nikita Smith 0a791e5876 add support for LLVM ghash sections 2026-04-20 10:39:50 -07:00
Nikita Smith 89a5acba2c WIP stripped PDB 2026-04-10 17:02:04 -07:00
Nikita Smith e54bef58df implement /INFERASANLIBS 2026-04-06 22:18:26 -07:00
Nikita Smith 3bb8983461 implement /WHOLEARCHIVE 2026-04-06 14:35:46 -07:00
Nikita Smith 8a1203ed35 add mutex around fprintf to linearize log 2026-04-06 12:04:31 -07:00
Nikita Smith 09e37a6a2e report unknown ignore codes only in debug builds 2026-02-13 22:10:42 -08:00
Nikita Smith fbc3cbd6eb polish help in radlink 2026-02-13 19:17:53 -08:00
Nikita Smith 0015e52d3c add /FAILIFMISMATCH 2026-02-05 19:45:34 -08:00
Nikita Smith 4ab89cd120 set default values for unload and nobind 2026-01-16 18:41:15 -08:00
Nikita Smith 0168448924 by default commit a page for heap and stack 2026-01-16 18:40:32 -08:00
Nikita Smith 6e32a1f11c ignore /EXPERIMENTAL 2026-01-15 18:29:37 -08:00
Nikita Smith 880b8135cc add per-item purging to the hash table 2025-11-07 14:39:46 -08:00
Nikita Smith 371e52ad42 add /rad_alt_pch_dir for remapping objs in the local folder for pgo builds 2025-09-22 10:06:21 -07:00
Nikita Smith a060f581d9 stub /d2 2025-09-22 10:06:20 -07:00
Nikita Smith 0b154cef46 stub /brepro 2025-09-17 15:21:37 -07:00
Nikita Smith c653410af5 stub /errorreportlevel 2025-09-17 15:21:37 -07:00
Nikita Smith a6432cce8e improve unresolved symbol errors
- collect symbol references and print out objs that reference
  unresolved symbol
- print source file location of the references
2025-09-06 09:54:23 -07:00
Nikita Smith 56c43ad614 clean up HashTable, removed unused command line switches, added
list wrapper for alt names, added natvis for HashTable, AltNameList,
MergeDirectiveList, and IncludeSymbolList
2025-09-05 15:19:31 -07:00
Nikita Smith 6a3d7e65f3 remove year from the copyright 2025-09-05 15:19:31 -07:00
Nikita Smith 845e225e81 push alt name strings after they are copied to the config arena 2025-09-05 15:19:30 -07:00
Nikita Smith 1aac27095e WIP: reorder input and library search order to match MSVC behavior 2025-09-05 15:19:30 -07:00
Nikita Smith 0656020ab3 sync primitive fixes 2025-08-18 19:26:35 -07:00
Nikita Smith 0983915f40 oops forgot to init the delay load dll hash table and the established name string 2025-08-18 19:09:32 -07:00
Nikita Smith e1786d0a11 discard delay loads in the config before they get to link context builder 2025-08-18 19:09:32 -07:00
Nikita Smith cff6426741 null check for obj 2025-08-05 08:39:12 -07:00
Nikita Smith 1fe85acff8 refactor include symbols to go through same code path as alternate name symbols 2025-08-05 08:39:11 -07:00