mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
remove unused layout flag in section struct
This commit is contained in:
committed by
Ryan Fleury
parent
47ef37ed8e
commit
e971db7fdd
+1
-8
@@ -1999,9 +1999,6 @@ lnk_build_win32_header(Arena *arena, LNK_SymbolTable *symtab, LNK_Config *config
|
||||
U64 sizeof_image = 0;
|
||||
for (U64 sect_idx = 0; sect_idx < sects.count; sect_idx += 1) {
|
||||
LNK_Section *sect = sects.v[sect_idx];
|
||||
if ( ! sect->has_layout) {
|
||||
continue;
|
||||
}
|
||||
if (code_base == 0 && sect->flags & COFF_SectionFlag_CntCode) {
|
||||
code_base = sect->voff;
|
||||
}
|
||||
@@ -2091,9 +2088,6 @@ lnk_build_win32_header(Arena *arena, LNK_SymbolTable *symtab, LNK_Config *config
|
||||
{
|
||||
for (U64 sect_idx = 0; sect_idx < sects.count; sect_idx += 1) {
|
||||
LNK_Section *sect = sects.v[sect_idx];
|
||||
if (!sect->has_layout) {
|
||||
continue;
|
||||
}
|
||||
|
||||
COFF_SectionHeader *coff_section = &coff_section_table[sect_idx];
|
||||
|
||||
@@ -3423,7 +3417,7 @@ lnk_build_rad_chunk_map(Arena *arena, String8 image_data, U64 thread_count, LNK_
|
||||
str8_list_pushf(arena, &map, "# SECTIONS\n");
|
||||
for (LNK_SectionNode *sect_n = sectab->list.first; sect_n != 0; sect_n = sect_n->next) {
|
||||
LNK_Section *sect = §_n->data;
|
||||
if (sect->has_layout) {
|
||||
|
||||
str8_list_pushf(arena, &map, "%S\n", sect->name);
|
||||
str8_list_pushf(arena, &map, "%-8s %-8s %-8s %-8s %-16s %-8s %s\n", "FileOff", "VirtOff", "VirtSize", "FileSize", "Blake3", "SC", "Source");
|
||||
|
||||
@@ -3486,7 +3480,6 @@ lnk_build_rad_chunk_map(Arena *arena, String8 image_data, U64 thread_count, LNK_
|
||||
}
|
||||
str8_list_pushf(arena, &map, "\n");
|
||||
}
|
||||
}
|
||||
ProfEnd();
|
||||
|
||||
|
||||
|
||||
@@ -184,7 +184,6 @@ lnk_section_table_push(LNK_SectionTable *sectab, String8 name, COFF_SectionFlags
|
||||
sect->id = sectab->id_max++;
|
||||
sect->name = push_str8_copy(sectab->arena, name);
|
||||
sect->flags = flags;
|
||||
sect->has_layout = 1;
|
||||
|
||||
LNK_SectionList *sect_list = §ab->list;
|
||||
SLLQueuePush(sect_list->first, sect_list->last, sect_node);
|
||||
@@ -396,12 +395,10 @@ lnk_section_table_get_output_sections(Arena *arena, LNK_SectionTable *sectab)
|
||||
result.v = push_array(arena, LNK_Section *, sectab->list.count);
|
||||
|
||||
for (LNK_SectionNode *sect_node = sectab->list.first; sect_node != 0; sect_node = sect_node->next) {
|
||||
if (sect_node->data.has_layout) {
|
||||
Assert(result.count < sectab->list.count);
|
||||
result.v[result.count] = §_node->data;
|
||||
result.count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
U64 unused_entry_count = sectab->list.count - result.count;
|
||||
arena_pop(arena, unused_entry_count * sizeof(result.v[0]));
|
||||
|
||||
@@ -64,7 +64,6 @@ typedef struct LNK_Section
|
||||
U64 id;
|
||||
String8 name;
|
||||
COFF_SectionFlags flags;
|
||||
B32 has_layout;
|
||||
B32 is_merged;
|
||||
U64 merge_id;
|
||||
LNK_SectionContribChunkList contribs;
|
||||
|
||||
Reference in New Issue
Block a user