Lines Matching refs:COFF
1 //===- COFFObjectFile.cpp - COFF object file implementation -----*- C++ -*-===//
14 #include "llvm/Object/COFF.h"
145 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
146 symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) {
149 if (symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
170 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
171 symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED)
175 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
178 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL)
181 if (symb->SectionNumber == COFF::IMAGE_SYM_ABSOLUTE)
233 case COFF::IMAGE_SYM_UNDEFINED:
235 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL) {
243 case COFF::IMAGE_SYM_ABSOLUTE:
246 case COFF::IMAGE_SYM_DEBUG:
251 if (Characteristics & COFF::IMAGE_SCN_CNT_CODE)
253 else if ( Characteristics & COFF::IMAGE_SCN_MEM_READ
254 && ~Characteristics & COFF::IMAGE_SCN_MEM_WRITE) // Read only.
256 else if (Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)
258 else if (Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA)
260 else if (Characteristics & COFF::IMAGE_SCN_LNK_INFO)
264 else if ( symb->StorageClass == COFF::IMAGE_SYM_CLASS_STATIC
269 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
279 if (symb->SectionNumber <= COFF::IMAGE_SYM_UNDEFINED)
341 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_CODE;
348 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA;
355 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
369 Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
429 // The actual starting location of the COFF header in the file. This can be
430 // non-zero in PE/COFF files.
433 // Check if this is a PE/COFF file.
435 // PE/COFF, seek through MS-DOS compatibility stub and 4-byte
436 // PE signature to find 'normal' COFF header.
523 // COFF does not have this field.
546 case COFF::IMAGE_FILE_MACHINE_I386:
547 return "COFF-i386";
548 case COFF::IMAGE_FILE_MACHINE_AMD64:
549 return "COFF-x86-64";
551 return "COFF-<unknown arch>";
557 case COFF::IMAGE_FILE_MACHINE_I386:
559 case COFF::IMAGE_FILE_MACHINE_AMD64:
574 if (index == COFF::IMAGE_SYM_UNDEFINED ||
575 index == COFF::IMAGE_SYM_ABSOLUTE ||
576 index == COFF::IMAGE_SYM_DEBUG)
698 case COFF::enum: res = #enum; break;
705 case COFF::IMAGE_FILE_MACHINE_AMD64:
728 case COFF::IMAGE_FILE_MACHINE_I386: