Lines Matching refs:ec
33 // Returns false if size is greater than the buffer size. And sets ec.
34 bool checkSize(const MemoryBuffer *m, error_code &ec, uint64_t size) {
36 ec = object_error::unexpected_eof;
44 error_code &ec,
50 ec = object_error::unexpected_eof;
111 if (error_code ec = getSection(symb->SectionNumber, Section))
112 return ec;
114 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
115 return ec;
129 if (error_code ec = getSection(symb->SectionNumber, Section))
130 return ec;
132 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
133 return ec;
155 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
156 return ec;
196 if (error_code ec = getSection(symb->SectionNumber, Section))
197 return ec;
199 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
200 return ec;
214 if (error_code ec = getSymbolName(Symb, name))
215 return ec;
229 if (error_code ec = getSection(symb->SectionNumber, Section))
230 return ec;
285 if (error_code ec = getSection(symb->SectionNumber, sec)) return ec;
331 error_code EC = getSectionContents(sec, Res);
333 return EC;
400 if (error_code ec = getSection(symb->SectionNumber, symb_sec)) return ec;
433 COFFObjectFile::COFFObjectFile(MemoryBuffer *Object, error_code &ec)
434 : ObjectFile(Binary::ID_COFF, Object, ec)
441 if (!checkSize(Data, ec, sizeof(coff_file_header))) return;
451 if (!checkSize(Data, ec, 0x3c + 8)) return;
455 ec = object_error::parse_failed;
462 if (!checkAddr(Data, ec, uintptr_t(Header), sizeof(coff_file_header)))
470 if (!checkAddr(Data, ec, uintptr_t(SectionTable),
478 if (!checkAddr(Data, ec, uintptr_t(SymbolTable),
486 if (!checkAddr(Data, ec, uintptr_t(StringTable), sizeof(ulittle32_t)))
490 if (!checkAddr(Data, ec, uintptr_t(StringTable), StringTableSize))
495 ec = object_error::parse_failed;
500 ec = object_error::success;
625 if (error_code ec = getString(Offset, Res))
626 return ec;
676 if (error_code ec = getString(Offset, Name))
677 return ec;
813 if (error_code ec = getSymbol(reloc->SymbolTableIndex, symb)) return ec;
817 if (error_code ec = getSymbolName(sym, symname)) return ec;
835 error_code ec;
836 return new COFFObjectFile(Object, ec);