Lines Matching refs:Symb
58 const coff_symbol *COFFObjectFile::toSymb(DataRefImpl Symb) const {
59 const coff_symbol *addr = reinterpret_cast<const coff_symbol*>(Symb.p);
93 error_code COFFObjectFile::getSymbolNext(DataRefImpl Symb,
95 const coff_symbol *symb = toSymb(Symb);
96 symb += 1 + symb->NumberOfAuxSymbols;
97 Symb.p = reinterpret_cast<uintptr_t>(symb);
98 Result = SymbolRef(Symb, this);
102 error_code COFFObjectFile::getSymbolName(DataRefImpl Symb,
104 const coff_symbol *symb = toSymb(Symb);
105 return getSymbolName(symb, Result);
108 error_code COFFObjectFile::getSymbolFileOffset(DataRefImpl Symb,
110 const coff_symbol *symb = toSymb(Symb);
112 if (error_code ec = getSection(symb->SectionNumber, Section))
115 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
120 Result = Section->PointerToRawData + symb->Value;
122 Result = symb->Value;
126 error_code COFFObjectFile::getSymbolAddress(DataRefImpl Symb,
128 const coff_symbol *symb = toSymb(Symb);
130 if (error_code ec = getSection(symb->SectionNumber, Section))
133 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
138 Result = Section->VirtualAddress + symb->Value;
140 Result = symb->Value;
144 error_code COFFObjectFile::getSymbolType(DataRefImpl Symb,
146 const coff_symbol *symb = toSymb(Symb);
148 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
149 symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) {
152 if (symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
156 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
166 error_code COFFObjectFile::getSymbolFlags(DataRefImpl Symb,
168 const coff_symbol *symb = toSymb(Symb);
173 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
174 symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED)
178 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
181 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL)
184 if (symb->SectionNumber == COFF::IMAGE_SYM_ABSOLUTE)
190 error_code COFFObjectFile::getSymbolSize(DataRefImpl Symb,
195 const coff_symbol *symb = toSymb(Symb);
197 if (error_code ec = getSection(symb->SectionNumber, Section))
200 if (error_code ec = getSymbolNMTypeChar(Symb, Type))
205 Result = Section->SizeOfRawData - symb->Value;
211 error_code COFFObjectFile::getSymbolNMTypeChar(DataRefImpl Symb,
213 const coff_symbol *symb = toSymb(Symb);
215 if (error_code ec = getSymbolName(Symb, name))
228 if (symb->SectionNumber > 0) {
230 if (error_code ec = getSection(symb->SectionNumber, Section))
235 switch (symb->SectionNumber) {
238 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL) {
241 } else if (symb->Value != 0) // Check for common symbols.
267 else if ( symb->StorageClass == COFF::IMAGE_SYM_CLASS_STATIC
268 && symb->Value == 0)
272 if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
279 error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb,
281 const coff_symbol *symb = toSymb(Symb);
282 if (symb->SectionNumber <= COFF::IMAGE_SYM_UNDEFINED)
286 if (error_code ec = getSection(symb->SectionNumber, sec)) return ec;
294 error_code COFFObjectFile::getSymbolValue(DataRefImpl Symb,
396 DataRefImpl Symb,
399 const coff_symbol *symb = toSymb(Symb);
401 if (error_code ec = getSection(symb->SectionNumber, symb_sec)) return ec;
758 DataRefImpl Symb;
759 Symb.p = reinterpret_cast<uintptr_t>(SymbolTable + R->SymbolTableIndex);
760 return symbol_iterator(SymbolRef(Symb, this));
843 const coff_symbol *symb = 0;
844 if (error_code ec = getSymbol(reloc->SymbolTableIndex, symb)) return ec;
846 sym.p = reinterpret_cast<uintptr_t>(symb);