diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index ee48f4808136..7beef6ec125a 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -766,7 +766,6 @@ template void elf::reportUndefinedSymbols() { // Report an undefined symbol if necessary. // Returns true if the undefined symbol will produce an error message. -template static bool maybeReportUndefined(Symbol &sym, InputSectionBase &sec, uint64_t offset) { if (!sym.isUndefined() || sym.isWeak()) @@ -1125,7 +1124,7 @@ static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i, // Error if the target symbol is undefined. Symbol index 0 may be used by // marker relocations, e.g. R_*_NONE and R_ARM_V4BX. Don't error on them. - if (symIndex != 0 && maybeReportUndefined(sym, sec, rel.r_offset)) + if (symIndex != 0 && maybeReportUndefined(sym, sec, rel.r_offset)) return; const uint8_t *relocatedAddr = sec.data().begin() + rel.r_offset; diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index b8c8891648a4..d66a699e928e 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -154,7 +154,7 @@ void Writer::removeEmptyPTLoad(std::vector &phdrs) { }); } -template static void copySectionsIntoPartitions() { +static void copySectionsIntoPartitions() { std::vector newSections; for (unsigned part = 2; part != partitions.size() + 1; ++part) { for (InputSectionBase *s : inputSections) { @@ -546,7 +546,7 @@ template static void createSyntheticSections() { template void Writer::run() { // Make copies of any input sections that need to be copied into each // partition. - copySectionsIntoPartitions(); + copySectionsIntoPartitions(); // Create linker-synthesized sections such as .got or .plt. // Such sections are of type input section.