summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 96be5a1b4d3..8614a6097e0 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -263,7 +263,6 @@ template <class ELFT> void OutputSection::writeTo(uint8_t *Buf) {
writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size);
}
-template <class ELFT>
static void finalizeShtGroup(OutputSection *OS,
InputSection *Section) {
assert(Config->Relocatable);
@@ -274,12 +273,11 @@ static void finalizeShtGroup(OutputSection *OS,
// sh_info then contain index of an entry in symbol table section which
// provides signature of the section group.
- ObjFile<ELFT> *Obj = Section->getFile<ELFT>();
- ArrayRef<Symbol *> Symbols = Obj->getSymbols();
+ ArrayRef<Symbol *> Symbols = Section->File->getSymbols();
OS->Info = In.SymTab->getSymbolIndex(Symbols[Section->Info]);
}
-template <class ELFT> void OutputSection::finalize() {
+void OutputSection::finalize() {
if (Type == SHT_NOBITS)
for (BaseCommand *Base : SectionCommands)
if (isa<ByteCommand>(Base))
@@ -298,7 +296,7 @@ template <class ELFT> void OutputSection::finalize() {
}
if (Type == SHT_GROUP) {
- finalizeShtGroup<ELFT>(this, First);
+ finalizeShtGroup(this, First);
return;
}
@@ -428,8 +426,3 @@ template void OutputSection::maybeCompress<ELF32LE>();
template void OutputSection::maybeCompress<ELF32BE>();
template void OutputSection::maybeCompress<ELF64LE>();
template void OutputSection::maybeCompress<ELF64BE>();
-
-template void OutputSection::finalize<ELF32LE>();
-template void OutputSection::finalize<ELF32BE>();
-template void OutputSection::finalize<ELF64LE>();
-template void OutputSection::finalize<ELF64BE>();
OpenPOWER on IntegriCloud