diff options
| -rw-r--r-- | miasm/tools/pe_helper.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/miasm/tools/pe_helper.py b/miasm/tools/pe_helper.py index b85e7085..9a9d188d 100644 --- a/miasm/tools/pe_helper.py +++ b/miasm/tools/pe_helper.py @@ -156,8 +156,11 @@ def get_import_address(e): def get_import_address_elf(e): import2addr = {} - for k, v in e.sh.rel_plt.rel.items(): - import2addr[('xxx', k)] = v.offset + for sh in e.sh: + if not hasattr(sh, 'rel'): + continue + for k, v in sh.rel.items(): + import2addr[('xxx', k)] = v.offset return import2addr |