@@ -403,7 +403,7 @@ EhFrameSection::EhFrameSection(Ctx &ctx)
403
403
// Search for an existing CIE record or create a new one.
404
404
// CIE records from input object files are uniquified by their contents
405
405
// and where their relocations point to.
406
- template <class ELFT , class RelTy >
406
+ template <class RelTy >
407
407
CieRecord *EhFrameSection::addCie (EhSectionPiece &cie, ArrayRef<RelTy> rels) {
408
408
Symbol *personality = nullptr ;
409
409
unsigned firstRelI = cie.firstRelocation ;
@@ -424,7 +424,7 @@ CieRecord *EhFrameSection::addCie(EhSectionPiece &cie, ArrayRef<RelTy> rels) {
424
424
425
425
// There is one FDE per function. Returns a non-null pointer to the function
426
426
// symbol if the given FDE points to a live function.
427
- template <class ELFT , class RelTy >
427
+ template <class RelTy >
428
428
Defined *EhFrameSection::isFdeLive (EhSectionPiece &fde, ArrayRef<RelTy> rels) {
429
429
auto *sec = cast<EhInputSection>(fde.sec );
430
430
unsigned firstRelI = fde.firstRelocation ;
@@ -456,14 +456,14 @@ template <class ELFT, class RelTy>
456
456
void EhFrameSection::addRecords (EhInputSection *sec, ArrayRef<RelTy> rels) {
457
457
offsetToCie.clear ();
458
458
for (EhSectionPiece &cie : sec->cies )
459
- offsetToCie[cie.inputOff ] = addCie<ELFT >(cie, rels);
459
+ offsetToCie[cie.inputOff ] = addCie<RelTy >(cie, rels);
460
460
for (EhSectionPiece &fde : sec->fdes ) {
461
461
uint32_t id = endian::read32<ELFT::Endianness>(fde.data ().data () + 4 );
462
462
CieRecord *rec = offsetToCie[fde.inputOff + 4 - id];
463
463
if (!rec)
464
464
Fatal (ctx) << sec << " : invalid CIE reference" ;
465
465
466
- if (!isFdeLive<ELFT> (fde, rels))
466
+ if (!isFdeLive (fde, rels))
467
467
continue ;
468
468
rec->fdes .push_back (&fde);
469
469
numFdes++;
@@ -497,7 +497,7 @@ void EhFrameSection::iterateFDEWithLSDAAux(
497
497
continue ;
498
498
499
499
// The CIE has a LSDA argument. Call fn with d's section.
500
- if (Defined *d = isFdeLive<ELFT> (fde, rels))
500
+ if (Defined *d = isFdeLive (fde, rels))
501
501
if (auto *s = dyn_cast_or_null<InputSection>(d->section ))
502
502
fn (*s);
503
503
}
0 commit comments