mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-06 01:02:08 +00:00
Check if function call is within the same section.
This commit is contained in:
parent
39a0b6ab4d
commit
476dfb5307
@ -183,9 +183,9 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
size_t address = base + (data - section.data) + PPC_BI(insn);
|
||||
|
||||
if (image.symbols.find(address) == image.symbols.end())
|
||||
if (address >= section.base && address < section.base + section.size && image.symbols.find(address) == image.symbols.end())
|
||||
{
|
||||
auto& fn = functions.emplace_back(Function::Analyze(section.data + address - section.base, section.size - (address - section.base), address));
|
||||
auto& fn = functions.emplace_back(Function::Analyze(section.data + address - section.base, section.base + section.size - address, address));
|
||||
hardcodedFuncCheck(fn);
|
||||
image.symbols.emplace(std::format("sub_{:X}", fn.base), fn.base, fn.size, Symbol_Function);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user