Commit Graph
100 Commits
Author SHA1 Message Date
Nikita SmithandRyan Fleury d32667546d factor out weak symbol resolution logic and apply it to the symbol table
when building link context
2025-07-23 16:09:48 -07:00
Nikita SmithandRyan Fleury 7cd5a670e3 WIP factoring out symbol table fixups 2025-07-23 16:09:48 -07:00
Nikita SmithandRyan Fleury db52ba32e6 helper for profiling parallel fors 2025-07-16 13:54:58 -07:00
Nikita SmithandRyan Fleury 093e43d2ff change output folder name 2025-07-16 13:54:58 -07:00
Nikita SmithandRyan Fleury 4322c9ccfc change torture to assume default liker to be radlink, typo fix, and
added progress report
2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury 17ca83697b draft symbol table fixups to prepare for refactoring symbol table patching step 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury 08f2b749e8 omit file offset, file size, and hash on bss sections 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury 7769a485ba more merge fixes 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury 91ddd214b3 fix string to U64 conversion
- handle zero on input string
- handle upper and lower case prefixes
2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury a954c2125c merge fixups 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury fcb06579a4 collapse symbol scope and symbol type enums 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury b1723ce066 gracefully handle invalid libs 2025-06-25 10:53:25 -07:00
Nikita SmithandRyan Fleury 2ba9f2a61b fix uinited var warning 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 153d78ec6a unpoison memory-mapped files 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 790c95fc80 organization pass over symbol table files 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 7120d0c1a4 share memory mapped files 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 2fbaafa32c parallel compute common block 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury a395398bdf remove global variable for null section contrib 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury f5b19675cb merge conflict 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 0aadf60359 update code block dividers 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 46663688e2 on read memory map files 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 16e72fd573 remove unused switch 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 6b3a63f474 correct task name for weak symbol patch 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 65095437b7 allow forward reference tag symbols 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury e487fbc494 minor torture fixes 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury ba326924ee test for relocation against removed COMDAT 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury ad3e6e0b79 pipe obj reads through IO layer 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 4c972c0fba handle COMDAT symbols with non-zero section offset 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 422829b196 print align and debug sections 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury bddf088df1 collect type indices in L_THREAD32 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury c7d6145ec9 print section contributions in RAD_MAP 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 1fde5a5120 linker natvis 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 06e844abaa remove default delay bind table 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 048600260c special case fill for bss contribs 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury a4b4d5799a fixes for delay import by ordinal and null terminate ILT, IAT, BIAT, and UIAT 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 8ba64238a2 delay load test 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 3c4edba465 validate section flags on merge 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury cccbbfc74c do not patch debug section symbols and patch replaced COMDATs in separate
pass
2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury b19be0574c function pad min - final pass over 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury bbb825adf4 extract hotpatch flag from compile symbol 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury a5119e3b51 WIP function pad min 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury d7b8de5998 test empty section and section with removed flag 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 5fb0d978b9 WIP function pad min 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 9d93eda3ed simplify section table 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury ecdee57c60 move helpers to COFF layer 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury a484906cf9 create section contribution for common block 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 95bea877ab merge .bss with custom section to simplify linker output verification 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 15836572f4 factor out section sort index into contribution chunk and simplify
contribution sorting
2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury f64265aafe typo in contrib sort 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 246bbf1e23 fix common block patch 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 490b22f6f9 put common blocks in .bss 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 626d94104d atomic contrib push 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury b3aadbd49a store first data node in section contrib 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 3fb5e21d73 profiler markup 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 439fd0324d typos 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 75d02f1c1e check symbol presence using stable name pointer 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 5fd06f4466 do not push section contribs for sections without bytes 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury af00acd0f5 add missing symbol replacement logic 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 205723f8d6 parallelize symbol tables patching 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury d604456def align sizeofs 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 32a22779da fix run 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 7d77210a5f run test after build 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 25710d39b7 test optional header fields 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury fe967a3d36 more validity checks in simple_link_test 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury c4a36f73dc redirect stdout and stderr to a file 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 1c08db2705 move image, import lib, and debug info builders outside of the state machine 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury e971db7fdd remove unused layout flag in section struct 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 47ef37ed8e fix section order 2025-06-25 10:53:24 -07:00
Nikita SmithandRyan Fleury 881050addf add default merges and section removes 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury a4b2d40d15 fix sizeof section headers 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 578a7ebdee factor out pdata code to PE layer 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury f055267e59 remove double init and equip of thread contexts 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury aae3874521 disable TLS merge for now 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury c82b98cd49 assign section index to .reloc 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury e1278a6545 null terminate static imports 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury e65d1536b6 dynamic loader crashes if the import data is not in a stand-alone section 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 54e7f9aafc appease ASAN 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 1c656979d2 move MSVC lib symbols to CRT layer 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 47e123221a minor fixes 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 86556c68ed point TLS directory to TLS header 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 3d2b1e19e3 handle communal var vs regular non-comdat symbol 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 42bed0e5c6 merge delayed data section with .data 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury f2394b6cf7 off-by-one 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury e911bf5368 move obj writer for PE debug directory to stand-alone file 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 7f6d8004a9 fix import dll debug symbols 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 89e2ea15ad add /RAD_REMOVE_SECTION switch and special case debug sections 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 9c59cfd4e7 pointless check, in .debug relocations point to __ImageBase 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury d51fe49bab delay import fix 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury dcc4f38709 clean up pass over obj file 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 64415e21f0 special case bss section contribs and fix off by one in range array bsearch 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 37689b2e4a section collector 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 382204a4ea WIP test delay user32 import 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 8fb0aaf2b3 test kernel32 import 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury fb0e8d7579 fix crash on COMDAT folding communal variable 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 9060004827 test for communal variable 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 40efbeb512 test for /INCLUDE 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury 8d7bd6f9fe minor fixes
- copy alt name to config arena
- promote alternate name conflict error to stop run
- remove unused error code
2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury da0e7e5f69 test for /ALTERNATENAME 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury ea81d18223 test for out of bounds section number on external symbol 2025-06-25 10:53:23 -07:00
Nikita SmithandRyan Fleury ef476bf1f0 tests for COMDAT Associative selection 2025-06-25 10:53:23 -07:00