diff --git a/lld/ELF/CallGraphSort.cpp b/lld/ELF/CallGraphSort.cpp index 15da4d2414ab4..aa00d6eadbf98 100644 --- a/lld/ELF/CallGraphSort.cpp +++ b/lld/ELF/CallGraphSort.cpp @@ -259,7 +259,7 @@ DenseMap CallGraphSort::run() { return orderMap; } -// Sort sections by the profile data provided by -callgraph-profile-file +// Sort sections by the profile data provided by --callgraph-profile-file. // // This first builds a call graph based on the profile data then merges sections // according to the C³ heuristic. All clusters are then sorted by a density diff --git a/lld/ELF/DWARF.cpp b/lld/ELF/DWARF.cpp index 707a6ebd16959..ecffc063ded84 100644 --- a/lld/ELF/DWARF.cpp +++ b/lld/ELF/DWARF.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// // -// The -gdb-index option instructs the linker to emit a .gdb_index section. +// The --gdb-index option instructs the linker to emit a .gdb_index section. // The section contains information to make gdb startup faster. // The format of the section is described at // https://sourceware.org/gdb/onlinedocs/gdb/Index-Section-Format.html. diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 0a80e81026c3b..8f0002f58c3ca 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -223,7 +223,6 @@ void LinkerDriver::addFile(StringRef path, bool withLOption) { readLinkerScript(mbref); return; case file_magic::archive: { - // Handle -whole-archive. if (inWholeArchive) { for (const auto &p : getArchiveMembers(mbref)) files.push_back(createObjectFile(p.first, path, p.second)); @@ -360,10 +359,10 @@ static void checkOptions() { if (config->executeOnly) { if (config->emachine != EM_AARCH64) - error("-execute-only is only supported on AArch64 targets"); + error("--execute-only is only supported on AArch64 targets"); if (config->singleRoRx && !script->hasSectionsCommand) - error("-execute-only and -no-rosegment cannot be used together"); + error("--execute-only and --no-rosegment cannot be used together"); } if (config->zRetpolineplt && config->zForceIbt) @@ -490,10 +489,9 @@ void LinkerDriver::linkerMain(ArrayRef argsArr) { // Handle -v or -version. // // A note about "compatible with GNU linkers" message: this is a hack for - // scripts generated by GNU Libtool 2.4.6 (released in February 2014 and - // still the newest version in March 2017) or earlier to recognize LLD as - // a GNU compatible linker. As long as an output for the -v option - // contains "GNU" or "with BFD", they recognize us as GNU-compatible. + // scripts generated by GNU Libtool up to 2021-10 to recognize LLD as + // a GNU compatible linker. See + // . // // This is somewhat ugly hack, but in reality, we had no choice other // than doing this. Considering the very long release cycle of Libtool, @@ -592,7 +590,7 @@ static void setUnresolvedSymbolPolicy(opt::InputArgList &args) { OPT_warn_unresolved_symbols, true) ? UnresolvedPolicy::ReportError : UnresolvedPolicy::Warn; - // -shared implies -unresolved-symbols=ignore-all because missing + // -shared implies --unresolved-symbols=ignore-all because missing // symbols are likely to be resolved at runtime. bool diagRegular = !config->shared, diagShlib = !config->shared; @@ -773,7 +771,7 @@ static bool getP10StubOpt(opt::InputArgList &args) { // Parse --build-id or --build-id=