Commit Graph
100 Commits
Author SHA1 Message Date
Nikita Smith 8bf0a3de5b split conversion pass into three (types, udts, and symbols) and use
new locations chunk list
2025-09-29 00:11:27 -07:00
Nikita Smith 07d77a0e79 report unsuccessful writes 2025-09-26 16:28:46 -07:00
Nikita Smith c5fe329c05 fix return status for file writes 2025-09-26 16:28:46 -07:00
Nikita Smith 5709fb54dd simplify debug info conversion loop 2025-09-26 16:28:46 -07:00
Nikita Smith 7084320a83 helper for finding parent type 2025-09-26 16:28:46 -07:00
Nikita Smith eb4e6d2883 alloc slots for null 2025-09-26 16:28:46 -07:00
Nikita Smith d3d91c64cc get DWARF converter up and running 2025-09-25 12:38:21 -07:00
Nikita SmithandRyan Fleury 18b5e27015 change log 2025-09-24 12:42:17 -07:00
Nikita SmithandRyan Fleury 647bc4206f minor typo 2025-09-24 12:42:17 -07:00
Nikita SmithandRyan Fleury 06e895be7c organize task structs 2025-09-24 12:42:17 -07:00
Nikita SmithandRyan Fleury 20c92e0baf speed up base reloc gather step and serialize pages in parallel 2025-09-24 12:42:17 -07:00
Nikita SmithandRyan Fleury 3c0c531c53 reloc helper 2025-09-24 12:42:17 -07:00
Nikita SmithandRyan Fleury 0a930be613 use radsort for sorting base reloc pages 2025-09-24 12:42:17 -07:00
Nikita Smith 6b278e1ccc parallelize image fill 2025-09-22 10:06:21 -07:00
Nikita Smith a75a33e6d3 minor fix for UBA detour 2025-09-22 10:06:21 -07:00
Nikita Smith e72512f638 switch over to 64-bit pointer tagging 2025-09-22 10:06:21 -07:00
Nikita Smith d1dd8e654c add 128-bit compare exchange 2025-09-22 10:06:21 -07:00
Nikita Smith 861c2cf893 macro for aligning types 2025-09-22 10:06:21 -07:00
Nikita Smith 4717701540 update threading API 2025-09-22 10:06:21 -07:00
Nikita Smith 362557e503 renormalize line endings 2025-09-22 10:06:21 -07:00
Nikita Smith 872c387bad let errors from MT to bubble up to linker's stdout and stderr 2025-09-22 10:06:21 -07:00
Nikita Smith 3d7afb58fa speed up symbol patching 2025-09-22 10:06:21 -07:00
Nikita Smith 42999bea63 profile markup obj relocation patching 2025-09-22 10:06:21 -07:00
Nikita Smith 553154eb39 layer color fix 2025-09-22 10:06:21 -07:00
Nikita Smith ac985bb5da add a real pgo PGO target 2025-09-22 10:06:21 -07: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 ee75ada087 mark function override meta-data sections with link info flag so
they do not get a section definition
2025-09-22 10:06:20 -07:00
Nikita Smith ce044e7e83 detect removed fixup symbol and propagate correct section number 2025-09-22 10:06:20 -07:00
Nikita Smith a060f581d9 stub /d2 2025-09-22 10:06:20 -07:00
Nikita Smith 17058e71bf remove empty nodes 2025-09-22 10:06:20 -07:00
Nikita Smith e864674fbd add pgo support to build.cmd 2025-09-22 10:06:20 -07:00
Nikita SmithandRyan Fleury e33a95bfe2 do not embed time stamp with /brepro 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 0b154cef46 stub /brepro 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury c653410af5 stub /errorreportlevel 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 28aec349fd update readme 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury b646e1cd43 fix compiler errors 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury fe63983d4a u32 decrement intrinsic 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 5a12513306 parallelize section garbage collection
currently we tag pointers to solve ABA problem however if the list
has more than max_U16 items, the tag will overflow and cause serious issues.
To fix this, we need to use 64-bit tags together with 128-bit interlocked
compare-exchange intrinsic
2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury cc8fdc6c6f order check for COMDATs with any property 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 630c3b42a7 do lightweight import gathering while resolving links 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury d4ac5ede77 assign correct removed section type 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 8a46ee0ad2 return full path to the first matched file 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 0b5dd92a87 minor tweaks 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury ded932e3ba skip library searches for import stubs 2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 98eaf67dd8 while symbol table is being built sort weak and undefined symbols to
separate chunk lists to speed up library search
2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 4e1ebe5a6b change import stub symbol characteristic to search alias to skip them
on subsequent searches
2025-09-17 15:21:37 -07:00
Nikita SmithandRyan Fleury 80967fac12 pre-parse section names and flag debug info sections 2025-09-16 10:31:02 -07:00
Nikita SmithandRyan Fleury 3224c5e0aa skip linker info sections during relocation patching, also log a message
when encountering an unsupported machine type
2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury 488849792c change file search to return on first match 2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury 7095a8cd6e fix bug where new object tracking failed, causing certain objs to be
skipped during the symbol table input step
2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury 5aff575feb discard empty symbol nodes 2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury b5a2bbaf54 early-out of default library searches 2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury d6596efac8 allow weak symbols to resolve to other weak symbols 2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury c47b35f635 update link symbol set logic to replace import address symbols with jump
thunk symbols
2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury c7c86cd360 do not report unresolved symbols in debug info sections 2025-09-16 10:31:01 -07:00
Nikita SmithandRyan Fleury b1609017c5 inline xxhash functions 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 763bb57459 revert hasher 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 98a05728b3 add check for whether weak symbol is resolved 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury fc0a7d51d3 warning fixes 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 58e3af5b3c test for linking using first and second lib headers 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury bbe430cc2f write first linker member header with symbol names grouped by member 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 24b427fe72 delete unused blake3 headers 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury ee3832ea3b parallel for lib symbol search 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury fb46d0bba4 sort symbol names in first member header 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 7193986305 binary search for strings 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 00536f7ea8 rewrite set linked symbol logic to respect declaration order in obj symbol table 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 8a22910d9b add "Links" log type for diagnosing linked lib members 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 082f6cf6fd fix free block check and remove unused free_size field 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 8f749f4239 use global symbol table to detect duplicate imports 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 7cea036bc1 clean up pass over symbol table
- rename functions for consistency
- remove unused code
2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 222c220d99 make xxhash API funcs static and hash string size too 2025-09-08 16:07:31 -07:00
Nikita SmithandRyan Fleury 069d683690 fix crash when obj does not have debug info 2025-09-06 09:54:23 -07:00
Nikita SmithandRyan Fleury 3459070f71 remove windows.h from blake3 2025-09-06 09:54:23 -07:00
Nikita SmithandRyan Fleury 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 SmithandRyan Fleury d92f45784d rename defined symbol to obj ref, as the symbol table no longer has
scopes and it makes no sense to refer to them that way
2025-09-06 09:54:22 -07:00
Nikita SmithandRyan Fleury 21163264d4 redirect entry point to CRT version if name is inferred 2025-09-06 09:54:22 -07:00
Nikita SmithandRyan Fleury a11406ac51 declare thunk symobls as functions 2025-09-06 09:54:22 -07:00
Nikita SmithandRyan Fleury 11373f4432 disable COFF group info generation 2025-09-05 15:19:31 -07:00
Nikita SmithandRyan Fleury f2ee135439 fix up symbols visibility 2025-09-05 15:19:31 -07:00
Nikita SmithandRyan Fleury 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 SmithandRyan Fleury 6a3d7e65f3 remove year from the copyright 2025-09-05 15:19:31 -07:00
Nikita SmithandRyan Fleury e88dc44f31 clean up debug leftovers 2025-09-05 15:19:31 -07:00
Nikita SmithandRyan Fleury 580303b0dd emit jump thunks for imports only when needed 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 43e81b934b move weak symbol replacer to the symbol table layer 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 8d75497bba do not set function pad min switch by default 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 0b0a2664d1 merge .idata with .rdata 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury a64f8f4196 clean up over base strings in the linker layer 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 9f6da0ec63 simplify section removal and purging 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 43b35d43dc change lib sort to preserve input order 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 845e225e81 push alt name strings after they are copied to the config arena 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury fdad3f4f58 natvis for lib member ref 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 78b1f7e701 optionally emit import thunks 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 1aac27095e WIP: reorder input and library search order to match MSVC behavior 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 240935f0cc WIP: use MSVC rule for COMDAT symbol replacement 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury d9eb26a830 infer subsystem when only entry point is specified 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury b0db2b19f8 move entry point name redirection helper to MSCRT layer 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury e1b7168605 update weak vs undefined replacement rule 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury d7cdaa98b5 oops forgot to set enum type 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury c397b1dfb1 handle common section case 2025-09-05 15:19:30 -07:00
Nikita SmithandRyan Fleury 843de72f64 add U8 atomic exchange for clang and gcc 2025-09-05 15:19:30 -07:00