Nikita Smith
b3efce4b9a
better place for this helper function
2025-07-28 20:07:56 -07:00
Nikita Smith
1e1d903878
store library pointer in the obj instead of path; required for prioritized symbol lookup implementation
2025-07-28 20:07:56 -07:00
Nikita Smith
17d35cd327
add garbage collector for COMDAT sections
2025-07-23 16:09:48 -07:00
Nikita Smith
a6b2cf64ba
WIP collect sections associations
2025-07-23 16:09:48 -07:00
Nikita Smith
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 Smith
7cd5a670e3
WIP factoring out symbol table fixups
2025-07-23 16:09:48 -07:00
Nikita Smith
fcb06579a4
collapse symbol scope and symbol type enums
2025-06-25 10:53:25 -07:00
Nikita Smith
b19be0574c
function pad min - final pass over
2025-06-25 10:53:24 -07:00
Nikita Smith
bbb825adf4
extract hotpatch flag from compile symbol
2025-06-25 10:53:24 -07:00
Nikita Smith
a5119e3b51
WIP function pad min
2025-06-25 10:53:24 -07:00
Nikita Smith
3fb5e21d73
profiler markup
2025-06-25 10:53:24 -07:00
Nikita Smith
439fd0324d
typos
2025-06-25 10:53:24 -07:00
Nikita Smith
89e2ea15ad
add /RAD_REMOVE_SECTION switch and special case debug sections
2025-06-25 10:53:23 -07:00
Nikita Smith
dcc4f38709
clean up pass over obj file
2025-06-25 10:53:23 -07:00
Nikita Smith
37689b2e4a
section collector
2025-06-25 10:53:23 -07:00
Nikita Smith
fb0e8d7579
fix crash on COMDAT folding communal variable
2025-06-25 10:53:23 -07:00
Nikita Smith
bf25b5b249
handle COMDAT Associative selection
2025-06-25 10:53:23 -07:00
Nikita Smith
4aa6e6d132
store symbol links for COMDAT
2025-06-25 10:53:23 -07:00
Nikita Smith
90797f363f
fix for machine compatibility check
2025-06-25 10:53:22 -07:00
Nikita Smith
73fe9d223a
handle /ALTERNATENAME directive
2025-06-25 10:53:22 -07:00
Nikita Smith
a2bef106a1
handle case where symbol doesn't have obj
2025-06-25 10:53:22 -07:00
Nikita Smith
8da56025b3
patch section symbol and test for relocations to discarded memory
2025-06-25 10:53:22 -07:00
Nikita Smith
7c071e7238
linker checkpoint
2025-06-25 10:53:22 -07:00
Nikita Smith
19a7ada1dc
make export table with COFF obj writer,
...
partially converted import table to COFF obj writer
2025-06-25 10:53:21 -07:00
Nikita Smith
3a2bb318c7
make import lib objs with COFF obj writer
2025-06-25 10:53:21 -07:00
Nikita Smith
55c76db902
handle linker directives in a separate step after obj is initialized,
...
this way we don't need to store directives in obj struct
2025-06-25 10:53:21 -07:00
Nikita Smith
307d3a7f4b
check obj compatibility before initializing them
2025-06-25 10:53:21 -07:00
Nikita Smith
1eca5818a6
removed dependency on relocation list when error checking .drectve
2025-06-25 10:53:21 -07:00
Nikita Smith
ab05133f8a
picked better name convention for the section table
2025-04-04 15:47:56 -07:00
Nikita Smith
8beb168905
went over COFF string table and changed the parser code accept to String8
2025-04-04 15:45:51 -07:00
Nikita Smith
c090bee2f3
added missing debug comments for chunks
2025-04-04 15:45:51 -07:00
Nikita Smith
c6ba475427
produce image layout map
2025-04-04 15:45:51 -07:00
Nikita Smith
153bbc7b1d
pass over COFF layer
...
- updated naming convention on structs, enums, and macros to conform with code base style
- moved related structs closer to each other
- moved parser code to separate file
2025-01-20 19:31:52 -08:00
Nikita Smith
a1d5837ff3
helpers for matching string literals
2025-01-18 17:39:11 -08:00
Nikita Smith
b405ed4873
factored out logic for splitting function chunks into separate pass
...
over symbol table; associations are now assigned to sub chunks too;
inherit function chunk align from parent chunk
2025-01-16 13:47:13 -08:00
Nikita Smith
190eb03ff3
removed default lib directive parser, moved directive code to obj file,
...
getting ready to deprecate LNK_Directive struct
2025-01-15 14:03:40 -08:00
Nikita Smith
3cec629a8c
pipe obj directives through config path
2025-01-13 15:22:37 -08:00
Nikita Smith
c91253a19e
move feature flags to appropriate layer
2024-12-10 14:07:51 -08:00
Nikita Smith
723c950c01
add default params for /FUNCTIONPADMIN
2024-12-09 14:27:03 -08:00
Nikita Smith
80fa226432
pass over COFF archive parser
2024-12-06 11:53:16 -08:00
Nikita Smith
fc429449cf
fix out of bounds check
2024-12-06 11:53:16 -08:00
Nikita Smith
19fac9b1aa
changed symbol table parser to convert symbols as they are being read
2024-11-21 19:42:39 -08:00
Nikita Smith
c037d6ad75
WIP function padding
2024-11-21 01:05:33 -08:00
Nikita Smith
b631d431fa
create section layout without copying chunk data and perform chunk data
...
copy in parallel given layout
2024-11-15 16:14:00 -08:00
Nikita Smith
0886963d93
promote section definition number to 32-bit when linking big obj
2024-11-07 11:54:25 -08:00
Nikita Smith
4a2e1dd8d0
switch to thread safe hash trie map
...
Initial implementation of the symbol table allowed us to push symbols
from one thread at a time and required a wonky lock-step and spread out
logic for replacing symbols. And because it was a externally chained
hash table we had to guesstimate optimal capacity for small and big targets.
We erred on the side of larger capacity to prevent degradation and
rehashing, however this meant small targets had to spent unreasonable
amount of time memory allocing slots. With hash trie we can dynamically
scale up to 4 ^ 32 items and atomically replace symbols when needed. Neat!
2024-10-30 15:43:53 -07:00
Nikita Smith
e1166abc63
typo in str8 compar name
2024-10-30 15:42:39 -07:00
Nikita Smith
46390ba0b8
reworked manifest handling
...
- manifest files wont be created unless symbols are resolved
- delay mt.exe presence check until we launch it
- create explicit case that writes manifests to disk
- moved manifest dependency collection step to happen after obj input
- removed /rad_delete_manifest
2024-10-18 23:37:30 -07:00
Nikita Smith
932df7bf68
linker
2024-10-15 17:25:22 -07:00