PeSection
Description
Decoded section header. PE section names are at most 8 bytes (longer names exist for object files via /N offsets into the string table, but executables don’t use them); we store them as a fixed 9-byte buffer (8 + NUL).
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Pe.c:255:
return false;
}
PeSection s;
MemCopy(s.name, c.p, 8);
s.name[8] = '\0';- In
Pe.c:450:
}
const PeSection *PeFileFindSection(const PeFile *self, const char *name) {
if (!self || !name)
return NULL;- In
Pe.c:465:
return false;
for (size i = 0; i < self->sections.length; ++i) {
const PeSection *s = &self->sections.data[i];
if (rva >= s->virtual_address && rva < s->virtual_address + s->virtual_size) {
u64 off = (u64)s->raw_offset + (rva - s->virtual_address);- In
Pe.h:44:
u32 raw_offset; // file offset
u32 characteristics;
} PeSection;
typedef Vec(PeSection) PeSections;- In
Pe.h:46:
} PeSection;
typedef Vec(PeSection) PeSections;
///
- In
Pe.h:150:
/// they're vanishingly rare).
///
const PeSection *PeFileFindSection(const PeFile *self, const char *name);
///
Last updated on