mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-07 11:29:54 +00:00
Recognize 0x0000 as a COFF file magic.
Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -853,6 +853,9 @@ error_code has_magic(const Twine &path, const Twine &magic, bool &result) {
|
||||
if (Magic.size() >= sizeof(Expected) &&
|
||||
memcmp(Magic.data(), Expected, sizeof(Expected)) == 0)
|
||||
return file_magic::windows_resource;
|
||||
// 0x0000 = COFF unknown machine type
|
||||
if (Magic[1] == 0)
|
||||
return file_magic::coff_object;
|
||||
break;
|
||||
}
|
||||
case 0xDE: // 0x0B17C0DE = BC wraper
|
||||
|
Reference in New Issue
Block a user