#
b0b9605a |
| 12-Jun-2023 |
Kazuki Sakamoto <sakamoto@splhack.org> |
[lldb][ObjectFileELF] Set ModuleSpec file offset and size
In Android API level 23 and above, dynamic loader is able to load .so file directly from APK. https://android.googlesource.com/platform/bion
[lldb][ObjectFileELF] Set ModuleSpec file offset and size
In Android API level 23 and above, dynamic loader is able to load .so file directly from APK. https://android.googlesource.com/platform/bionic/+/master/ android-changes-for-ndk-developers.md# opening-shared-libraries-directly-from-an-apk
ObjectFileELF::GetModuleSpecifications will load a .so file, which is page aligned and uncompressed, directly from a zip file. However it does not set the .so file offset and size to the ModuleSpec. Also crc32 calculation uses more data than the .so file size.
Set the .so file offset and size to the ModuleSpec, and set the size to MapFileData length argument. For normal file, file_offset should be zero, and length should be the size of the file.
Differential Revision: https://reviews.llvm.org/D152757
show more ...
|