mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 00:32:35 +08:00
2afe6dc210
Add MemoryMap::Iterator to support different strategies for locating the start of module mappings on Android and Linux. Beginning with API 21, Bionic provides android_dlopen_ext() which allows passing a file descriptor with an existing relro segment to the loader. This means that the mapping containing the dynamic segment could have a name, device, and inode which are different than the other mappings for the module. The revised strategy for Android at API 21+ is to search all mappings in reverse order from they dynamic array mapping until a module is parsed with the expected dynamic array address. Linux and Android 20- continue to select mappings using the device, inode, and file offsets of the mappings. Bug: crashpad:268 Change-Id: I30e95e51cb6874c00875d2a9c57f1249877736d4 Reviewed-on: https://chromium-review.googlesource.com/c/1374375 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>