@@ -937,52 +937,50 @@ template <class ELFT> void MipsGotSection<ELFT>::writeTo(uint8_t *Buf) {
937
937
}
938
938
}
939
939
940
- template <class ELFT >
941
- GotPltSection<ELFT>::GotPltSection()
940
+ GotPltSection::GotPltSection ()
942
941
: SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
943
942
Target->GotPltEntrySize, " .got.plt" ) {}
944
943
945
- template < class ELFT > void GotPltSection<ELFT> ::addEntry(SymbolBody &Sym) {
944
+ void GotPltSection::addEntry (SymbolBody &Sym) {
946
945
Sym.GotPltIndex = Target->GotPltHeaderEntriesNum + Entries.size ();
947
946
Entries.push_back (&Sym);
948
947
}
949
948
950
- template < class ELFT > size_t GotPltSection<ELFT> ::getSize() const {
949
+ size_t GotPltSection::getSize () const {
951
950
return (Target->GotPltHeaderEntriesNum + Entries.size ()) *
952
951
Target->GotPltEntrySize ;
953
952
}
954
953
955
- template < class ELFT > void GotPltSection<ELFT> ::writeTo(uint8_t *Buf) {
954
+ void GotPltSection::writeTo (uint8_t *Buf) {
956
955
Target->writeGotPltHeader (Buf);
957
956
Buf += Target->GotPltHeaderEntriesNum * Target->GotPltEntrySize ;
958
957
for (const SymbolBody *B : Entries) {
959
958
Target->writeGotPlt (Buf, *B);
960
- Buf += sizeof (uintX_t) ;
959
+ Buf += Config-> is64Bit () ? 8 : 4 ;
961
960
}
962
961
}
963
962
964
963
// On ARM the IgotPltSection is part of the GotSection, on other Targets it is
965
964
// part of the .got.plt
966
- template <class ELFT >
967
- IgotPltSection<ELFT>::IgotPltSection()
965
+ IgotPltSection::IgotPltSection ()
968
966
: SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS,
969
967
Target->GotPltEntrySize,
970
968
Config->EMachine == EM_ARM ? " .got" : " .got.plt" ) {}
971
969
972
- template < class ELFT > void IgotPltSection<ELFT> ::addEntry(SymbolBody &Sym) {
970
+ void IgotPltSection::addEntry (SymbolBody &Sym) {
973
971
Sym.IsInIgot = true ;
974
972
Sym.GotPltIndex = Entries.size ();
975
973
Entries.push_back (&Sym);
976
974
}
977
975
978
- template < class ELFT > size_t IgotPltSection<ELFT> ::getSize() const {
976
+ size_t IgotPltSection::getSize () const {
979
977
return Entries.size () * Target->GotPltEntrySize ;
980
978
}
981
979
982
- template < class ELFT > void IgotPltSection<ELFT> ::writeTo(uint8_t *Buf) {
980
+ void IgotPltSection::writeTo (uint8_t *Buf) {
983
981
for (const SymbolBody *B : Entries) {
984
982
Target->writeIgotPlt (Buf, *B);
985
- Buf += sizeof (uintX_t) ;
983
+ Buf += Config-> is64Bit () ? 8 : 4 ;
986
984
}
987
985
}
988
986
@@ -2324,16 +2322,6 @@ template class elf::MipsGotSection<ELF32BE>;
2324
2322
template class elf ::MipsGotSection<ELF64LE>;
2325
2323
template class elf ::MipsGotSection<ELF64BE>;
2326
2324
2327
- template class elf ::GotPltSection<ELF32LE>;
2328
- template class elf ::GotPltSection<ELF32BE>;
2329
- template class elf ::GotPltSection<ELF64LE>;
2330
- template class elf ::GotPltSection<ELF64BE>;
2331
-
2332
- template class elf ::IgotPltSection<ELF32LE>;
2333
- template class elf ::IgotPltSection<ELF32BE>;
2334
- template class elf ::IgotPltSection<ELF64LE>;
2335
- template class elf ::IgotPltSection<ELF64BE>;
2336
-
2337
2325
template class elf ::StringTableSection<ELF32LE>;
2338
2326
template class elf ::StringTableSection<ELF32BE>;
2339
2327
template class elf ::StringTableSection<ELF64LE>;
0 commit comments