Last active
December 6, 2025 14:45
-
-
Save DerekSelander/a747248fa2bb39788f381302bf38ed9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 01129d60439367d27d4dd55669465be4e66315f2 Mon Sep 17 00:00:00 2001 | |
| From: LOLgrep <meow> | |
| Date: Fri, 21 Nov 2025 21:15:11 -0700 | |
| Subject: [PATCH] merp | |
| blerb | |
| --- | |
| common/FileManager.cpp | 1 + | |
| configs/base.xcconfig | 7 ++++++- | |
| configs/dsc_extractor.xcconfig | 1 + | |
| configs/dyld_info.xcconfig | 4 +++- | |
| configs/libmach_o.xcconfig | 3 ++- | |
| configs/machocheck.xcconfig | 2 ++ | |
| dyld.xcodeproj/project.pbxproj | 6 ++++-- | |
| mach_o/LinkerOptimizationHints.cpp | 3 ++- | |
| 8 files changed, 21 insertions(+), 6 deletions(-) | |
| diff --git a/common/FileManager.cpp b/common/FileManager.cpp | |
| index fadfaee..05647b5 100644 | |
| --- a/common/FileManager.cpp | |
| +++ b/common/FileManager.cpp | |
| @@ -300,6 +300,7 @@ int FileRecord::open(int flags) { | |
| fsid = _fileManager->fsidForUUID(_volume); | |
| } | |
| if (fsid && _objectID) { | |
| + extern int openbyid_np(fsid_t*, fsobj_id_t*, int); | |
| _fd = openbyid_np((fsid_t*)&fsid, (fsobj_id_t*)_objectID, flags); | |
| } | |
| if (_fd == -1) { | |
| diff --git a/configs/base.xcconfig b/configs/base.xcconfig | |
| index b2f4a02..c37daac 100644 | |
| --- a/configs/base.xcconfig | |
| +++ b/configs/base.xcconfig | |
| @@ -34,7 +34,7 @@ SWIFT_COMPILATION_MODE[config=Release] = wholemodule | |
| // clang search paths | |
| USER_HEADER_SEARCH_PATHS = ./dyld ./common ./mach_o | |
| -SYSTEM_HEADER_SEARCH_PATHS = ./include $(inherited) | |
| +SYSTEM_HEADER_SEARCH_PATHS = /Users/feet/code/dsdump_backup/dsdump/dyld_inc /Users/feet/Documents/SDKs/MacOSX10.14.Internal.sdk/usr/local/include/ /Users/feet/code/apple/macos/xnu/bsd/ /Users/feet/code/apple/xnu/libkern/ ./include $(inherited) | |
| ALWAYS_SEARCH_USER_PATHS = NO | |
| // linker options | |
| @@ -97,3 +97,8 @@ CLANG_CXX_STANDARD_LIBRARY_HARDENING = none | |
| PRODUCT_NAME = $(TARGET_NAME) | |
| SUPPORTED_PLATFORMS = $(AVAILABLE_PLATFORMS) | |
| + | |
| +SDKROOT = macosx | |
| +ARCHS = arm64e | |
| +OTHER_CFLAGS = $(inherited) -include "/Users/feet/code/AppleInternal/fuck.h" | |
| +OTHER_LDFLAGS = -Wl,-undefined,dynamic_lookup | |
| diff --git a/configs/dsc_extractor.xcconfig b/configs/dsc_extractor.xcconfig | |
| index c2293ef..e23ea1c 100644 | |
| --- a/configs/dsc_extractor.xcconfig | |
| +++ b/configs/dsc_extractor.xcconfig | |
| @@ -13,3 +13,4 @@ INSTALL_PATH[sdk=macosx*] = /usr/lib | |
| MACH_O_TYPE = mh_bundle | |
| OTHER_LDFLAGS = -stdlib=libc++ -Wl,-exported_symbol,_dyld_shared_cache_extract_dylibs_progress | |
| PRODUCT_NAME = dsc_extractor | |
| +OTHER_CFLAGS = $(inherited) -include "/Users/feet/code/AppleInternal/fuck.h" | |
| diff --git a/configs/dyld_info.xcconfig b/configs/dyld_info.xcconfig | |
| index 865977e..4b3cc10 100644 | |
| --- a/configs/dyld_info.xcconfig | |
| +++ b/configs/dyld_info.xcconfig | |
| @@ -32,7 +32,9 @@ LD_RUNPATH_SEARCH_PATHS = | |
| LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = @executable_path/../lib/ | |
| LD_RUNPATH_SEARCH_PATHS[config=Debug][sdk=macosx*] = @executable_path/../lib/ /var/select/developer_dir/Toolchains/XcodeDefault.xctoolchain/usr/lib/ | |
| -OTHER_LDFLAGS = $(inherited) -lCrashReporterClient | |
| +//OTHER_LDFLAGS = $(inherited) -lCrashReporterClient | |
| // TODO: Clean these up. They were moved from the build settings | |
| LIBRARY_SEARCH_PATHS = $(TOOLCHAIN_DIR)/usr/lib/ | |
| +ARCHS = arm64 | |
| +OTHER_LDFLAGS = -Wl,-undefined,dynamic_lookup | |
| diff --git a/configs/libmach_o.xcconfig b/configs/libmach_o.xcconfig | |
| index 7da65d4..7684ba3 100644 | |
| --- a/configs/libmach_o.xcconfig | |
| +++ b/configs/libmach_o.xcconfig | |
| @@ -18,7 +18,7 @@ USER_HEADER_SEARCH_PATHS = $(inherited) ./lsl | |
| ARCHS = arm64 arm64e x86_64 arm64_32 | |
| MACOSX_DEPLOYMENT_TARGET = 13.0 | |
| -SYSTEM_HEADER_SEARCH_PATHS = $(TOOLCHAIN_DIR)/usr/local/include | |
| +SYSTEM_HEADER_SEARCH_PATHS = $(TOOLCHAIN_DIR)/usr/local/include /Users/feet/code/dsdump_backup/dsdump/dyld_inc/ | |
| WARNING_CFLAGS = $(inherited) -Wno-deprecated-declarations -Wimplicit-fallthrough -Wno-unused-but-set-variable | |
| @@ -50,3 +50,4 @@ TARGETED_DEVICE_FAMILY = 1,2,3,4,5,6,7 | |
| TVOS_DEPLOYMENT_TARGET = 19.0 | |
| WATCHOS_DEPLOYMENT_TARGET = 12.0 | |
| XROS_DEPLOYMENT_TARGET = 3.0 | |
| + | |
| diff --git a/configs/machocheck.xcconfig b/configs/machocheck.xcconfig | |
| index 68bdd02..21f9ea6 100644 | |
| --- a/configs/machocheck.xcconfig | |
| +++ b/configs/machocheck.xcconfig | |
| @@ -8,3 +8,5 @@ INSTALL_PATH = $(TOOLCHAIN_INSTALL_DIR)/usr/local/bin | |
| MACOSX_DEPLOYMENT_TARGET = 15.1 | |
| OTHER_LDFLAGS = $(inherited) -lCrashReporterClient | |
| + | |
| +OTHER_CFLAGS = $(inherited) -include "/Users/feet/code/AppleInternal/fuck.h" | |
| diff --git a/dyld.xcodeproj/project.pbxproj b/dyld.xcodeproj/project.pbxproj | |
| index 6a3f473..43e61e9 100644 | |
| --- a/dyld.xcodeproj/project.pbxproj | |
| +++ b/dyld.xcodeproj/project.pbxproj | |
| @@ -7531,6 +7531,7 @@ | |
| baseConfigurationReferenceAnchor = C1C6014F2D66AAD700D7E3B7 /* configs */; | |
| baseConfigurationReferenceRelativePath = libmach_o.xcconfig; | |
| buildSettings = { | |
| + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; | |
| }; | |
| name = Debug; | |
| }; | |
| @@ -7539,6 +7540,7 @@ | |
| baseConfigurationReferenceAnchor = C1C6014F2D66AAD700D7E3B7 /* configs */; | |
| baseConfigurationReferenceRelativePath = libmach_o.xcconfig; | |
| buildSettings = { | |
| + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; | |
| }; | |
| name = Release; | |
| }; | |
| @@ -8087,7 +8089,7 @@ | |
| ); | |
| IS_ZIPPERED = ""; | |
| ONLY_ACTIVE_ARCH = YES; | |
| - SDKROOT = macosx.internal; | |
| + SDKROOT = macosx; | |
| SYSTEM_HEADER_SEARCH_PATHS = ""; | |
| USER_HEADER_SEARCH_PATHS = ( | |
| ./dyld, | |
| @@ -8138,7 +8140,7 @@ | |
| ./ld, | |
| ); | |
| IS_ZIPPERED = ""; | |
| - SDKROOT = macosx.internal; | |
| + SDKROOT = macosx; | |
| SYSTEM_HEADER_SEARCH_PATHS = ""; | |
| USER_HEADER_SEARCH_PATHS = ( | |
| ./dyld, | |
| diff --git a/mach_o/LinkerOptimizationHints.cpp b/mach_o/LinkerOptimizationHints.cpp | |
| index f18535f..45342a7 100644 | |
| --- a/mach_o/LinkerOptimizationHints.cpp | |
| +++ b/mach_o/LinkerOptimizationHints.cpp | |
| @@ -122,7 +122,8 @@ static Error validFPAC(const char* name, std::span<const uint64_t> addrs, | |
| Error LinkerOptimizationHints::valid(std::span<const MappedSegment> segments, uint64_t loadAddress) const | |
| { | |
| - return std::move(lohErr); | |
| +// return std::move(lohErr); | |
| + return Error(); | |
| } | |
| } // namespace mach_o | |
| -- | |
| 2.39.5 (Apple Git-154) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment