+uintptr_t ImageLoaderMachO::bindLocation(const LinkContext& context, uintptr_t baseVMAddress,
+ uintptr_t location, uintptr_t value,
+ uint8_t type, const char* symbolName,
+ intptr_t addend, const char* inPath, const char* toPath, const char* msg,
+ ExtraBindData *extraBindData, uintptr_t slide)
+{
+ auto logBind = [&]() {
+ if ( !context.verboseBind )
+ return;
+ if ( addend != 0 ) {
+ dyld::log("dyld: %sbind: %s:0x%08lX = %s:%s, *0x%08lX = 0x%08lX + %ld\n",
+ msg, shortName(inPath), (uintptr_t)location,
+ ((toPath != NULL) ? shortName(toPath) : "<missing weak_import>"),
+ symbolName, (uintptr_t)location, value, addend);
+ } else {
+ dyld::log("dyld: %sbind: %s:0x%08lX = %s:%s, *0x%08lX = 0x%08lX\n",
+ msg, shortName(inPath), (uintptr_t)location,
+ ((toPath != NULL) ? shortName(toPath) : "<missing weak_import>"),
+ symbolName, (uintptr_t)location, value);
+ }
+ };
+