add garbage collector for COMDAT sections

This commit is contained in:
Nikita Smith
2025-07-23 16:09:48 -07:00
committed by Ryan Fleury
parent a6b2cf64ba
commit 17d35cd327
4 changed files with 324 additions and 292 deletions
+4 -1
View File
@@ -11,6 +11,8 @@ typedef struct LNK_LinkContext
U64 objs_count;
LNK_Obj **objs;
PE_ExportParseList export_symbol_list;
String8List include_symbol_list;
String8 delay_load_helper_name;
LNK_LibList lib_index[LNK_InputSource_Count];
} LNK_LinkContext;
@@ -82,6 +84,7 @@ typedef struct
U64 function_pad_min;
U64 default_align;
LNK_SectionContrib *null_sc;
LNK_Symbol ***symlinks;
LNK_SectionContrib ***sect_map;
HashTable *contribs_ht;
LNK_SectionArray image_sects;
@@ -220,7 +223,7 @@ internal LNK_LinkContext lnk_build_link_context(TP_Context *tp, TP_Arena *tp_are
internal String8List lnk_build_guard_tables(TP_Context *tp, LNK_SectionTable *sectab, LNK_SymbolTable *symtab, U64 objs_count, LNK_Obj **objs, COFF_MachineType machine, String8 entry_point_name, LNK_GuardFlags guard_flags, B32 emit_suppress_flag);
internal String8List lnk_build_base_relocs(TP_Context *tp, TP_Arena *tp_temp, LNK_Config *config, U64 objs_count, LNK_Obj **objs);
internal String8List lnk_build_win32_image_header(Arena *arena, LNK_SymbolTable *symtab, LNK_Config *config, LNK_SectionArray sect_arr, U64 expected_image_header_size);
internal LNK_ImageContext lnk_build_image(TP_Arena *arena, TP_Context *tp, LNK_Config *config, LNK_SymbolTable *symtab, U64 obj_count, LNK_Obj **objs);
internal LNK_ImageContext lnk_build_image(TP_Arena *arena, TP_Context *tp, LNK_Config *config, LNK_SymbolTable *symtab, PE_ExportParseList export_symbol_list, String8List include_symbol_list, String8 delay_load_helper_name, U64 obj_count, LNK_Obj **objs);
// --- Logger ------------------------------------------------------------------