Lines Matching refs:pSymbol
668 bool GNULDBackend::finalizeTLSSymbol(LDSymbol& pSymbol) in finalizeTLSSymbol() argument
671 if (!pSymbol.hasFragRef()) in finalizeTLSSymbol()
677 uint64_t value = pSymbol.fragRef()->getOutputOffset(); in finalizeTLSSymbol()
678 uint64_t addr = pSymbol.fragRef()->frag()->getParent()->getSection().addr(); in finalizeTLSSymbol()
679 pSymbol.setValue(value + addr - tls_seg->vaddr()); in finalizeTLSSymbol()
902 LDSymbol& pSymbol, in emitSymbol32() argument
909 if (hasEntryInStrTab(pSymbol)) { in emitSymbol32()
911 strcpy((pStrtab + pStrtabsize), pSymbol.name()); in emitSymbol32()
916 pSym.st_value = pSymbol.value(); in emitSymbol32()
917 pSym.st_size = getSymbolSize(pSymbol); in emitSymbol32()
918 pSym.st_info = getSymbolInfo(pSymbol); in emitSymbol32()
919 pSym.st_other = pSymbol.visibility(); in emitSymbol32()
920 pSym.st_shndx = getSymbolShndx(pSymbol); in emitSymbol32()
925 LDSymbol& pSymbol, in emitSymbol64() argument
932 if (hasEntryInStrTab(pSymbol)) { in emitSymbol64()
934 strcpy((pStrtab + pStrtabsize), pSymbol.name()); in emitSymbol64()
939 pSym.st_value = pSymbol.value(); in emitSymbol64()
940 pSym.st_size = getSymbolSize(pSymbol); in emitSymbol64()
941 pSym.st_info = getSymbolInfo(pSymbol); in emitSymbol64()
942 pSym.st_other = pSymbol.visibility(); in emitSymbol64()
943 pSym.st_shndx = getSymbolShndx(pSymbol); in emitSymbol64()
1438 uint64_t GNULDBackend::getSymbolSize(const LDSymbol& pSymbol) const in getSymbolSize()
1442 if (pSymbol.isDyn() || pSymbol.desc() == ResolveInfo::Undefined) in getSymbolSize()
1444 return pSymbol.resolveInfo()->size(); in getSymbolSize()
1448 uint64_t GNULDBackend::getSymbolInfo(const LDSymbol& pSymbol) const in getSymbolInfo()
1452 if (pSymbol.resolveInfo()->isLocal()) in getSymbolInfo()
1454 else if (pSymbol.resolveInfo()->isGlobal()) in getSymbolInfo()
1456 else if (pSymbol.resolveInfo()->isWeak()) in getSymbolInfo()
1458 else if (pSymbol.resolveInfo()->isAbsolute()) { in getSymbolInfo()
1464 (pSymbol.visibility() == llvm::ELF::STV_INTERNAL || in getSymbolInfo()
1465 pSymbol.visibility() == llvm::ELF::STV_HIDDEN)) in getSymbolInfo()
1468 uint32_t type = pSymbol.resolveInfo()->type(); in getSymbolInfo()
1471 if (type == ResolveInfo::IndirectFunc && pSymbol.isDyn()) in getSymbolInfo()
1477 uint64_t GNULDBackend::getSymbolValue(const LDSymbol& pSymbol) const in getSymbolValue()
1479 if (pSymbol.isDyn()) in getSymbolValue()
1482 return pSymbol.value(); in getSymbolValue()
1487 GNULDBackend::getSymbolShndx(const LDSymbol& pSymbol) const in getSymbolShndx()
1489 if (pSymbol.resolveInfo()->isAbsolute()) in getSymbolShndx()
1491 if (pSymbol.resolveInfo()->isCommon()) in getSymbolShndx()
1493 if (pSymbol.resolveInfo()->isUndef() || pSymbol.isDyn()) in getSymbolShndx()
1496 if (pSymbol.resolveInfo()->isLocal() && in getSymbolShndx()
1498 switch (pSymbol.type()) { in getSymbolShndx()
1505 if (pSymbol.resolveInfo()->isDefine() && !pSymbol.hasFragRef()) in getSymbolShndx()
1508 assert(pSymbol.hasFragRef() && "symbols must have fragment reference to get its index"); in getSymbolShndx()
1509 return pSymbol.fragRef()->frag()->getParent()->getSection().index(); in getSymbolShndx()
1513 size_t GNULDBackend::getSymbolIdx(const LDSymbol* pSymbol) const in getSymbolIdx()
1515 HashTableType::iterator entry = m_pSymIndexMap->find(const_cast<LDSymbol *>(pSymbol)); in getSymbolIdx()
1521 bool GNULDBackend::isTemporary(const LDSymbol& pSymbol) const in isTemporary()
1523 if (ResolveInfo::Local != pSymbol.binding()) in isTemporary()
1526 if (pSymbol.nameSize() < 2) in isTemporary()
1529 const char* name = pSymbol.name(); in isTemporary()
1541 if (pSymbol.nameSize() < 4) in isTemporary()
2330 bool GNULDBackend::isDynamicSymbol(const LDSymbol& pSymbol) in isDynamicSymbol() argument
2334 if (pSymbol.binding() == ResolveInfo::Local) in isDynamicSymbol()
2342 if (pSymbol.resolveInfo()->visibility() == ResolveInfo::Default || in isDynamicSymbol()
2343 pSymbol.resolveInfo()->visibility() == ResolveInfo::Protected) in isDynamicSymbol()