@@ -1333,8 +1333,7 @@ class elf::ArmCmseSGVeneer {
13331333ArmCmseSGSection::ArmCmseSGSection (Ctx &ctx)
13341334 : SyntheticSection(ctx, llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_EXECINSTR,
13351335 llvm::ELF::SHT_PROGBITS,
1336- /* alignment=*/ 32 , " .gnu.sgstubs" ),
1337- ctx(ctx) {
1336+ /* alignment=*/ 32 , " .gnu.sgstubs" ) {
13381337 entsize = ACLESESYM_SIZE;
13391338 // The range of addresses used in the CMSE import library should be fixed.
13401339 for (auto &[_, sym] : ctx.symtab ->cmseImportLib ) {
@@ -1384,7 +1383,7 @@ void ArmCmseSGSection::addSGVeneer(Symbol *acleSeSym, Symbol *sym) {
13841383 sgVeneers.emplace_back (ss);
13851384}
13861385
1387- void ArmCmseSGSection::writeTo (Ctx &ctx, uint8_t *buf) {
1386+ void ArmCmseSGSection::writeTo (uint8_t *buf) {
13881387 for (ArmCmseSGVeneer *s : sgVeneers) {
13891388 uint8_t *p = buf + s->offset ;
13901389 write16 (p + 0 , 0xe97f ); // SG
@@ -1401,14 +1400,14 @@ void ArmCmseSGSection::addMappingSymbol() {
14011400 addSyntheticLocal (" $t" , STT_NOTYPE, /* off=*/ 0 , /* size=*/ 0 , *this );
14021401}
14031402
1404- size_t ArmCmseSGSection::getSize (Ctx & ) const {
1403+ size_t ArmCmseSGSection::getSize () const {
14051404 if (sgVeneers.empty ())
14061405 return (impLibMaxAddr ? impLibMaxAddr - getVA () : 0 ) + newEntries * entsize;
14071406
14081407 return entries.size () * entsize;
14091408}
14101409
1411- void ArmCmseSGSection::finalizeContents (Ctx & ) {
1410+ void ArmCmseSGSection::finalizeContents () {
14121411 if (sgVeneers.empty ())
14131412 return ;
14141413
@@ -1476,8 +1475,8 @@ template <typename ELFT> void elf::writeARMCmseImportLib(Ctx &ctx) {
14761475 osec->recordSection (isec);
14771476 osec->finalizeInputSections (ctx);
14781477 osec->shName = shstrtab->addString (osec->name );
1479- osec->size = isec->getSize (ctx );
1480- isec->finalizeContents (ctx );
1478+ osec->size = isec->getSize ();
1479+ isec->finalizeContents ();
14811480 osec->offset = alignToPowerOf2 (off, osec->addralign );
14821481 off = osec->offset + osec->size ;
14831482 }
0 commit comments