diff options
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/perk_hdrdump_impl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/internal/perk_hdrdump_impl.h b/src/internal/perk_hdrdump_impl.h index 41528ad..5adb63d 100644 --- a/src/internal/perk_hdrdump_impl.h +++ b/src/internal/perk_hdrdump_impl.h @@ -46,4 +46,18 @@ size_t pe_output_raw_element( uint32_t moffset, uint32_t msize); +static inline int pe_image_bits(const struct pe_image_meta * m) +{ + switch (m->m_abi) { + case PE_ABI_PE32: + return 32; + + case PE_ABI_PE64: + return 64; + + default: + return -1; + } +} + #endif |