AndroidNativeEmu icon indicating copy to clipboard operation
AndroidNativeEmu copied to clipboard

Cannot relocate large libraries

Open JJTech0130 opened this issue 1 year ago • 1 comments

Large libraries cannot be relocated, because load_base + value_orig overflows a 4 byte integer. Not sure what the solution would be. Here's the culprit library: libCoreADI.so.zip and the backtrace:

Exception has occurred: OverflowError
int too big to convert
  File "/workspaces/test/AndroidNativeEmu/src/androidemu/internal/modules.py", line 197, in load_module
    self.emu.uc.mem_write(rel_addr, value.to_bytes(4, byteorder='little'))
  File "/workspaces/test/AndroidNativeEmu/src/androidemu/emulator.py", line 141, in load_library
    libmod = self.modules.load_module(filename)
  File "/workspaces/test/test.py", line 26, in <module>
    adi_core = emulator.load_library(f"{library_path}/libCoreADI.so", do_init=False)

JJTech0130 avatar Nov 16 '22 15:11 JJTech0130