diff options
Diffstat (limited to 'lld/ELF')
-rw-r--r-- | lld/ELF/AArch64ErrataFix.cpp | 16 | ||||
-rw-r--r-- | lld/ELF/Driver.cpp | 24 | ||||
-rw-r--r-- | lld/ELF/DriverUtils.cpp | 12 | ||||
-rw-r--r-- | lld/ELF/ICF.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/InputFiles.cpp | 18 | ||||
-rw-r--r-- | lld/ELF/InputSection.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/MarkLive.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/Relocations.cpp | 8 | ||||
-rw-r--r-- | lld/ELF/ScriptParser.cpp | 6 | ||||
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 8 | ||||
-rw-r--r-- | lld/ELF/Thunks.cpp | 32 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 10 |
12 files changed, 72 insertions, 72 deletions
diff --git a/lld/ELF/AArch64ErrataFix.cpp b/lld/ELF/AArch64ErrataFix.cpp index e72e25cb43f..7473ab61c45 100644 --- a/lld/ELF/AArch64ErrataFix.cpp +++ b/lld/ELF/AArch64ErrataFix.cpp @@ -398,9 +398,9 @@ lld::elf::Patch843419Section::Patch843419Section(InputSection *p, uint64_t off) patchee(p), patcheeOffset(off) { this->parent = p->getParent(); patchSym = addSyntheticLocal( - Saver.save("__CortexA53843419_" + utohexstr(getLDSTAddr())), STT_FUNC, 0, + saver.save("__CortexA53843419_" + utohexstr(getLDSTAddr())), STT_FUNC, 0, getSize(), *this); - addSyntheticLocal(Saver.save("$x"), STT_NOTYPE, 0, 0, *this); + addSyntheticLocal(saver.save("$x"), STT_NOTYPE, 0, 0, *this); } uint64_t lld::elf::Patch843419Section::getLDSTAddr() const { @@ -485,8 +485,8 @@ void AArch64Err843419Patcher::init() { void AArch64Err843419Patcher::insertPatches( InputSectionDescription &isd, std::vector<Patch843419Section *> &patches) { uint64_t isecLimit; - uint64_t prevISLimit = isd.sections.front()->outSecOff; - uint64_t patchUpperBound = prevISLimit + target->getThunkSectionSpacing(); + uint64_t prevIsecLimit = isd.sections.front()->outSecOff; + uint64_t patchUpperBound = prevIsecLimit + target->getThunkSectionSpacing(); uint64_t outSecAddr = isd.sections.front()->getParent()->addr; // Set the OutSecOff of patches to the place where we want to insert them. @@ -498,14 +498,14 @@ void AArch64Err843419Patcher::insertPatches( isecLimit = isec->outSecOff + isec->getSize(); if (isecLimit > patchUpperBound) { while (patchIt != patchEnd) { - if ((*patchIt)->getLDSTAddr() - outSecAddr >= prevISLimit) + if ((*patchIt)->getLDSTAddr() - outSecAddr >= prevIsecLimit) break; - (*patchIt)->outSecOff = prevISLimit; + (*patchIt)->outSecOff = prevIsecLimit; ++patchIt; } - patchUpperBound = prevISLimit + target->getThunkSectionSpacing(); + patchUpperBound = prevIsecLimit + target->getThunkSectionSpacing(); } - prevISLimit = isecLimit; + prevIsecLimit = isecLimit; } for (; patchIt != patchEnd; ++patchIt) { (*patchIt)->outSecOff = isecLimit; diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 77ef2ba5f12..f4f52b4b6fa 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -76,13 +76,13 @@ static void readConfigs(opt::InputArgList &args); bool elf::link(ArrayRef<const char *> args, bool canExitEarly, raw_ostream &error) { - errorHandler().LogName = args::getFilenameWithoutExe(args[0]); - errorHandler().ErrorLimitExceededMsg = + errorHandler().logName = args::getFilenameWithoutExe(args[0]); + errorHandler().errorLimitExceededMsg = "too many errors emitted, stopping now (use " "-error-limit=0 to see all errors)"; - errorHandler().ErrorOS = &error; - errorHandler().ExitEarly = canExitEarly; - errorHandler().ColorDiagnostics = error.has_colors(); + errorHandler().errorOS = &error; + errorHandler().exitEarly = canExitEarly; + errorHandler().colorDiagnostics = error.has_colors(); inputSections.clear(); outputSections.clear(); @@ -399,7 +399,7 @@ void LinkerDriver::main(ArrayRef<const char *> argsArr) { opt::InputArgList args = parser.parse(argsArr.slice(1)); // Interpret this flag early because error() depends on them. - errorHandler().ErrorLimit = args::getInteger(args, OPT_error_limit, 20); + errorHandler().errorLimit = args::getInteger(args, OPT_error_limit, 20); checkZOptions(args); // Handle -help @@ -783,10 +783,10 @@ static void parseClangOption(StringRef opt, const Twine &msg) { // Initializes Config members by the command line options. static void readConfigs(opt::InputArgList &args) { - errorHandler().Verbose = args.hasArg(OPT_verbose); - errorHandler().FatalWarnings = + errorHandler().verbose = args.hasArg(OPT_verbose); + errorHandler().fatalWarnings = args.hasFlag(OPT_fatal_warnings, OPT_no_fatal_warnings, false); - ThreadsEnabled = args.hasFlag(OPT_threads, OPT_no_threads, true); + threadsEnabled = args.hasFlag(OPT_threads, OPT_no_threads, true); config->allowMultipleDefinition = args.hasFlag(OPT_allow_multiple_definition, @@ -939,7 +939,7 @@ static void readConfigs(opt::InputArgList &args) { // Parse LTO options. if (auto *arg = args.getLastArg(OPT_plugin_opt_mcpu_eq)) - parseClangOption(Saver.save("-mcpu=" + StringRef(arg->getValue())), + parseClangOption(saver.save("-mcpu=" + StringRef(arg->getValue())), arg->getSpelling()); for (auto *arg : args.filtered(OPT_plugin_opt)) @@ -1579,8 +1579,8 @@ static std::vector<WrappedSymbol> addWrappedSymbols(opt::InputArgList &args) { if (!sym) continue; - Symbol *real = addUndefined(Saver.save("__real_" + name)); - Symbol *wrap = addUndefined(Saver.save("__wrap_" + name)); + Symbol *real = addUndefined(saver.save("__real_" + name)); + Symbol *wrap = addUndefined(saver.save("__wrap_" + name)); v.push_back({sym, real, wrap}); // We want to tell LTO not to inline symbols to be overwritten diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index 4abccc135a9..87f0aa2a982 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -59,15 +59,15 @@ static void handleColorDiagnostics(opt::InputArgList &args) { if (!arg) return; if (arg->getOption().getID() == OPT_color_diagnostics) { - errorHandler().ColorDiagnostics = true; + errorHandler().colorDiagnostics = true; } else if (arg->getOption().getID() == OPT_no_color_diagnostics) { - errorHandler().ColorDiagnostics = false; + errorHandler().colorDiagnostics = false; } else { StringRef s = arg->getValue(); if (s == "always") - errorHandler().ColorDiagnostics = true; + errorHandler().colorDiagnostics = true; else if (s == "never") - errorHandler().ColorDiagnostics = false; + errorHandler().colorDiagnostics = false; else if (s != "auto") error("unknown option: --color-diagnostics=" + s); } @@ -101,7 +101,7 @@ static void concatLTOPluginOptions(SmallVectorImpl<const char *> &args) { for (size_t i = 0, e = args.size(); i != e; ++i) { StringRef s = args[i]; if ((s == "-plugin-opt" || s == "--plugin-opt") && i + 1 != e) { - v.push_back(Saver.save(s + "=" + args[i + 1]).data()); + v.push_back(saver.save(s + "=" + args[i + 1]).data()); ++i; } else { v.push_back(args[i]); @@ -124,7 +124,7 @@ opt::InputArgList ELFOptTable::parse(ArrayRef<const char *> argv) { // Expand response files (arguments in the form of @<filename>) // and then parse the argument again. - cl::ExpandResponseFiles(Saver, getQuotingStyle(args), vec); + cl::ExpandResponseFiles(saver, getQuotingStyle(args), vec); concatLTOPluginOptions(vec); args = this->ParseArgs(vec, missingIndex, missingCount); diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp index fa64b9e6347..8b01d06b024 100644 --- a/lld/ELF/ICF.cpp +++ b/lld/ELF/ICF.cpp @@ -392,7 +392,7 @@ template <class ELFT> void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> fn) { // If threading is disabled or the number of sections are // too small to use threading, call Fn sequentially. - if (!ThreadsEnabled || sections.size() < 1024) { + if (!threadsEnabled || sections.size() < 1024) { forEachClassRange(0, sections.size(), fn); ++cnt; return; diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 7f0ec2c7d4e..919012fd20c 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -92,7 +92,7 @@ Optional<MemoryBufferRef> elf::readFile(StringRef path) { // The --chroot option changes our virtual root directory. // This is useful when you are dealing with files created by --reproduce. if (!config->chroot.empty() && path.startswith("/")) - path = Saver.save(config->chroot + path); + path = saver.save(config->chroot + path); log(path); @@ -1366,7 +1366,7 @@ template <class ELFT> void SharedFile::parse() { reinterpret_cast<const Elf_Verdef *>(verdefs[idx])->getAux()->vda_name; versionedNameBuffer.clear(); name = (name + "@" + verName).toStringRef(versionedNameBuffer); - symtab->addSymbol(SharedSymbol{*this, Saver.save(name), sym.getBinding(), + symtab->addSymbol(SharedSymbol{*this, saver.save(name), sym.getBinding(), sym.st_other, sym.getType(), sym.st_value, sym.st_size, alignment, idx}); } @@ -1432,8 +1432,8 @@ BitcodeFile::BitcodeFile(MemoryBufferRef mb, StringRef archiveName, // symbols later in the link stage). So we append file offset to make // filename unique. StringRef name = archiveName.empty() - ? Saver.save(path) - : Saver.save(archiveName + "(" + path + " at " + + ? saver.save(path) + : saver.save(archiveName + "(" + path + " at " + utostr(offsetInArchive) + ")"); MemoryBufferRef mbref(mb.getBuffer(), name); @@ -1460,7 +1460,7 @@ template <class ELFT> static Symbol *createBitcodeSymbol(const std::vector<bool> &keptComdats, const lto::InputFile::Symbol &objSym, BitcodeFile &f) { - StringRef name = Saver.save(objSym.getName()); + StringRef name = saver.save(objSym.getName()); uint8_t binding = objSym.isWeak() ? STB_WEAK : STB_GLOBAL; uint8_t type = objSym.isTLS() ? STT_TLS : STT_NOTYPE; uint8_t visibility = mapVisibility(objSym.getVisibility()); @@ -1513,11 +1513,11 @@ void BinaryFile::parse() { if (!isAlnum(s[i])) s[i] = '_'; - symtab->addSymbol(Defined{nullptr, Saver.save(s + "_start"), STB_GLOBAL, + symtab->addSymbol(Defined{nullptr, saver.save(s + "_start"), STB_GLOBAL, STV_DEFAULT, STT_OBJECT, 0, 0, section}); - symtab->addSymbol(Defined{nullptr, Saver.save(s + "_end"), STB_GLOBAL, + symtab->addSymbol(Defined{nullptr, saver.save(s + "_end"), STB_GLOBAL, STV_DEFAULT, STT_OBJECT, data.size(), 0, section}); - symtab->addSymbol(Defined{nullptr, Saver.save(s + "_size"), STB_GLOBAL, + symtab->addSymbol(Defined{nullptr, saver.save(s + "_size"), STB_GLOBAL, STV_DEFAULT, STT_OBJECT, data.size(), 0, nullptr}); } @@ -1566,7 +1566,7 @@ template <class ELFT> void LazyObjFile::parse() { for (const lto::InputFile::Symbol &sym : obj->symbols()) { if (sym.isUndefined()) continue; - symtab->addSymbol(LazyObject{*this, Saver.save(sym.getName())}); + symtab->addSymbol(LazyObject{*this, saver.save(sym.getName())}); } return; } diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index a2cbefb6df1..1ca520c3740 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -148,7 +148,7 @@ void InputSectionBase::uncompress() const { { static std::mutex mu; std::lock_guard<std::mutex> lock(mu); - uncompressedBuf = BAlloc.Allocate<char>(size); + uncompressedBuf = bAlloc.Allocate<char>(size); } if (Error e = zlib::uncompress(toStringRef(rawData), uncompressedBuf, size)) @@ -231,7 +231,7 @@ void InputSectionBase::parseCompressedHeader() { // Restore the original section name. // (e.g. ".zdebug_info" -> ".debug_info") - name = Saver.save("." + name.substr(2)); + name = saver.save("." + name.substr(2)); return; } diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index 1058c97cecc..36b847f725b 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -260,8 +260,8 @@ template <class ELFT> void MarkLive<ELFT>::run() { if (isReserved(sec) || script->shouldKeep(sec)) { enqueue(sec, 0); } else if (isValidCIdentifier(sec->name)) { - cNamedSections[Saver.save("__start_" + sec->name)].push_back(sec); - cNamedSections[Saver.save("__stop_" + sec->name)].push_back(sec); + cNamedSections[saver.save("__start_" + sec->name)].push_back(sec); + cNamedSections[saver.save("__stop_" + sec->name)].push_back(sec); } } diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 654ed2f1fcf..cd71961804b 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -1639,18 +1639,18 @@ void ThunkCreator::createInitialThunkSections( lastThunkLowerBound = isdEnd - thunkSectionSpacing; uint32_t isecLimit; - uint32_t prevISLimit = isdBegin; + uint32_t prevIsecLimit = isdBegin; uint32_t thunkUpperBound = isdBegin + thunkSectionSpacing; for (const InputSection *isec : isd->sections) { isecLimit = isec->outSecOff + isec->getSize(); if (isecLimit > thunkUpperBound) { - addThunkSection(os, isd, prevISLimit); - thunkUpperBound = prevISLimit + thunkSectionSpacing; + addThunkSection(os, isd, prevIsecLimit); + thunkUpperBound = prevIsecLimit + thunkSectionSpacing; } if (isecLimit > lastThunkLowerBound) break; - prevISLimit = isecLimit; + prevIsecLimit = isecLimit; } addThunkSection(os, isd, isecLimit); }); diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 9076a1cf847..e227d0bb709 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -280,7 +280,7 @@ void ScriptParser::addFile(StringRef s) { SmallString<128> pathData; StringRef path = (config->sysroot + s).toStringRef(pathData); if (sys::fs::exists(path)) { - driver->addFile(Saver.save(path), /*WithLOption=*/false); + driver->addFile(saver.save(path), /*WithLOption=*/false); return; } } @@ -291,7 +291,7 @@ void ScriptParser::addFile(StringRef s) { if (config->sysroot.empty()) driver->addFile(s.substr(1), /*WithLOption=*/false); else - driver->addFile(Saver.save(config->sysroot + "/" + s.substr(1)), + driver->addFile(saver.save(config->sysroot + "/" + s.substr(1)), /*WithLOption=*/false); } else if (s.startswith("-l")) { driver->addLibrary(s.substr(2)); @@ -299,7 +299,7 @@ void ScriptParser::addFile(StringRef s) { driver->addFile(s, /*WithLOption=*/false); } else { if (Optional<std::string> path = findFromSearchPaths(s)) - driver->addFile(Saver.save(*path), /*WithLOption=*/true); + driver->addFile(saver.save(*path), /*WithLOption=*/true); else setError("unable to find " + s); } diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 8d1b55cf7f0..918849bd6ab 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -72,7 +72,7 @@ static ArrayRef<uint8_t> getVersion() { // This is only for testing. StringRef s = getenv("LLD_VERSION"); if (s.empty()) - s = Saver.save(Twine("Linker: ") + getLLDVersion()); + s = saver.save(Twine("Linker: ") + getLLDVersion()); // +1 to include the terminating '\0'. return {(const uint8_t *)s.data(), s.size() + 1}; @@ -254,7 +254,7 @@ MipsReginfoSection<ELFT> *MipsReginfoSection<ELFT>::create() { InputSection *elf::createInterpSection() { // StringSaver guarantees that the returned string ends with '\0'. - StringRef s = Saver.save(config->dynamicLinker); + StringRef s = saver.save(config->dynamicLinker); ArrayRef<uint8_t> contents = {(const uint8_t *)s.data(), s.size() + 1}; auto *sec = make<InputSection>(nullptr, SHF_ALLOC, SHT_PROGBITS, 1, contents, @@ -2530,7 +2530,7 @@ createSymbols(ArrayRef<std::vector<GdbIndexSection::NameAttrEntry>> nameAttrs, // speed it up. size_t numShards = 32; size_t concurrency = 1; - if (ThreadsEnabled) + if (threadsEnabled) concurrency = std::min<size_t>(PowerOf2Floor(hardware_concurrency()), numShards); @@ -2973,7 +2973,7 @@ void MergeNoTailSection::finalizeContents() { // Concurrency level. Must be a power of 2 to avoid expensive modulo // operations in the following tight loop. size_t concurrency = 1; - if (ThreadsEnabled) + if (threadsEnabled) concurrency = std::min<size_t>(PowerOf2Floor(hardware_concurrency()), numShards); diff --git a/lld/ELF/Thunks.cpp b/lld/ELF/Thunks.cpp index 2428fb80992..33a3c87afc1 100644 --- a/lld/ELF/Thunks.cpp +++ b/lld/ELF/Thunks.cpp @@ -350,7 +350,7 @@ void AArch64ABSLongThunk::writeTo(uint8_t *buf) { } void AArch64ABSLongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__AArch64AbsLongThunk_" + destination.getName()), + addSymbol(saver.save("__AArch64AbsLongThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$x", STT_NOTYPE, 0, isec); addSymbol("$d", STT_NOTYPE, 8, isec); @@ -376,7 +376,7 @@ void AArch64ADRPThunk::writeTo(uint8_t *buf) { } void AArch64ADRPThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__AArch64ADRPThunk_" + destination.getName()), STT_FUNC, + addSymbol(saver.save("__AArch64ADRPThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$x", STT_NOTYPE, 0, isec); } @@ -476,7 +476,7 @@ void ARMV7ABSLongThunk::writeLong(uint8_t *buf) { } void ARMV7ABSLongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__ARMv7ABSLongThunk_" + destination.getName()), + addSymbol(saver.save("__ARMv7ABSLongThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$a", STT_NOTYPE, 0, isec); } @@ -494,7 +494,7 @@ void ThumbV7ABSLongThunk::writeLong(uint8_t *buf) { } void ThumbV7ABSLongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__Thumbv7ABSLongThunk_" + destination.getName()), + addSymbol(saver.save("__Thumbv7ABSLongThunk_" + destination.getName()), STT_FUNC, 1, isec); addSymbol("$t", STT_NOTYPE, 0, isec); } @@ -515,7 +515,7 @@ void ARMV7PILongThunk::writeLong(uint8_t *buf) { } void ARMV7PILongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__ARMV7PILongThunk_" + destination.getName()), STT_FUNC, + addSymbol(saver.save("__ARMV7PILongThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$a", STT_NOTYPE, 0, isec); } @@ -536,7 +536,7 @@ void ThumbV7PILongThunk::writeLong(uint8_t *buf) { } void ThumbV7PILongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__ThumbV7PILongThunk_" + destination.getName()), + addSymbol(saver.save("__ThumbV7PILongThunk_" + destination.getName()), STT_FUNC, 1, isec); addSymbol("$t", STT_NOTYPE, 0, isec); } @@ -551,7 +551,7 @@ void ARMV5ABSLongThunk::writeLong(uint8_t *buf) { } void ARMV5ABSLongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__ARMv5ABSLongThunk_" + destination.getName()), + addSymbol(saver.save("__ARMv5ABSLongThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$a", STT_NOTYPE, 0, isec); addSymbol("$d", STT_NOTYPE, 4, isec); @@ -577,7 +577,7 @@ void ARMV5PILongThunk::writeLong(uint8_t *buf) { } void ARMV5PILongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__ARMV5PILongThunk_" + destination.getName()), STT_FUNC, + addSymbol(saver.save("__ARMV5PILongThunk_" + destination.getName()), STT_FUNC, 0, isec); addSymbol("$a", STT_NOTYPE, 0, isec); addSymbol("$d", STT_NOTYPE, 12, isec); @@ -607,7 +607,7 @@ void ThumbV6MABSLongThunk::writeLong(uint8_t *buf) { } void ThumbV6MABSLongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__Thumbv6MABSLongThunk_" + destination.getName()), + addSymbol(saver.save("__Thumbv6MABSLongThunk_" + destination.getName()), STT_FUNC, 1, isec); addSymbol("$t", STT_NOTYPE, 0, isec); addSymbol("$d", STT_NOTYPE, 8, isec); @@ -633,7 +633,7 @@ void ThumbV6MPILongThunk::writeLong(uint8_t *buf) { } void ThumbV6MPILongThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__Thumbv6MPILongThunk_" + destination.getName()), + addSymbol(saver.save("__Thumbv6MPILongThunk_" + destination.getName()), STT_FUNC, 1, isec); addSymbol("$t", STT_NOTYPE, 0, isec); addSymbol("$d", STT_NOTYPE, 12, isec); @@ -651,7 +651,7 @@ void MipsThunk::writeTo(uint8_t *buf) { } void MipsThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__LA25Thunk_" + destination.getName()), STT_FUNC, 0, + addSymbol(saver.save("__LA25Thunk_" + destination.getName()), STT_FUNC, 0, isec); } @@ -675,7 +675,7 @@ void MicroMipsThunk::writeTo(uint8_t *buf) { void MicroMipsThunk::addSymbols(ThunkSection &isec) { Defined *d = addSymbol( - Saver.save("__microLA25Thunk_" + destination.getName()), STT_FUNC, 0, isec); + saver.save("__microLA25Thunk_" + destination.getName()), STT_FUNC, 0, isec); d->stOther |= STO_MIPS_MICROMIPS; } @@ -699,7 +699,7 @@ void MicroMipsR6Thunk::writeTo(uint8_t *buf) { void MicroMipsR6Thunk::addSymbols(ThunkSection &isec) { Defined *d = addSymbol( - Saver.save("__microLA25Thunk_" + destination.getName()), STT_FUNC, 0, isec); + saver.save("__microLA25Thunk_" + destination.getName()), STT_FUNC, 0, isec); d->stOther |= STO_MIPS_MICROMIPS; } @@ -754,7 +754,7 @@ void PPC32PltCallStub::addSymbols(ThunkSection &isec) { else os << ".plt_pic32."; os << destination.getName(); - addSymbol(Saver.save(os.str()), STT_FUNC, 0, isec); + addSymbol(saver.save(os.str()), STT_FUNC, 0, isec); } bool PPC32PltCallStub::isCompatibleWith(const InputSection &isec, @@ -780,7 +780,7 @@ void PPC64PltCallStub::writeTo(uint8_t *buf) { } void PPC64PltCallStub::addSymbols(ThunkSection &isec) { - Defined *s = addSymbol(Saver.save("__plt_" + destination.getName()), STT_FUNC, + Defined *s = addSymbol(saver.save("__plt_" + destination.getName()), STT_FUNC, 0, isec); s->needsTocRestore = true; } @@ -791,7 +791,7 @@ void PPC64LongBranchThunk::writeTo(uint8_t *buf) { } void PPC64LongBranchThunk::addSymbols(ThunkSection &isec) { - addSymbol(Saver.save("__long_branch_" + destination.getName()), STT_FUNC, 0, + addSymbol(saver.save("__long_branch_" + destination.getName()), STT_FUNC, 0, isec); } diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index b0457b6234d..bd7ddd57a84 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -42,7 +42,7 @@ namespace { // The writer writes a SymbolTable result to a file. template <class ELFT> class Writer { public: - Writer() : buffer(errorHandler().OutputBuffer) {} + Writer() : buffer(errorHandler().outputBuffer) {} using Elf_Shdr = typename ELFT::Shdr; using Elf_Ehdr = typename ELFT::Ehdr; using Elf_Phdr = typename ELFT::Phdr; @@ -103,8 +103,8 @@ StringRef elf::getOutputSectionName(const InputSectionBase *s) { if (InputSectionBase *rel = isec->getRelocatedSection()) { OutputSection *out = rel->getOutputSection(); if (s->type == SHT_RELA) - return Saver.save(".rela" + out->name); - return Saver.save(".rel" + out->name); + return saver.save(".rela" + out->name); + return saver.save(".rel" + out->name); } } @@ -2006,8 +2006,8 @@ void Writer<ELFT>::addStartStopSymbols(OutputSection *sec) { StringRef s = sec->name; if (!isValidCIdentifier(s)) return; - addOptionalRegular(Saver.save("__start_" + s), sec, 0, STV_PROTECTED); - addOptionalRegular(Saver.save("__stop_" + s), sec, -1, STV_PROTECTED); + addOptionalRegular(saver.save("__start_" + s), sec, 0, STV_PROTECTED); + addOptionalRegular(saver.save("__stop_" + s), sec, -1, STV_PROTECTED); } static bool needsPtLoad(OutputSection *sec) { |