From eb6d110c1d0d0089c4da4b4ca9cd64460aa142f3 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Mon, 20 Jun 2016 22:16:18 +0000 Subject: Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Darwin added support in its Xcode 8.0 tools (released in the beta) for universal files where offsets and sizes for the objects are 64-bits to allow support for objects contained in universal files to be larger then 4gb. The change is very straight forward. There is a new magic number that differs by one bit, much like the 64-bit Mach-O files. Then there is a new structure that follow the fat_header that has the same layout but with the offset and size fields using 64-bit values instead of 32-bit values. rdar://26899493 llvm-svn: 273207 --- llvm/lib/Support/Path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index 406a37b2cc0..f6355d1df80 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -1049,7 +1049,7 @@ file_magic identify_magic(StringRef Magic) { case 0xCA: if (Magic[1] == char(0xFE) && Magic[2] == char(0xBA) && - Magic[3] == char(0xBE)) { + (Magic[3] == char(0xBE) || Magic[3] == char(0xBF))) { // This is complicated by an overlap with Java class files. // See the Mach-O section in /usr/share/file/magic for details. if (Magic.size() >= 8 && Magic[7] < 43) -- cgit v1.2.3