start dwarf -> rdi cleanup; eliminate some assertions-as-validation, remove incorrect assumption that line info addresses are vaddrs (they seem to be voffs)

This commit is contained in:
Ryan Fleury
2025-11-10 15:06:52 -08:00
parent efb4731ace
commit f396b2eaa3
11 changed files with 1433 additions and 1250 deletions
+4 -9
View File
@@ -58,14 +58,11 @@ c2r_rdi_binary_section_flags_from_coff_section_flags(COFF_SectionFlags flags)
internal RDIM_BinarySectionList
c2r_rdi_binary_sections_from_coff_sections(Arena *arena, String8 image_data, String8 string_table, U64 sectab_count, COFF_SectionHeader *sectab)
{
ProfBeginFunction();
RDIM_BinarySectionList binary_sections = {0};
for (U64 isec = 0; isec < sectab_count; ++isec) {
COFF_SectionHeader *coff_sec = &sectab[isec];
RDIM_BinarySection *sec = rdim_binary_section_list_push(arena, &binary_sections);
for EachIndex(idx, sectab_count)
{
COFF_SectionHeader *coff_sec = &sectab[idx];
RDIM_BinarySection *sec = rdim_binary_section_list_push(arena, &binary_sections);
sec->name = coff_name_from_section_header(string_table, coff_sec);
sec->flags = c2r_rdi_binary_section_flags_from_coff_section_flags(coff_sec->flags);
sec->voff_first = coff_sec->voff;
@@ -73,7 +70,5 @@ c2r_rdi_binary_sections_from_coff_sections(Arena *arena, String8 image_data, Str
sec->foff_first = coff_sec->foff;
sec->foff_opl = coff_sec->foff + coff_sec->fsize;
}
ProfEnd();
return binary_sections;
}