diff options
Diffstat (limited to 'view/sharedcache/core/SharedCacheView.cpp')
| -rw-r--r-- | view/sharedcache/core/SharedCacheView.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp index 7c7a2485..a1428eab 100644 --- a/view/sharedcache/core/SharedCacheView.cpp +++ b/view/sharedcache/core/SharedCacheView.cpp @@ -109,6 +109,14 @@ Ref<Settings> SharedCacheViewType::GetLoadSettingsForData(BinaryView* data) "description" : "Add function starts sourced from the Function Starts tables to the core for analysis." })"); + // Place the synthetic sections well after the shared cache to ensure they do + // not collide with any images that are later loaded from the shared cache. + // We do not have easy access to the size of the shared cache's mapping here + // so we use a large fixed offset. + // TODO: This will have to be updated if we add support for 32-bit shared caches. + const uint64_t syntheticSectionsOffset = 12ull * 1024 * 1024 * 1024; + settings->UpdateProperty("loader.syntheticSectionBase", "default", viewRef->GetStart() + syntheticSectionsOffset); + // Merge existing load settings if they exist. This allows for the selection of a specific object file from a Mach-O // Universal file. The 'Universal' BinaryViewType generates a schema with 'loader.universal.architectures'. This // schema contains an appropriate 'Mach-O' load schema for selecting a specific object file. The embedded schema |
