diff options
author | midipix <writeonce@midipix.org> | 2016-11-13 15:06:20 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-13 15:06:20 -0500 |
commit | cf4adcd6a9a857eb9d33c6f0235eed071be7e434 (patch) | |
tree | e3cfa883746b149238304307235f2fb9baa35164 /include | |
parent | 902a22167b52d38de153cc95abaeab955d41e0e7 (diff) | |
download | perk-cf4adcd6a9a857eb9d33c6f0235eed071be7e434.tar.bz2 perk-cf4adcd6a9a857eb9d33c6f0235eed071be7e434.tar.xz |
logic: pe_get_expsym_by_name(), pe_get_expsym_by_index(): improved interface.
Diffstat (limited to 'include')
-rw-r--r-- | include/perk/perk.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h index 9412173..988e0f6 100644 --- a/include/perk/perk.h +++ b/include/perk/perk.h @@ -76,6 +76,13 @@ struct pe_raw_image { size_t size; }; +struct pe_expsym { + const char * name; + void * eaddr; + void * maddr; + uint32_t roffset; +}; + struct pe_image_summary { int32_t nexpsyms; int32_t nimplibs; @@ -209,12 +216,8 @@ perk_api void pe_free_image_meta (struct pe_image_meta *); perk_api int pe_get_named_section_index(const struct pe_image_meta *, const char * name); perk_api int pe_get_block_section_index(const struct pe_image_meta *, const struct pe_block *); - -perk_api -const char * pe_get_expsym_by_name (const struct pe_image_meta *, const char * name); - -perk_api -const char * pe_get_expsym_by_index (const struct pe_image_meta *, unsigned index); +perk_api int pe_get_expsym_by_name (const struct pe_image_meta *, const char * name, struct pe_expsym * optional); +perk_api int pe_get_expsym_by_index (const struct pe_image_meta *, unsigned index, struct pe_expsym * optional); /* low-level api */ perk_api int pe_read_dos_header (const struct pe_image_dos_hdr *, struct pe_meta_image_dos_hdr *); |