File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1320,8 +1320,9 @@ void elf::processArmCmseSymbols(Ctx &ctx) {
1320
1320
MutableArrayRef<Symbol *> syms = file->getMutableSymbols ();
1321
1321
for (size_t i = 0 , e = syms.size (); i != e; ++i) {
1322
1322
StringRef symName = syms[i]->getName ();
1323
- if (ctx.symtab ->cmseSymMap .count (symName))
1324
- syms[i] = ctx.symtab ->cmseSymMap [symName].acleSeSym ;
1323
+ auto it = ctx.symtab ->cmseSymMap .find (symName);
1324
+ if (it != ctx.symtab ->cmseSymMap .end ())
1325
+ syms[i] = it->second .acleSeSym ;
1325
1326
}
1326
1327
});
1327
1328
}
@@ -1370,8 +1371,9 @@ void ArmCmseSGSection::addSGVeneer(Symbol *acleSeSym, Symbol *sym) {
1370
1371
// Only secure symbols with values equal to that of it's non-secure
1371
1372
// counterpart needs to be in the .gnu.sgstubs section.
1372
1373
std::unique_ptr<ArmCmseSGVeneer> ss;
1373
- if (ctx.symtab ->cmseImportLib .count (sym->getName ())) {
1374
- Defined *impSym = ctx.symtab ->cmseImportLib [sym->getName ()];
1374
+ auto it = ctx.symtab ->cmseImportLib .find (sym->getName ());
1375
+ if (it != ctx.symtab ->cmseImportLib .end ()) {
1376
+ Defined *impSym = it->second ;
1375
1377
ss = std::make_unique<ArmCmseSGVeneer>(sym, acleSeSym, impSym->value );
1376
1378
} else {
1377
1379
ss = std::make_unique<ArmCmseSGVeneer>(sym, acleSeSym);
You can’t perform that action at this time.
0 commit comments