Skip to content

Commit

Permalink
Fix address in imports widget
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 25, 2024
1 parent af786dc commit 71a8db3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/core/Iaito.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2853,8 +2853,18 @@ QList<ImportDescription> IaitoCore::getAllImports()
{
QString type = QString(bi->bind) + " " + QString(bi->type);
ImportDescription imp;
// imp.vaddr = bi->vaddr;
imp.name = QString(r_bin_name_tostring(bi->name));
const char *name = r_bin_name_tostring(bi->name);
char *fname = r_str_newf("sym.imp.%s", name);
RFlagItem *fi = r_flag_get(core->flags, fname);
if (!fi) {
free(fname);
fname = r_str_newf("reloc.%s", name);
fi = r_flag_get(core->flags, fname);
}
free(fname);
ut64 addr = fi ? fi->offset : 0;
imp.plt = addr;
imp.name = QString(name);
imp.bind = QString(bi->bind);
imp.type = QString(bi->type);
ret << imp;
Expand Down

0 comments on commit 71a8db3

Please sign in to comment.