|
diff --git a/dyld.xcodeproj/project.pbxproj b/dyld.xcodeproj/project.pbxproj |
|
index 5bdd191..065ac10 100644 |
|
--- a/dyld.xcodeproj/project.pbxproj |
|
+++ b/dyld.xcodeproj/project.pbxproj |
|
@@ -3462,7 +3462,7 @@ |
|
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; |
|
INSTALL_PATH = "$(INSTALL_LOCATION)/usr/local/bin"; |
|
PRODUCT_NAME = dyld_shared_cache_util; |
|
- SDKROOT = macosx.internal; |
|
+ SDKROOT = macosx; |
|
SUPPORTED_PLATFORMS = "macosx iphoneos watchos appletvos bridgeos"; |
|
}; |
|
name = Debug; |
|
@@ -3477,7 +3477,7 @@ |
|
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; |
|
INSTALL_PATH = "$(INSTALL_LOCATION)/usr/local/bin"; |
|
PRODUCT_NAME = dyld_shared_cache_util; |
|
- SDKROOT = macosx.internal; |
|
+ SDKROOT = macosx; |
|
SKIP_INSTALL = NO; |
|
SUPPORTED_PLATFORMS = "macosx iphoneos watchos appletvos bridgeos"; |
|
}; |
|
diff --git a/dyld3/Closure.cpp b/dyld3/Closure.cpp |
|
index 21b0c2e..e7bede5 100644 |
|
--- a/dyld3/Closure.cpp |
|
+++ b/dyld3/Closure.cpp |
|
@@ -30,12 +30,6 @@ |
|
#include <mach-o/dyld_priv.h> |
|
#include <sys/stat.h> |
|
#include <sys/sysctl.h> |
|
-#include <System/machine/cpu_capabilities.h> |
|
- |
|
-extern "C" { |
|
- #include <corecrypto/ccdigest.h> |
|
- #include <corecrypto/ccsha2.h> |
|
-} |
|
|
|
#include "Closure.h" |
|
#include "MachOFile.h" |
|
@@ -1277,29 +1271,6 @@ static bool hashBootAndFileInfo(const char* mainExecutablePath, char hashString[ |
|
struct stat statbuf; |
|
if ( ::stat(mainExecutablePath, &statbuf) != 0) |
|
return false; |
|
-#if !TARGET_OS_DRIVERKIT // Temp until core crypto is available |
|
- const struct ccdigest_info* di = ccsha256_di(); |
|
- ccdigest_di_decl(di, hashTemp); // defines hashTemp array in stack |
|
- ccdigest_init(di, hashTemp); |
|
- |
|
- // put boot time into hash |
|
- const uint64_t* bootTime = ((uint64_t*)_COMM_PAGE_BOOTTIME_USEC); |
|
- ccdigest_update(di, hashTemp, sizeof(uint64_t), bootTime); |
|
- |
|
- // put inode of executable into hash |
|
- ccdigest_update(di, hashTemp, sizeof(statbuf.st_ino), &statbuf.st_ino); |
|
- |
|
- // put mod-time of executable into hash |
|
- ccdigest_update(di, hashTemp, sizeof(statbuf.st_mtime), &statbuf.st_mtime); |
|
- |
|
- // complete hash computation and append as hex string |
|
- uint8_t hashBits[32]; |
|
- ccdigest_final(di, hashTemp, hashBits); |
|
- char* s = hashString; |
|
- for (size_t i=0; i < sizeof(hashBits); ++i) |
|
- putHexByte(hashBits[i], s); |
|
- *s = '\0'; |
|
-#endif |
|
return true; |
|
} |
|
|
|
diff --git a/dyld3/Diagnostics.cpp b/dyld3/Diagnostics.cpp |
|
index 647053e..d491336 100644 |
|
--- a/dyld3/Diagnostics.cpp |
|
+++ b/dyld3/Diagnostics.cpp |
|
@@ -29,7 +29,6 @@ |
|
#include <uuid/uuid.h> |
|
#include <fcntl.h> |
|
#include <errno.h> |
|
-#include <_simple.h> |
|
#include <unistd.h> |
|
#include <sys/uio.h> |
|
#include <sys/param.h> |
|
@@ -45,7 +44,6 @@ |
|
#include <mach-o/nlist.h> |
|
#include <mach-o/fat.h> |
|
#include <pthread.h> |
|
-#include <libc_private.h> |
|
|
|
#include "Diagnostics.h" |
|
|
|
@@ -85,21 +83,6 @@ void Diagnostics::error(const char* format, ...) |
|
|
|
void Diagnostics::error(const char* format, va_list list) |
|
{ |
|
- //FIXME: this should be assertNoError(), but we currently overwrite some errors |
|
- //assertNoError(); |
|
- _buffer = _simple_salloc(); |
|
- _simple_vsprintf(_buffer, format, list); |
|
- |
|
-#if BUILDING_CACHE_BUILDER |
|
- if ( !_verbose ) |
|
- return; |
|
- |
|
- if (_prefix.empty()) { |
|
- fprintf(stderr, "%s", _simple_string(_buffer)); |
|
- } else { |
|
- fprintf(stderr, "[%s] %s", _prefix.c_str(), _simple_string(_buffer)); |
|
- } |
|
-#endif |
|
} |
|
|
|
bool Diagnostics::hasError() const |
|
@@ -114,21 +97,16 @@ bool Diagnostics::noError() const |
|
|
|
void Diagnostics::clearError() |
|
{ |
|
- if ( _buffer ) |
|
- _simple_sfree(_buffer); |
|
- _buffer = nullptr; |
|
} |
|
|
|
void Diagnostics::assertNoError() const |
|
{ |
|
- if ( _buffer != nullptr ) |
|
- abort_report_np("%s", _simple_string(_buffer)); |
|
} |
|
|
|
#if !BUILDING_CACHE_BUILDER |
|
const char* Diagnostics::errorMessage() const |
|
{ |
|
- return _simple_string(_buffer); |
|
+ return ""; |
|
} |
|
|
|
#else |
|
diff --git a/dyld3/MachOLoaded.cpp b/dyld3/MachOLoaded.cpp |
|
index 74c845c..275fb07 100644 |
|
--- a/dyld3/MachOLoaded.cpp |
|
+++ b/dyld3/MachOLoaded.cpp |
|
@@ -34,11 +34,6 @@ |
|
#include <assert.h> |
|
#include <mach-o/reloc.h> |
|
#include <mach-o/nlist.h> |
|
-extern "C" { |
|
- #include <corecrypto/ccdigest.h> |
|
- #include <corecrypto/ccsha1.h> |
|
- #include <corecrypto/ccsha2.h> |
|
-} |
|
|
|
#include "MachOFile.h" |
|
#include "MachOLoaded.h" |
|
@@ -791,48 +786,6 @@ const uint8_t* MachOLoaded::trieWalk(Diagnostics& diag, const uint8_t* start, co |
|
void MachOLoaded::forEachCDHashOfCodeSignature(const void* codeSigStart, size_t codeSignLen, |
|
void (^callback)(const uint8_t cdHash[20])) const |
|
{ |
|
- forEachCodeDirectoryBlob(codeSigStart, codeSignLen, ^(const void *cdBuffer) { |
|
- const CS_CodeDirectory* cd = (const CS_CodeDirectory*)cdBuffer; |
|
- uint32_t cdLength = htonl(cd->length); |
|
- uint8_t cdHash[20]; |
|
- if ( cd->hashType == CS_HASHTYPE_SHA384 ) { |
|
- uint8_t digest[CCSHA384_OUTPUT_SIZE]; |
|
- const struct ccdigest_info* di = ccsha384_di(); |
|
- ccdigest_di_decl(di, tempBuf); // declares tempBuf array in stack |
|
- ccdigest_init(di, tempBuf); |
|
- ccdigest_update(di, tempBuf, cdLength, cd); |
|
- ccdigest_final(di, tempBuf, digest); |
|
- ccdigest_di_clear(di, tempBuf); |
|
- // cd-hash of sigs that use SHA384 is the first 20 bytes of the SHA384 of the code digest |
|
- memcpy(cdHash, digest, 20); |
|
- callback(cdHash); |
|
- return; |
|
- } |
|
- else if ( (cd->hashType == CS_HASHTYPE_SHA256) || (cd->hashType == CS_HASHTYPE_SHA256_TRUNCATED) ) { |
|
- uint8_t digest[CCSHA256_OUTPUT_SIZE]; |
|
- const struct ccdigest_info* di = ccsha256_di(); |
|
- ccdigest_di_decl(di, tempBuf); // declares tempBuf array in stack |
|
- ccdigest_init(di, tempBuf); |
|
- ccdigest_update(di, tempBuf, cdLength, cd); |
|
- ccdigest_final(di, tempBuf, digest); |
|
- ccdigest_di_clear(di, tempBuf); |
|
- // cd-hash of sigs that use SHA256 is the first 20 bytes of the SHA256 of the code digest |
|
- memcpy(cdHash, digest, 20); |
|
- callback(cdHash); |
|
- return; |
|
- } |
|
- else if ( cd->hashType == CS_HASHTYPE_SHA1 ) { |
|
- // compute hash directly into return buffer |
|
- const struct ccdigest_info* di = ccsha1_di(); |
|
- ccdigest_di_decl(di, tempBuf); // declares tempBuf array in stack |
|
- ccdigest_init(di, tempBuf); |
|
- ccdigest_update(di, tempBuf, cdLength, cd); |
|
- ccdigest_final(di, tempBuf, cdHash); |
|
- ccdigest_di_clear(di, tempBuf); |
|
- callback(cdHash); |
|
- return; |
|
- } |
|
- }); |
|
} |
|
|
|
|
|
diff --git a/include/mach-o/dyld.h b/include/mach-o/dyld.h |
|
index cc8c89f..99cfa35 100644 |
|
--- a/include/mach-o/dyld.h |
|
+++ b/include/mach-o/dyld.h |
|
@@ -153,22 +153,22 @@ typedef struct __NSObjectFileImage* NSObjectFileImage; |
|
|
|
|
|
/* NSObjectFileImage can only be used with MH_BUNDLE files */ |
|
-extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(const char* pathName, NSObjectFileImage *objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
-extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromMemory(const void *address, size_t size, NSObjectFileImage *objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern bool NSDestroyObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlclose()"); |
|
+extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(const char* pathName, NSObjectFileImage *objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
+extern NSObjectFileImageReturnCode NSCreateObjectFileImageFromMemory(const void *address, size_t size, NSObjectFileImage *objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern bool NSDestroyObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlclose()"); |
|
|
|
-extern uint32_t NSSymbolDefinitionCountInObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern const char* NSSymbolDefinitionNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern uint32_t NSSymbolReferenceCountInObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern const char* NSSymbolReferenceNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal, bool *tentative_definition) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern bool NSIsSymbolDefinedInObjectFileImage(NSObjectFileImage objectFileImage, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern void* NSGetSectionDataInObjectFileImage(NSObjectFileImage objectFileImage, const char* segmentName, const char* sectionName, size_t *size) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "getsectiondata()"); |
|
+extern uint32_t NSSymbolDefinitionCountInObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern const char* NSSymbolDefinitionNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern uint32_t NSSymbolReferenceCountInObjectFileImage(NSObjectFileImage objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern const char* NSSymbolReferenceNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal, bool *tentative_definition) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern bool NSIsSymbolDefinedInObjectFileImage(NSObjectFileImage objectFileImage, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern void* NSGetSectionDataInObjectFileImage(NSObjectFileImage objectFileImage, const char* segmentName, const char* sectionName, size_t *size) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "getsectiondata()"); |
|
|
|
typedef struct __NSModule* NSModule; |
|
-extern const char* NSNameOfModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern const char* NSLibraryNameForModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern const char* NSNameOfModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern const char* NSLibraryNameForModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
|
|
-extern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* moduleName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
+extern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* moduleName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
#define NSLINKMODULE_OPTION_NONE 0x0 |
|
#define NSLINKMODULE_OPTION_BINDNOW 0x1 |
|
#define NSLINKMODULE_OPTION_PRIVATE 0x2 |
|
@@ -176,27 +176,27 @@ extern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* modu |
|
#define NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES 0x8 |
|
#define NSLINKMODULE_OPTION_TRAILING_PHYS_NAME 0x10 |
|
|
|
-extern bool NSUnLinkModule(NSModule module, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern bool NSUnLinkModule(NSModule module, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
#define NSUNLINKMODULE_OPTION_NONE 0x0 |
|
#define NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED 0x1 |
|
#define NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES 0x2 |
|
|
|
/* symbol API */ |
|
typedef struct __NSSymbol* NSSymbol; |
|
-extern bool NSIsSymbolNameDefined(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern bool NSIsSymbolNameDefinedWithHint(const char* symbolName, const char* libraryNameHint) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern bool NSIsSymbolNameDefinedInImage(const struct mach_header* image, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern NSSymbol NSLookupAndBindSymbolWithHint(const char* symbolName, const char* libraryNameHint) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern NSSymbol NSLookupSymbolInModule(NSModule module, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
-extern NSSymbol NSLookupSymbolInImage(const struct mach_header* image, const char* symbolName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
+extern bool NSIsSymbolNameDefined(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern bool NSIsSymbolNameDefinedWithHint(const char* symbolName, const char* libraryNameHint) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern bool NSIsSymbolNameDefinedInImage(const struct mach_header* image, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern NSSymbol NSLookupAndBindSymbolWithHint(const char* symbolName, const char* libraryNameHint) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern NSSymbol NSLookupSymbolInModule(NSModule module, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
+extern NSSymbol NSLookupSymbolInImage(const struct mach_header* image, const char* symbolName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 |
|
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 |
|
#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 |
|
#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 |
|
-extern const char* NSNameOfSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
-extern void * NSAddressOfSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
-extern NSModule NSModuleForSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dladdr()"); |
|
+extern const char* NSNameOfSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern void * NSAddressOfSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
+extern NSModule NSModuleForSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dladdr()"); |
|
|
|
/* error handling API */ |
|
typedef enum { |
|
@@ -224,7 +224,7 @@ typedef enum { |
|
NSOtherErrorInvalidArgs |
|
} NSOtherErrorNumbers; |
|
|
|
-extern void NSLinkEditError(NSLinkEditErrors *c, int *errorNumber, const char** fileName, const char** errorString) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlerror()"); |
|
+extern void NSLinkEditError(NSLinkEditErrors *c, int *errorNumber, const char** fileName, const char** errorString) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlerror()"); |
|
|
|
typedef struct { |
|
void (*undefined)(const char* symbolName); |
|
@@ -233,27 +233,27 @@ typedef struct { |
|
const char* fileName, const char* errorString); |
|
} NSLinkEditErrorHandlers; |
|
|
|
-extern void NSInstallLinkEditErrorHandlers(const NSLinkEditErrorHandlers *handlers) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
+extern void NSInstallLinkEditErrorHandlers(const NSLinkEditErrorHandlers *handlers) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, ""); |
|
|
|
-extern bool NSAddLibrary(const char* pathName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlopen()"); |
|
-extern bool NSAddLibraryWithSearching(const char* pathName) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlopen()"); |
|
-extern const struct mach_header* NSAddImage(const char* image_name, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
+extern bool NSAddLibrary(const char* pathName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlopen()"); |
|
+extern bool NSAddLibraryWithSearching(const char* pathName) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlopen()"); |
|
+extern const struct mach_header* NSAddImage(const char* image_name, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen()"); |
|
#define NSADDIMAGE_OPTION_NONE 0x0 |
|
#define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 |
|
#define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 |
|
#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 |
|
#define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 |
|
|
|
-extern bool _dyld_present(void) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "always true"); |
|
-extern bool _dyld_launched_prebound(void) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "moot"); |
|
-extern bool _dyld_all_twolevel_modules_prebound(void) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "moot"); |
|
-extern bool _dyld_bind_fully_image_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen(RTLD_NOW)"); |
|
-extern bool _dyld_image_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "dladdr()"); |
|
-extern void _dyld_lookup_and_bind(const char* symbol_name, void **address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern void _dyld_lookup_and_bind_with_hint(const char* symbol_name, const char* library_name_hint, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
-extern void _dyld_lookup_and_bind_fully(const char* symbol_name, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
+extern bool _dyld_present(void) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "always true"); |
|
+extern bool _dyld_launched_prebound(void) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "moot"); |
|
+extern bool _dyld_all_twolevel_modules_prebound(void) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "moot"); |
|
+extern bool _dyld_bind_fully_image_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlopen(RTLD_NOW)"); |
|
+extern bool _dyld_image_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "dladdr()"); |
|
+extern void _dyld_lookup_and_bind(const char* symbol_name, void **address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern void _dyld_lookup_and_bind_with_hint(const char* symbol_name, const char* library_name_hint, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.4, "dlsym()"); |
|
+extern void _dyld_lookup_and_bind_fully(const char* symbol_name, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.1, 10.5, "dlsym()"); |
|
|
|
-extern const struct mach_header* _dyld_get_image_header_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) __API_UNAVAILABLE(bridgeos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "dladdr()"); |
|
+extern const struct mach_header* _dyld_get_image_header_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos) DYLD_DRIVERKIT_UNAVAILABLE __OSX_DEPRECATED(10.3, 10.5, "dladdr()"); |
|
|
|
|
|
#if __cplusplus |
|
diff --git a/include/mach-o/dyld_priv.h b/include/mach-o/dyld_priv.h |
|
index 6013e59..7edb30a 100644 |
|
--- a/include/mach-o/dyld_priv.h |
|
+++ b/include/mach-o/dyld_priv.h |
|
@@ -121,31 +121,31 @@ typedef struct { |
|
} dyld_build_version_t; |
|
|
|
// Returns the active platform of the process |
|
-extern dyld_platform_t dyld_get_active_platform(void) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern dyld_platform_t dyld_get_active_platform(void) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Base platforms are platforms that have version numbers (macOS, iOS, watchos, tvOS, bridgeOS) |
|
// All other platforms are mapped to a base platform for version checks |
|
-extern dyld_platform_t dyld_get_base_platform(dyld_platform_t platform) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern dyld_platform_t dyld_get_base_platform(dyld_platform_t platform) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// SPI to ask if a platform is a simulation platform |
|
-extern bool dyld_is_simulator_platform(dyld_platform_t platform) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern bool dyld_is_simulator_platform(dyld_platform_t platform) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Takes a version and returns if the image was built againt that SDK or newer |
|
// In the case of multi_plaform mach-o's it tests against the active platform |
|
-extern bool dyld_sdk_at_least(const struct mach_header* mh, dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern bool dyld_sdk_at_least(const struct mach_header* mh, dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Takes a version and returns if the image was built with that minos version or newer |
|
// In the case of multi_plaform mach-o's it tests against the active platform |
|
-extern bool dyld_minos_at_least(const struct mach_header* mh, dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern bool dyld_minos_at_least(const struct mach_header* mh, dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Convenience versions of the previous two functions that run against the the main executable |
|
-extern bool dyld_program_sdk_at_least(dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
-extern bool dyld_program_minos_at_least(dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern bool dyld_program_sdk_at_least(dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
+extern bool dyld_program_minos_at_least(dyld_build_version_t version) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Function that walks through the load commands and calls the internal block for every version found |
|
// Intended as a fallback for very complex (and rare) version checks, or for tools that need to |
|
// print our everything for diagnostic reasons |
|
-extern void dyld_get_image_versions(const struct mach_header* mh, void (^callback)(dyld_platform_t platform, uint32_t sdk_version, uint32_t min_version)) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0), bridgeos(3.0)); |
|
+extern void dyld_get_image_versions(const struct mach_header* mh, void (^callback)(dyld_platform_t platform, uint32_t sdk_version, uint32_t min_version)) __API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0)); |
|
|
|
// Convienence constants for dyld version SPIs. |
|
|
|
@@ -213,14 +213,14 @@ extern uint32_t dyld_get_program_min_watch_os_version(void) __API_AVAILABLE(watc |
|
// bridgeOS only. |
|
// This finds the bridgeOS SDK version that the main executable was built against. |
|
// Exists in bridgeOSOS 2.0 and later |
|
-extern uint32_t dyld_get_program_sdk_bridge_os_version(void) __API_AVAILABLE(bridgeos(2.0)); |
|
+extern uint32_t dyld_get_program_sdk_bridge_os_version(void); |
|
|
|
// bridgeOS only. |
|
// This finds the Watch min OS version that the main executable was built to run on. |
|
// Note: dyld_get_program_min_os_version() returns the iOS equivalent (e.g. 9.0) |
|
// whereas this returns the raw bridgeOS version (e.g. 2.0). |
|
// Exists in bridgeOS 2.0 and later |
|
-extern uint32_t dyld_get_program_min_bridge_os_version(void) __API_AVAILABLE(bridgeos(2.0)); |
|
+extern uint32_t dyld_get_program_min_bridge_os_version(void); |
|
#endif |
|
|
|
// |