Fix handling of globals for new linker.
The new linker base map is read-only, but the global handling code
for jit and dex information assumed the base map was a read-execute
one. Relax that requirement to search read-only maps.
Adjust the unit tests for this case.
Bug: 117293117
Test: Passes unit tests.
Test: Passes art cfi tests with and without llvm linker.
Change-Id: I31a765d51847d0b8d778ace9cbaa29f42073f4d9
diff --git a/libunwindstack/DexFiles.cpp b/libunwindstack/DexFiles.cpp
index 430f6c5..17e2526 100644
--- a/libunwindstack/DexFiles.cpp
+++ b/libunwindstack/DexFiles.cpp
@@ -126,7 +126,7 @@
const std::string dex_debug_name("__dex_debug_descriptor");
for (MapInfo* info : *maps) {
- if (!(info->flags & PROT_EXEC) || !(info->flags & PROT_READ) || info->offset != 0) {
+ if (!(info->flags & PROT_READ) || info->offset != 0) {
continue;
}