diff options
author | Kevin Enderby <enderby@apple.com> | 2016-06-20 22:16:18 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2016-06-20 22:16:18 +0000 |
commit | eb6d110c1d0d0089c4da4b4ca9cd64460aa142f3 (patch) | |
tree | 5bb2189d83eb75d2cbe1f53e793f58dea9a65e3f /llvm/lib/Support/Path.cpp | |
parent | 94eb31a7a91e5c9e8b004d3bea1176a9642ef1ed (diff) | |
download | bcm5719-llvm-eb6d110c1d0d0089c4da4b4ca9cd64460aa142f3.tar.gz bcm5719-llvm-eb6d110c1d0d0089c4da4b4ca9cd64460aa142f3.zip |
Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects.
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
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r-- | llvm/lib/Support/Path.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) |