Nikita Smith
f9950ef4e9
Revert "x64 does not belong in base - base is intended to be things we can assume everywhere, which explicitly disqualifies x64 by definition."
...
This reverts commit 4e4639c2a0 .
2026-09-21 14:05:13 -07:00
Nikita Smith
4add147a09
radlink: refactor MSF writer to allow allocation of contiguous stream backing
...
* remove MSF reader API
* remove PDB reader API
2026-09-21 14:00:07 -07:00
Nikita Smith
98c1191506
radlink: use bit arrays for marking discarded CV types
2026-09-21 14:00:06 -07:00
Nikita Smith
48ba845a91
radlink: strip LF_PRECOMP earlier before parsing .debug$T to exclude it from leaf arrays
2026-09-21 09:08:08 -07:00
Nikita Smith
0ac6b35a98
base: add memory placeholders and generic page fault handler
...
* Add windows and Linux demand-mapping backends
* Add exclusive file creation, sizing, flushing and replacement APIs
2026-09-21 09:08:07 -07:00
Nikita Smith
4e12148910
set up compressor
...
set up compressor on linux
2026-09-21 09:08:07 -07:00
Nikita Smith
e50cef2bff
minor fixes
2026-09-21 09:08:06 -07:00
Nikita Smith
2afb78e498
radlink: resolve alternate-name fallbacks through prevailing weak symbols
...
Follow prevailing weak definitions instead of synthetic anti-dependency
placeholders. Resolve all weak symbols before publishing results so
anti-dependency chaining rules are independent of worker order.
2026-09-21 09:08:06 -07:00
Nikita Smith
64c2216ae6
radlink: encode the DBI major build number in its 16-bit field
2026-09-21 09:08:05 -07:00
Nikita Smith
5b646344eb
radlink: implement /NOENTRY
2026-09-21 09:08:05 -07:00
Nikita Smith
4663d1a89a
radlink: handle thread pool release correctly
2026-09-21 09:08:04 -07:00
Nikita Smith
458e5029db
radlink: absolute symbols with identical value are legal
2026-09-21 09:08:04 -07:00
Nikita Smith
51bd5e0882
more accurate name for the function that queries test linker path
2026-09-21 09:08:03 -07:00
Nikita Smith
44a37e2a80
fixes for export test
2026-09-21 09:08:03 -07:00
Nikita Smith
986a6c526f
radlink: implement COFF_ImportBy_NoPrefix
2026-09-21 09:08:02 -07:00
Nikita Smith
707a3e11ca
release asserts
2026-09-21 09:08:02 -07:00
Nikita Smith
000997d3af
radlink: implement COFF_ImportBy_Undecorate
2026-09-11 22:57:06 -07:00
Nikita Smith
e162b800d9
radlink: make command-line /INFERASANLIBS:NO disable ASAN library inference without allowing directive to re-enable it
2026-09-10 15:56:27 -07:00
Nikita Smith
1673303d56
coff: parse long section names encoded with LLVM/GNU format
2026-09-10 14:28:35 -07:00
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
Nikita Smith
6f824e4b09
minor cleanups
...
* updated the comments
* simplified the test
2026-09-10 14:28:31 -07:00
Nikita Smith
8d23d31097
internal on force inline function
2026-09-10 14:28:30 -07:00
Nikita Smith
027730f9f6
enable GCC build
2026-09-10 14:28:30 -07:00
Nikita Smith
55fbbb09d7
fixes for the GCC build
2026-09-10 14:28:29 -07:00
Nikita Smith
5fe1bac74e
test big obj generation
2026-09-10 14:28:28 -07:00
Nikita Smith
dcea1b49a1
radlink: update /BRepro and /RAD_LOG help lines
2026-09-10 14:28:27 -07:00
Nikita Smith
7e995e8194
radlink: guard against empty input load requests
2026-09-10 14:28:27 -07:00
Nikita Smith
86ec8137d4
radlink: track function override alternate name directives with a cursor to prevent unnecessary rescans
2026-09-10 14:28:26 -07:00
Nikita Smith
50a489e816
radlink: track anti-dependency symbols search position with a parallel cursor array
...
* this helps prevent case where an anti-dependency search resets
the cursors for the undefined symbol scan
2026-09-10 14:28:26 -07:00
Nikita Smith
8923472c23
radlink: fast path for single task runs
2026-09-10 14:28:25 -07:00
Nikita Smith
2804474327
const import header is data header
2026-09-10 14:28:25 -07:00
Nikita Smith
b8bbd520a1
add test user data field for smuggling script state
2026-09-10 14:28:24 -07:00
Nikita Smith
77bacd640a
process groups + pipe pair
2026-09-10 14:28:24 -07:00
Nikita Smith
39fa231e7c
ICF correctness fixes
...
* added safe-guards for the const data ICF
* exclude associated CFG metadata section guards
* color primary section hash with associated sections colors
* remove folded symbol associated chain
2026-08-25 00:10:51 -07:00
Nikita Smith
ff1877dfa2
push purged item to the free list
2026-08-25 00:10:51 -07:00
Nikita Smith
ae89d8ea88
align static import DLL names
2026-08-25 00:10:50 -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
f6116bbede
match LINK resource section layout
2026-08-25 00:10:49 -07:00
Nikita Smith
a11e2bf57b
manifest generation fix
2026-08-25 00:10:30 -07:00
Nikita Smith
d1171dcabb
fix PE initialized data size
2026-08-25 00:10:30 -07:00
Nikita Smith
e283952994
match LINK import encoding and load config
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
da00fa9627
use iterators to access COFF sections and symbols
2026-08-24 22:27:25 -07:00
Nikita Smith
e3d49069bf
remove helper for patching symbols and update values directly
2026-08-24 22:27:23 -07:00
Nikita Smith
a7e1b21e4e
use base bit array for primary symbols
2026-08-24 22:27:22 -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
7633bd90ab
use packed linker symbol and section contribution arrays
2026-08-24 22:27:16 -07:00
Nikita Smith
3c719de3f5
use callee info to disambiguate overlapping sibling inline sites
2026-08-21 10:56:19 -07:00
Nikita Smith
8b52934c66
set lower bound on CodeOffset
2026-08-21 10:56:18 -07:00
Nikita Smith
8fa5ba5b60
shift type index base for PCH objs
2026-08-21 10:56:17 -07:00
Nikita Smith
24e321925a
update the change log
2026-08-21 10:56:16 -07:00
Nikita Smith
109180131a
bugfix forwarder export detection
2026-08-21 10:56:16 -07:00
Nikita Smith
2767895b88
turn off diagnostic for unresolved symbols in debug sections on /DEBUG:NONE
2026-08-21 10:56:15 -07:00
Nikita Smith
2abbae4d90
improve unresolved symbols diagnostic
...
* show referenced by function
* show inline site that references unresolved symbol instead of the top function
2026-08-21 10:56:14 -07:00
Nikita Smith
4eae2a2ecc
clang fixes
2026-08-21 10:56:14 -07:00
Nikita Smith
33f5a27fdd
work around for the function overrides
2026-08-18 10:49:40 -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
b8574e3a0b
left a todo in the linker IO code
2026-08-17 14:35:27 -07:00
Nikita Smith
84d88b3946
discard environment variable RAD_TYPE_SERVER
...
Linker already provides /RAD_TYPE_SERVER that switches linker into
the type server mode, having a environment variable is redundant
2026-08-17 13:11:24 -07:00
Nikita Smith
e636345384
update memfun.h
2026-08-14 13:26:58 -07:00
Nikita Smith
3057d0b7da
minor fix
2026-08-13 15:02:21 -07:00
Nikita Smith
1086d1d350
reduce arena footprint by using initial reserve and commit size parameters
...
`current` points to the most recently allocated arena. If that arena was
allocated by a large push, lets say 2 GiB, while the arena's initial
reserve size was 1 GiB, the next block would be allocated with a 2 GiB
reserve.
2026-08-13 15:02:20 -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
0c2f79d2f9
update natvis
2026-08-13 15:02:17 -07:00
Nikita Smith
cd82268a07
polish ICF section color-space picker
2026-07-27 14:47:30 -07:00
Nikita Smith
4235fa85b4
search small libraries on the main thread to reduce wait times in barriers
2026-07-27 14:47:29 -07:00
Nikita Smith
db0151c3e2
parallel radix sort and coalesce adjacent section contribs
2026-07-27 14:47:29 -07:00
Nikita Smith
bbb136c9ea
radix sort pass over section contribs
2026-07-27 14:47:28 -07:00
Nikita Smith
2d827ac15d
make const data eligible for ICF
2026-07-27 14:47:28 -07:00
Nikita Smith
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 Smith
c96c9620d0
WIP PDB Writer Thread
2026-07-27 14:47:26 -07:00
Nikita Smith
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 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
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 Smith
4cc0f4813b
WIP cache COFF symbol interp
2026-07-27 14:47:23 -07:00
Nikita Smith
a779d3f1a5
WIP assigned symbols
2026-07-27 14:47:22 -07:00
Nikita Smith
493241c1da
WIP light COFF symbol table parse
2026-07-27 14:47:22 -07:00
Nikita Smith
bd2cbfc127
gate for page pre-faulting on windows
2026-07-27 14:47:21 -07:00
Nikita Smith
cb6443ce4e
release file maps before exit in parallel before exit
2026-07-27 14:47:20 -07:00
Nikita Smith
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 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
abfea7c33a
update CHANGELOG.md
2026-07-27 14:47:18 -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
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 Smith
048b93b166
remove empty sections if it does not have any section contributions too
2026-07-27 14:47:17 -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
7197398f31
split external-symbol handling from section-definition fallbacks
2026-07-27 14:47:15 -07:00
Nikita Smith
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