Lines Matching refs:COFF
1 //===-------------- COFF.cpp - JIT linker function for COFF -------------===//
9 // COFF jit-link function.
13 #include "llvm/ExecutionEngine/JITLink/COFF.h"
15 #include "llvm/BinaryFormat/COFF.h"
17 #include "llvm/Object/COFF.h"
31 case COFF::IMAGE_FILE_MACHINE_I386:
33 case COFF::IMAGE_FILE_MACHINE_AMD64:
35 case COFF::IMAGE_FILE_MACHINE_ARMNT:
37 case COFF::IMAGE_FILE_MACHINE_ARM64:
51 return make_error<JITLinkError>("Invalid COFF buffer");
54 return make_error<JITLinkError>("Truncated COFF buffer");
59 // Check if this is a PE/COFF file.
60 if (Data.size() >= sizeof(object::dos_header) + sizeof(COFF::PEMagic)) {
66 if (memcmp(Data.data() + CurPtr, COFF::PEMagic, sizeof(COFF::PEMagic)) !=
70 CurPtr += sizeof(COFF::PEMagic);
75 return make_error<JITLinkError>("Truncated COFF buffer");
82 if (!IsPE && COFFHeader->Machine == COFF::IMAGE_FILE_MACHINE_UNKNOWN &&
86 return make_error<JITLinkError>("Truncated COFF buffer");
93 if (COFFBigObjHeader->Version >= COFF::BigObjHeader::MinBigObjectVersion &&
94 std::memcmp(COFFBigObjHeader->UUID, COFF::BigObjMagic,
95 sizeof(COFF::BigObjMagic)) == 0) {
112 case COFF::IMAGE_FILE_MACHINE_AMD64:
116 "Unsupported target machine architecture in COFF object " +
129 "Unsupported target machine architecture in COFF link graph " +