Lines Matching refs:sym
40 void writePlt(uint8_t *buf, const Symbol &sym,
321 void ARM::writePlt(uint8_t *buf, const Symbol &sym, in writePlt() argument
325 uint64_t offset = sym.getGotPltVA() - pltEntryAddr - 8; in writePlt()
339 writePltLong(buf, sym.getGotPltVA(), pltEntryAddr); in writePlt()
347 uint64_t offset = sym.getGotPltVA() - pltEntryAddr - 12; in writePlt()
565 if (rel.sym->isFunc()) in encodeLdrGroup()
583 if (rel.sym->isFunc()) in encodeLdrsGroup()
627 assert(rel.sym); // R_ARM_CALL is always reached via relocate(). in relocate()
632 if (!rel.sym->isFunc() && isBlx != bit0Thumb) in relocate()
633 stateChangeWarning(loc, rel.type, *rel.sym); in relocate()
634 if (rel.sym->isFunc() ? bit0Thumb : isBlx) { in relocate()
683 assert(rel.sym); // R_ARM_THM_CALL is always reached via relocate(). in relocate()
689 if (!rel.sym->isFunc() && !rel.sym->isInPlt() && isBlx == useThumb) in relocate()
690 stateChangeWarning(loc, rel.type, *rel.sym); in relocate()
691 if ((rel.sym->isFunc() || rel.sym->isInPlt()) ? !useThumb : isBlx) { in relocate()
833 if (rel.sym->isFunc()) in relocate()
845 if (rel.sym->isFunc()) in relocate()
1056 for (Symbol *sym : file->getLocalSymbols()) { in addArmInputSectionMappingSymbols()
1057 auto *def = dyn_cast<Defined>(sym); in addArmInputSectionMappingSymbols()
1075 void elf::addArmSyntheticSectionMappingSymbol(Defined *sym) { in addArmSyntheticSectionMappingSymbol() argument
1076 if (!isArmMapSymbol(sym) && !isDataMapSymbol(sym) && !isThumbMapSymbol(sym)) in addArmSyntheticSectionMappingSymbol()
1078 if (auto *sec = cast_if_present<InputSection>(sym->section)) in addArmSyntheticSectionMappingSymbol()
1080 sectionMap[sec].push_back(sym); in addArmSyntheticSectionMappingSymbol()
1195 Defined *sym = reinterpret_cast<Defined *>(make<SymbolUnion>()); in importCmseSymbols() local
1198 memset(sym, 0, sizeof(Symbol)); in importCmseSymbols()
1199 sym->setName(CHECK(eSyms[i].getName(stringTable), this)); in importCmseSymbols()
1200 sym->value = eSym.st_value; in importCmseSymbols()
1201 sym->size = eSym.st_size; in importCmseSymbols()
1202 sym->type = eSym.getType(); in importCmseSymbols()
1203 sym->binding = eSym.getBinding(); in importCmseSymbols()
1204 sym->stOther = eSym.st_other; in importCmseSymbols()
1207 error("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1213 error("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1218 if (symtab.cmseImportLib.count(sym->getName())) { in importCmseSymbols()
1219 error("CMSE symbol '" + sym->getName() + in importCmseSymbols()
1225 warn("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1230 symtab.cmseImportLib[sym->getName()] = sym; in importCmseSymbols()
1236 static std::string checkCmseSymAttributes(Symbol *acleSeSym, Symbol *sym) { in checkCmseSymAttributes() argument
1249 for (auto [sym, type] : in checkCmseSymAttributes()
1250 {std::make_pair(acleSeSym, "special"), std::make_pair(sym, "entry")}) in checkCmseSymAttributes()
1251 if (auto err = check(sym, type)) in checkCmseSymAttributes()
1282 Symbol *sym = symtab.find(name); in processArmCmseSymbols() local
1283 if (!sym) { in processArmCmseSymbols()
1291 std::string errMsg = checkCmseSymAttributes(acleSeSym, sym); in processArmCmseSymbols()
1298 symtab.cmseSymMap[name] = {acleSeSym, sym}; in processArmCmseSymbols()
1315 ArmCmseSGVeneer(Symbol *sym, Symbol *acleSeSym, in ArmCmseSGVeneer() argument
1317 : sym(sym), acleSeSym(acleSeSym), entAddr{addr} {} in ArmCmseSGVeneer()
1321 Symbol *sym; member in elf::ArmCmseSGVeneer
1335 for (auto &[_, sym] : symtab.cmseImportLib) { in ArmCmseSGSection()
1336 if (impLibMaxAddr <= sym->value) in ArmCmseSGSection()
1337 impLibMaxAddr = sym->value + sym->size; in ArmCmseSGSection()
1344 cast<Defined>(entryFunc.sym)); in ArmCmseSGSection()
1345 for (auto &[_, sym] : symtab.cmseImportLib) { in ArmCmseSGSection()
1346 if (!symtab.inCMSEOutImpLib.count(sym->getName())) in ArmCmseSGSection()
1347 warn("entry function '" + sym->getName() + in ArmCmseSGSection()
1353 Symbol *sym = entryFunc.sym; in ArmCmseSGSection() local
1354 if (!symtab.inCMSEOutImpLib.count(sym->getName())) in ArmCmseSGSection()
1355 warn("new entry function '" + sym->getName() + in ArmCmseSGSection()
1361 void ArmCmseSGSection::addSGVeneer(Symbol *acleSeSym, Symbol *sym) { in addSGVeneer() argument
1362 entries.emplace_back(acleSeSym, sym); in addSGVeneer()
1363 if (symtab.cmseImportLib.count(sym->getName())) in addSGVeneer()
1364 symtab.inCMSEOutImpLib[sym->getName()] = true; in addSGVeneer()
1366 if (acleSeSym->file != sym->file || in addSGVeneer()
1367 cast<Defined>(*acleSeSym).value != cast<Defined>(*sym).value) in addSGVeneer()
1372 if (symtab.cmseImportLib.count(sym->getName())) { in addSGVeneer()
1373 Defined *impSym = symtab.cmseImportLib[sym->getName()]; in addSGVeneer()
1374 ss = make<ArmCmseSGVeneer>(sym, acleSeSym, impSym->value); in addSGVeneer()
1376 ss = make<ArmCmseSGVeneer>(sym, acleSeSym); in addSGVeneer()
1430 Defined(file, StringRef(), s->sym->binding, s->sym->stOther, s->sym->type, in finalizeContents()
1432 .overwrite(*s->sym); in finalizeContents()
1456 return a.second.sym->getVA() < b.second.sym->getVA(); in writeARMCmseImportLib()
1460 Defined *d = cast<Defined>(p.second.sym); in writeARMCmseImportLib()