ElfDeinit
Description
Release storage owned by an Elf. Frees the byte buffer through allocator and tears down the section / symbol vectors. All three ElfOpen* constructors leave the parser as the sole owner of data, so this is unconditional. Safe to call on a zeroed struct.
Usage example (Cross-references)
Usage examples (Cross-references)
}
ElfDeinit(&stripped);
DefaultAllocatorDeinit(&alloc);
return ok && sym_missing_or_unnamed;- In
Dwarf.c:32:
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Dwarf.c:77:
}
ElfDeinit(&elf);
SymbolResolverDeinit(&res);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:133:
}
ElfDeinit(&elf);
SymbolResolverDeinit(&res);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:177:
}
ElfDeinit(&elf);
SymbolResolverDeinit(&res);
DefaultAllocatorDeinit(&alloc);- In
Elf.c:27:
ok = ok && elf.symbols.length > 0;
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Elf.c:45:
bool ok = text != NULL && text->size > 0 && (text->flags & 0x4); // SHF_EXECINSTR = 0x4
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Elf.c:65:
}
bool ok = elf.build_id != NULL && elf.build_id_size > 0 && elf.build_id_size <= 64;
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
return ok;- In
Elf.c:88:
}
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
return ok; return true;
}
ElfDeinit(out);
}
} return true;
}
ElfDeinit(out);
} return true;
}
ElfDeinit(out);
} return true;
}
ElfDeinit(out);
}
(void)cand_dirs; // unused list kept for future variants
if (!VecPushBackR(&self->cache, entry)) {
if (entry.has_sidecar)
ElfDeinit(&entry.sidecar);
ElfDeinit(&entry.elf);
return NULL; if (entry.has_sidecar)
ElfDeinit(&entry.sidecar);
ElfDeinit(&entry.elf);
return NULL;
} #endif
if (e->has_sidecar) {
ElfDeinit(&e->sidecar);
}
ElfDeinit(&e->elf); ElfDeinit(&e->sidecar);
}
ElfDeinit(&e->elf);
}
VecDeinit(&self->cache);- In
Elf.c:450:
fail:
ElfDeinit(out);
return false;
}- In
Elf.c:484:
}
void ElfDeinit(Elf *self) {
if (!self)
return;
Last updated on