Lines Matching refs:sym

40   void writePlt(uint8_t *buf, const Symbol &sym,
280 void ARM::writePlt(uint8_t *buf, const Symbol &sym, in writePlt() argument
293 uint64_t offset = sym.getGotPltVA() - pltEntryAddr - 8; in writePlt()
296 writePltLong(buf, sym.getGotPltVA(), pltEntryAddr); in writePlt()
488 if (rel.sym->isFunc()) in encodeLdrGroup()
506 if (rel.sym->isFunc()) in encodeLdrsGroup()
551 assert(rel.sym); // R_ARM_CALL is always reached via relocate(). in relocate()
556 if (!rel.sym->isFunc() && isBlx != bit0Thumb) in relocate()
557 stateChangeWarning(loc, rel.type, *rel.sym); in relocate()
558 if (rel.sym->isFunc() ? bit0Thumb : isBlx) { in relocate()
607 assert(rel.sym); // R_ARM_THM_CALL is always reached via relocate(). in relocate()
612 if (!rel.sym->isFunc() && !rel.sym->isInPlt() && isBlx == bit0Thumb) in relocate()
613 stateChangeWarning(loc, rel.type, *rel.sym); in relocate()
614 if (rel.sym->isFunc() || rel.sym->isInPlt() ? !bit0Thumb : isBlx) { in relocate()
756 if (rel.sym->isFunc()) in relocate()
768 if (rel.sym->isFunc()) in relocate()
979 for (Symbol *sym : file->getLocalSymbols()) { in addArmInputSectionMappingSymbols()
980 auto *def = dyn_cast<Defined>(sym); in addArmInputSectionMappingSymbols()
998 void elf::addArmSyntheticSectionMappingSymbol(Defined *sym) { in addArmSyntheticSectionMappingSymbol() argument
999 if (!isArmMapSymbol(sym) && !isDataMapSymbol(sym) && !isThumbMapSymbol(sym)) in addArmSyntheticSectionMappingSymbol()
1001 if (auto *sec = cast_if_present<InputSection>(sym->section)) in addArmSyntheticSectionMappingSymbol()
1003 sectionMap[sec].push_back(sym); in addArmSyntheticSectionMappingSymbol()
1118 Defined *sym = reinterpret_cast<Defined *>(make<SymbolUnion>()); in importCmseSymbols() local
1121 memset(sym, 0, sizeof(Symbol)); in importCmseSymbols()
1122 sym->setName(CHECK(eSyms[i].getName(stringTable), this)); in importCmseSymbols()
1123 sym->value = eSym.st_value; in importCmseSymbols()
1124 sym->size = eSym.st_size; in importCmseSymbols()
1125 sym->type = eSym.getType(); in importCmseSymbols()
1126 sym->binding = eSym.getBinding(); in importCmseSymbols()
1127 sym->stOther = eSym.st_other; in importCmseSymbols()
1130 error("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1136 error("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1141 if (symtab.cmseImportLib.count(sym->getName())) { in importCmseSymbols()
1142 error("CMSE symbol '" + sym->getName() + in importCmseSymbols()
1148 warn("CMSE symbol '" + sym->getName() + "' in import library '" + in importCmseSymbols()
1153 symtab.cmseImportLib[sym->getName()] = sym; in importCmseSymbols()
1159 static std::string checkCmseSymAttributes(Symbol *acleSeSym, Symbol *sym) { in checkCmseSymAttributes() argument
1172 for (auto [sym, type] : in checkCmseSymAttributes()
1173 {std::make_pair(acleSeSym, "special"), std::make_pair(sym, "entry")}) in checkCmseSymAttributes()
1174 if (auto err = check(sym, type)) in checkCmseSymAttributes()
1205 Symbol *sym = symtab.find(name); in processArmCmseSymbols() local
1206 if (!sym) { in processArmCmseSymbols()
1214 std::string errMsg = checkCmseSymAttributes(acleSeSym, sym); in processArmCmseSymbols()
1221 symtab.cmseSymMap[name] = {acleSeSym, sym}; in processArmCmseSymbols()
1238 ArmCmseSGVeneer(Symbol *sym, Symbol *acleSeSym, in ArmCmseSGVeneer() argument
1240 : sym(sym), acleSeSym(acleSeSym), entAddr{addr} {} in ArmCmseSGVeneer()
1244 Symbol *sym; member in elf::ArmCmseSGVeneer
1258 for (auto &[_, sym] : symtab.cmseImportLib) { in ArmCmseSGSection()
1259 if (impLibMaxAddr <= sym->value) in ArmCmseSGSection()
1260 impLibMaxAddr = sym->value + sym->size; in ArmCmseSGSection()
1267 cast<Defined>(entryFunc.sym)); in ArmCmseSGSection()
1268 for (auto &[_, sym] : symtab.cmseImportLib) { in ArmCmseSGSection()
1269 if (!symtab.inCMSEOutImpLib.count(sym->getName())) in ArmCmseSGSection()
1270 warn("entry function '" + sym->getName() + in ArmCmseSGSection()
1276 Symbol *sym = entryFunc.sym; in ArmCmseSGSection() local
1277 if (!symtab.inCMSEOutImpLib.count(sym->getName())) in ArmCmseSGSection()
1278 warn("new entry function '" + sym->getName() + in ArmCmseSGSection()
1284 void ArmCmseSGSection::addSGVeneer(Symbol *acleSeSym, Symbol *sym) { in addSGVeneer() argument
1285 entries.emplace_back(acleSeSym, sym); in addSGVeneer()
1286 if (symtab.cmseImportLib.count(sym->getName())) in addSGVeneer()
1287 symtab.inCMSEOutImpLib[sym->getName()] = true; in addSGVeneer()
1289 if (acleSeSym->file != sym->file || in addSGVeneer()
1290 cast<Defined>(*acleSeSym).value != cast<Defined>(*sym).value) in addSGVeneer()
1295 if (symtab.cmseImportLib.count(sym->getName())) { in addSGVeneer()
1296 Defined *impSym = symtab.cmseImportLib[sym->getName()]; in addSGVeneer()
1297 ss = make<ArmCmseSGVeneer>(sym, acleSeSym, impSym->value); in addSGVeneer()
1299 ss = make<ArmCmseSGVeneer>(sym, acleSeSym); in addSGVeneer()
1353 Defined(file, StringRef(), s->sym->binding, s->sym->stOther, s->sym->type, in finalizeContents()
1355 .overwrite(*s->sym); in finalizeContents()
1379 return a.second.sym->getVA() < b.second.sym->getVA(); in writeARMCmseImportLib()
1383 Defined *d = cast<Defined>(p.second.sym); in writeARMCmseImportLib()