Loading...
--- dyld/dyld-360.21/src/dyldAPIs.cpp
+++ dyld/dyld-353.2.1/src/dyldAPIs.cpp
@@ -147,13 +147,10 @@
{"__dyld_shared_cache_some_image_overridden", (void*)dyld_shared_cache_some_image_overridden },
{"__dyld_process_is_restricted", (void*)dyld::processIsRestricted },
{"__dyld_dynamic_interpose", (void*)dyld_dynamic_interpose },
-#if DYLD_SHARED_CACHE_SUPPORT
- {"__dyld_shared_cache_file_path", (void*)dyld::getStandardSharedCacheFilePath },
-#endif
- {"__dyld_get_image_header_containing_address", (void*)dyld_image_header_containing_address },
// deprecated
#if DEPRECATED_APIS_SUPPORTED
+ {"__dyld_get_image_header_containing_address", (void*)_dyld_get_image_header_containing_address },
{"__dyld_lookup_and_bind", (void*)client_dyld_lookup_and_bind },
{"__dyld_lookup_and_bind_with_hint", (void*)_dyld_lookup_and_bind_with_hint },
{"__dyld_lookup_and_bind_fully", (void*)_dyld_lookup_and_bind_fully },
@@ -344,7 +341,7 @@
return NULL;
}
-const struct mach_header * dyld_image_header_containing_address(const void* address)
+const struct mach_header * _dyld_get_image_header_containing_address(const void* address)
{
if ( dyld::gLogAPIs )
dyld::log("%s(%p)\n", __func__, address);
@@ -1118,7 +1115,7 @@
return false;
dyld::runImageStaticTerminators(image);
if ( (dyld::gLibSystemHelpers != NULL) && (dyld::gLibSystemHelpers->version >= 13) ) {
- __cxa_range_t ranges[image->segmentCount()];
+ __cxa_range_t ranges[3];
int rangeCount = 0;
for (unsigned int j=0; j < image->segmentCount(); ++j) {
if ( !image->segExecutable(j) )
@@ -1420,16 +1417,15 @@
void* result = NULL;
ImageLoader* image = NULL;
std::vector<const char*> rpathsFromCallerImage;
- ImageLoader::RPathChain callersRPaths(NULL, &rpathsFromCallerImage);
try {
void* callerAddress = __builtin_return_address(1); // note layers: 1: real client, 0: libSystem glue
ImageLoader* callerImage = dyld::findImageContainingAddress(callerAddress);
- if ( (mode & RTLD_NOLOAD) == 0 ) {
- // for dlopen, use rpath from caller image and from main executable
- if ( callerImage != NULL )
- callerImage->getRPaths(dyld::gLinkContext, rpathsFromCallerImage);
- if ( callerImage != dyld::mainExecutable() )
- dyld::mainExecutable()->getRPaths(dyld::gLinkContext, rpathsFromCallerImage);
+ // for dlopen, use rpath from caller image and from main executable
+ if ( callerImage != NULL )
+ callerImage->getRPaths(dyld::gLinkContext, rpathsFromCallerImage);
+ ImageLoader::RPathChain callersRPaths(NULL, &rpathsFromCallerImage);
+ if ( callerImage != dyld::mainExecutable() ) {
+ dyld::mainExecutable()->getRPaths(dyld::gLinkContext, rpathsFromCallerImage);
}
const bool leafName = (strchr(path, '/') == NULL);