mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Import fix
This commit is contained in:
parent
991fd015de
commit
0e33636aaf
1 changed files with 19 additions and 1 deletions
|
@ -274,8 +274,26 @@ namespace loader
|
|||
}
|
||||
}
|
||||
|
||||
assert(e.second != stub);
|
||||
e.second = stub;
|
||||
}
|
||||
|
||||
for (auto &i : m.second.imports)
|
||||
{
|
||||
u32 stub = i.second;
|
||||
|
||||
for (auto &s : info.segments)
|
||||
{
|
||||
if (stub >= s.initial_addr.addr() && stub < s.initial_addr.addr() + s.size_file)
|
||||
{
|
||||
stub += s.begin.addr() - s.initial_addr.addr();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assert(i.second != stub);
|
||||
i.second = stub;
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
@ -432,7 +450,7 @@ namespace loader
|
|||
for (auto& f : m.second.imports)
|
||||
{
|
||||
const u32 nid = f.first;
|
||||
const u32 addr = f.second + info.segments[0].begin.addr();
|
||||
const u32 addr = f.second;
|
||||
|
||||
u32 index;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue