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
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 Smith
80967fac12
pre-parse section names and flag debug info sections
2025-09-16 10:31:02 -07:00
Nikita Smith
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 Smith
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 Smith
7cea036bc1
clean up pass over symbol table
...
- rename functions for consistency
- remove unused code
2025-09-08 16:07:31 -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
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 Smith
6a3d7e65f3
remove year from the copyright
2025-09-05 15:19:31 -07:00
Nikita Smith
580303b0dd
emit jump thunks for imports only when needed
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
67e66dc26e
WIP switching to serial library search-style, removed lib scope from
...
the symbol table
2025-09-05 15:19:30 -07:00
Nikita Smith
81381f9a6d
minor cleanups
2025-08-18 19:09:31 -07:00
Nikita Smith
829a35430c
add flag to exclude objs from debug info input
2025-08-11 02:49:26 -07:00
Nikita Smith
702fd74b23
minor cleanup in obj initer
2025-08-10 21:41:39 -07:00
Nikita Smith
7466da1479
mark referenced symbols as live for unresolved-symbol detection
2025-08-08 15:54:21 -07:00
Nikita Smith
9a1f96bda2
progress on /opt:ref
...
Link the debugger and strip unreferenced sections
TODO: Mark referenced undefined symbols for unresolved symbol reporting
2025-08-07 17:36:11 -07:00
Nikita Smith
dd715dacf7
assign COMDAT symlinks as soon as the symbol table is processed
2025-08-05 08:39:11 -07:00
Nikita Smith
18f83521e4
clean up pass over directives handler; preparing to collapse code paths
2025-07-28 20:07:56 -07:00
Nikita Smith
7be9df0e90
move directive section gather logic to obj layer
2025-07-28 20:07:56 -07:00
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