Home | History | Annotate | Download | only in Target

Lines Matching refs:pSymbol

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