@@ -181,7 +181,6 @@ class PPC64 final : public TargetInfo {
181181 uint64_t pltEntryAddr) const override ;
182182 template <class ELFT , class RelTy >
183183 void scanSectionImpl (InputSectionBase &, Relocs<RelTy>);
184- template <class ELFT > void scanSection1 (InputSectionBase &);
185184 void scanSection (InputSectionBase &) override ;
186185 void relocate (uint8_t *loc, const Relocation &rel,
187186 uint64_t val) const override ;
@@ -1312,8 +1311,7 @@ void PPC64::scanSectionImpl(InputSectionBase &sec, Relocs<RelTy> rels) {
13121311 uint32_t symIdx = rel.getSymbol (false );
13131312 Symbol &sym = sec.getFile <ELFT>()->getSymbol (symIdx);
13141313 RelType type = rel.getType (false );
1315- RelExpr expr =
1316- ctx.target ->getRelExpr (type, sym, sec.content ().data () + offset);
1314+ RelExpr expr = getRelExpr (type, sym, sec.content ().data () + offset);
13171315 if (expr == R_NONE)
13181316 continue ;
13191317 if (sym.isUndefined () && symIdx != 0 &&
@@ -1373,19 +1371,11 @@ void PPC64::scanSectionImpl(InputSectionBase &sec, Relocs<RelTy> rels) {
13731371 }
13741372}
13751373
1376- template <class ELFT > void PPC64::scanSection1 (InputSectionBase &sec) {
1377- auto relocs = sec.template relsOrRelas <ELFT>();
1378- if (relocs.areRelocsCrel ())
1379- scanSectionImpl<ELFT>(sec, relocs.crels );
1380- else
1381- scanSectionImpl<ELFT>(sec, relocs.relas );
1382- }
1383-
13841374void PPC64::scanSection (InputSectionBase &sec) {
13851375 if (ctx.arg .isLE )
1386- scanSection1<ELF64LE>(sec);
1376+ elf:: scanSection1<PPC64, ELF64LE>(* this , sec);
13871377 else
1388- scanSection1<ELF64BE>(sec);
1378+ elf:: scanSection1<PPC64, ELF64BE>(* this , sec);
13891379}
13901380
13911381void PPC64::relocate (uint8_t *loc, const Relocation &rel, uint64_t val) const {
0 commit comments