ElfFileFindSection
Description
Find a section by name (first match). Returns NULL if absent.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Elf.c:42:
}
const ElfSection *text = ElfFileFindSection(&elf, ".text");
bool ok = text != NULL && text->size > 0 && (text->flags & 0x4); // SHF_EXECINSTR = 0x4
- In
Dwarf.c:596:
out->string_pool = StrInit(alloc);
const ElfSection *line_section = ElfFileFindSection(elf, ".debug_line");
if (!line_section || line_section->size == 0) {
// No debug info — empty result is still success.
- In
Elf.c:413:
}
const ElfSection *ElfFileFindSection(const ElfFile *self, const char *name) {
if (!self || !name)
return NULL;
Last updated on