Avatar
norio_nomura 7/8/2020 8:26 AM
Xcode 11.5とXcode 12のdiffを眺めてたら、mach-o/loader.hMH_FILESET, LC_FILESET_ENTRY, fileset_entry_commandってのが追加されている事に気付いた。
8:26 AM
以下、/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach-o/loader.hから引用 #define MH_FILESET 0xc /* a file composed of other Mach-Os to be run in the same userspace sharing a single linkedit. */ … #define LC_FILESET_ENTRY (0x35 | LC_REQ_DYLD) /* used with fileset_entry_command */ … /* * LC_FILESET_ENTRY commands describe constituent Mach-O files that are part * of a fileset. In one implementation, entries are dylibs with individual * mach headers and repositionable text and data segments. Each entry is * further described by its own mach header. */ struct fileset_entry_command { uint32_t cmd; /* LC_FILESET_ENTRY */ uint32_t cmdsize; /* includes entry_id string */ uint64_t vmaddr; /* memory address of the entry */ uint64_t fileoff; /* file offset of the entry */ union lc_str entry_id; /* contained entry id */ uint32_t reserved; /* reserved */ }; (edited)
8:29 AM
コメントを読むと、Rosetta 2でarmへ変換されたファイルを実行時に追加で読み込む仕組みの基礎に見える。