dumper for SHT_NOTE

This commit is contained in:
Nikita Smith
2025-11-07 14:39:46 -08:00
committed by Ryan Fleury
parent 8bc1e4b21c
commit b596a6ed8a
8 changed files with 694 additions and 197 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ dw_is_dwarf_present_from_elf_bin(String8 data, ELF_Bin *bin)
for EachIndex(idx, bin->shdrs.count)
{
ELF_Shdr64 *shdr = &bin->shdrs.v[idx];
if(shdr->sh_type != ELF_SectionCode_ProgBits) { continue; }
if(shdr->sh_type != ELF_ShType_ProgBits) { continue; }
String8 name = elf_name_from_shdr64(data, bin, shdr);
DW_SectionKind s = dw_section_kind_from_string(name);
if(s == DW_Section_Null)
@@ -35,7 +35,7 @@ dw_input_from_elf_bin(Arena *arena, String8 data, ELF_Bin *bin)
for(U64 section_idx = 1; section_idx < bin->shdrs.count; section_idx += 1)
{
ELF_Shdr64 *shdr = &bin->shdrs.v[section_idx];
if(shdr->sh_type != ELF_SectionCode_ProgBits) { continue; } // skip BSS sections
if(shdr->sh_type != ELF_ShType_ProgBits) { continue; } // skip BSS sections
//- rjf: unpack section
String8 section_name = elf_name_from_shdr64(data, bin, shdr);