@@ -1445,21 +1445,22 @@ void ArmCmseSGSection::finalizeContents() {
1445
1445
// See Arm® v8-M Security Extensions: Requirements on Development Tools
1446
1446
// https://developer.arm.com/documentation/ecm0359818/latest
1447
1447
template <typename ELFT> void elf::writeARMCmseImportLib (Ctx &ctx) {
1448
- StringTableSection *shstrtab =
1449
- make<StringTableSection>(ctx, " .shstrtab" , /* dynamic=*/ false );
1450
- StringTableSection *strtab =
1451
- make<StringTableSection>(ctx, " .strtab" , /* dynamic=*/ false );
1452
- SymbolTableBaseSection *impSymTab =
1453
- make<SymbolTableSection<ELFT>>(ctx, *strtab);
1448
+ auto shstrtab =
1449
+ std::make_unique<StringTableSection>(ctx, " .shstrtab" , /* dynamic=*/ false );
1450
+ auto strtab =
1451
+ std::make_unique<StringTableSection>(ctx, " .strtab" , /* dynamic=*/ false );
1452
+ auto impSymTab = std::make_unique<SymbolTableSection<ELFT>>(ctx, *strtab);
1454
1453
1455
1454
SmallVector<std::pair<std::unique_ptr<OutputSection>, SyntheticSection *>, 0 >
1456
1455
osIsPairs;
1457
1456
osIsPairs.emplace_back (
1458
- std::make_unique<OutputSection>(ctx, strtab->name , 0 , 0 ), strtab);
1457
+ std::make_unique<OutputSection>(ctx, strtab->name , 0 , 0 ), strtab. get () );
1459
1458
osIsPairs.emplace_back (
1460
- std::make_unique<OutputSection>(ctx, impSymTab->name , 0 , 0 ), impSymTab);
1459
+ std::make_unique<OutputSection>(ctx, impSymTab->name , 0 , 0 ),
1460
+ impSymTab.get ());
1461
1461
osIsPairs.emplace_back (
1462
- std::make_unique<OutputSection>(ctx, shstrtab->name , 0 , 0 ), shstrtab);
1462
+ std::make_unique<OutputSection>(ctx, shstrtab->name , 0 , 0 ),
1463
+ shstrtab.get ());
1463
1464
1464
1465
llvm::sort (ctx.symtab ->cmseSymMap , [&](const auto &a, const auto &b) {
1465
1466
return a.second .sym ->getVA (ctx) < b.second .sym ->getVA (ctx);
0 commit comments