Lines Matching refs:pSymbol
647 bool GNULDBackend::finalizeTLSSymbol(LDSymbol& pSymbol) { in finalizeTLSSymbol() argument
649 if (!pSymbol.hasFragRef()) in finalizeTLSSymbol()
656 uint64_t value = pSymbol.fragRef()->getOutputOffset(); in finalizeTLSSymbol()
657 uint64_t addr = pSymbol.fragRef()->frag()->getParent()->getSection().addr(); in finalizeTLSSymbol()
658 pSymbol.setValue(value + addr - (*tls_seg)->vaddr()); in finalizeTLSSymbol()
870 LDSymbol& pSymbol, in emitSymbol32() argument
876 if (hasEntryInStrTab(pSymbol)) { in emitSymbol32()
878 ::memcpy((pStrtab + pStrtabsize), pSymbol.name(), pSymbol.nameSize()); in emitSymbol32()
882 pSym.st_value = pSymbol.value(); in emitSymbol32()
883 pSym.st_size = getSymbolSize(pSymbol); in emitSymbol32()
884 pSym.st_info = getSymbolInfo(pSymbol); in emitSymbol32()
885 pSym.st_other = pSymbol.visibility(); in emitSymbol32()
886 pSym.st_shndx = getSymbolShndx(pSymbol); in emitSymbol32()
891 LDSymbol& pSymbol, in emitSymbol64() argument
897 if (hasEntryInStrTab(pSymbol)) { in emitSymbol64()
899 ::memcpy((pStrtab + pStrtabsize), pSymbol.name(), pSymbol.nameSize()); in emitSymbol64()
903 pSym.st_value = pSymbol.value(); in emitSymbol64()
904 pSym.st_size = getSymbolSize(pSymbol); in emitSymbol64()
905 pSym.st_info = getSymbolInfo(pSymbol); in emitSymbol64()
906 pSym.st_other = pSymbol.visibility(); in emitSymbol64()
907 pSym.st_shndx = getSymbolShndx(pSymbol); in emitSymbol64()
1405 uint64_t GNULDBackend::getSymbolSize(const LDSymbol& pSymbol) const { in getSymbolSize()
1407 if (pSymbol.isDyn() || pSymbol.desc() == ResolveInfo::Undefined) in getSymbolSize()
1409 return pSymbol.resolveInfo()->size(); in getSymbolSize()
1413 uint64_t GNULDBackend::getSymbolInfo(const LDSymbol& pSymbol) const { in getSymbolInfo()
1416 if (pSymbol.resolveInfo()->isLocal()) in getSymbolInfo()
1418 else if (pSymbol.resolveInfo()->isGlobal()) in getSymbolInfo()
1420 else if (pSymbol.resolveInfo()->isWeak()) in getSymbolInfo()
1422 else if (pSymbol.resolveInfo()->isAbsolute()) { in getSymbolInfo()
1428 (pSymbol.visibility() == llvm::ELF::STV_INTERNAL || in getSymbolInfo()
1429 pSymbol.visibility() == llvm::ELF::STV_HIDDEN)) in getSymbolInfo()
1432 uint32_t type = pSymbol.resolveInfo()->type(); in getSymbolInfo()
1435 if (type == ResolveInfo::IndirectFunc && pSymbol.isDyn()) in getSymbolInfo()
1441 uint64_t GNULDBackend::getSymbolValue(const LDSymbol& pSymbol) const { in getSymbolValue()
1442 if (pSymbol.isDyn()) in getSymbolValue()
1445 return pSymbol.value(); in getSymbolValue()
1449 uint64_t GNULDBackend::getSymbolShndx(const LDSymbol& pSymbol) const { in getSymbolShndx()
1450 if (pSymbol.resolveInfo()->isAbsolute()) in getSymbolShndx()
1452 if (pSymbol.resolveInfo()->isCommon()) in getSymbolShndx()
1454 if (pSymbol.resolveInfo()->isUndef() || pSymbol.isDyn()) in getSymbolShndx()
1457 if (pSymbol.resolveInfo()->isDefine() && !pSymbol.hasFragRef()) in getSymbolShndx()
1460 assert(pSymbol.hasFragRef() && in getSymbolShndx()
1462 return pSymbol.fragRef()->frag()->getParent()->getSection().index(); in getSymbolShndx()
1466 size_t GNULDBackend::getSymbolIdx(const LDSymbol* pSymbol) const { in getSymbolIdx()
1468 m_pSymIndexMap->find(const_cast<LDSymbol*>(pSymbol)); in getSymbolIdx()
1475 bool GNULDBackend::isTemporary(const LDSymbol& pSymbol) const { in isTemporary()
1476 if (ResolveInfo::Local != pSymbol.binding()) in isTemporary()
1479 if (pSymbol.nameSize() < 2) in isTemporary()
1482 const char* name = pSymbol.name(); in isTemporary()
1492 if (pSymbol.nameSize() < 4) in isTemporary()
2633 bool GNULDBackend::isDynamicSymbol(const LDSymbol& pSymbol) const { in isDynamicSymbol()
2636 if (pSymbol.binding() == ResolveInfo::Local) in isDynamicSymbol()
2644 if (pSymbol.resolveInfo()->visibility() == ResolveInfo::Default || in isDynamicSymbol()
2645 pSymbol.resolveInfo()->visibility() == ResolveInfo::Protected) in isDynamicSymbol()