diff --git a/lld/ELF/AArch64ErrataFix.cpp b/lld/ELF/AArch64ErrataFix.cpp index 7fb3e02e7ee4..76fbd6cb96fa 100644 --- a/lld/ELF/AArch64ErrataFix.cpp +++ b/lld/ELF/AArch64ErrataFix.cpp @@ -61,7 +61,7 @@ static bool isADRP(uint32_t instr) { // Instructions appear in order of appearance starting from table in // C4.1.3 Loads and Stores. -// All loads and stores have 1 (at bit postion 27), (0 at bit position 25). +// All loads and stores have 1 (at bit position 27), (0 at bit position 25). // | op0 x op1 (2) | 1 op2 0 op3 (2) | x | op4 (5) | xxxx | op5 (2) | x (10) | static bool isLoadStoreClass(uint32_t instr) { return (instr & 0x0a000000) == 0x08000000; @@ -619,7 +619,7 @@ AArch64Err843419Patcher::patchInputSectionDescription( // // PostConditions: // Returns true if at least one patch was added. The addresses of the -// Ouptut and Input Sections may have been changed. +// Output and Input Sections may have been changed. // Returns false if no patches were required and no changes were made. bool AArch64Err843419Patcher::createFixes() { if (!initialized) diff --git a/lld/ELF/ARMErrataFix.cpp b/lld/ELF/ARMErrataFix.cpp index 493fafc6a0b2..eb3ebdea544c 100644 --- a/lld/ELF/ARMErrataFix.cpp +++ b/lld/ELF/ARMErrataFix.cpp @@ -97,7 +97,7 @@ public: // Return true if the half-word, when taken as the first of a pair of halfwords // is the first half of a 32-bit instruction. -// Reference from ARM Architecure Reference Manual ARMv7-A and ARMv7-R edition +// Reference from ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition // section A6.3: 32-bit Thumb instruction encoding // | HW1 | HW2 | // | 1 1 1 | op1 (2) | op2 (7) | x (4) |op| x (15) | @@ -108,7 +108,7 @@ static bool is32bitInstruction(uint16_t hw) { return (hw & 0xe000) == 0xe000 && (hw & 0x1800) != 0x0000; } -// Reference from ARM Architecure Reference Manual ARMv7-A and ARMv7-R edition +// Reference from ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition // section A6.3.4 Branches and miscellaneous control. // | HW1 | HW2 | // | 1 1 1 | 1 0 | op (7) | x (4) | 1 | op1 (3) | op2 (4) | imm8 (8) | diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index 905903fa4d66..6299fd8a5243 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -827,7 +827,7 @@ void PPC64::relocateOne(uint8_t *loc, RelType type, uint64_t val) const { case R_PPC64_ADDR16_LO: case R_PPC64_REL16_LO: case R_PPC64_TPREL16_LO: - // When the high-adjusted part of a toc relocation evalutes to 0, it is + // When the high-adjusted part of a toc relocation evaluates to 0, it is // changed into a nop. The lo part then needs to be updated to use the // toc-pointer register r2, as the base register. if (config->tocOptimize && shouldTocOptimize && ha(val) == 0) { @@ -849,7 +849,7 @@ void PPC64::relocateOne(uint8_t *loc, RelType type, uint64_t val) const { uint16_t mask = isDQFormInstruction(insn) ? 0xf : 0x3; checkAlignment(loc, lo(val), mask + 1, originalType); if (config->tocOptimize && shouldTocOptimize && ha(val) == 0) { - // When the high-adjusted part of a toc relocation evalutes to 0, it is + // When the high-adjusted part of a toc relocation evaluates to 0, it is // changed into a nop. The lo part then needs to be updated to use the toc // pointer register r2, as the base register. if (isInstructionUpdateForm(insn)) @@ -990,7 +990,7 @@ void PPC64::relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const { // The prologue for a split-stack function is expected to look roughly // like this: // .Lglobal_entry_point: -// # TOC pointer initalization. +// # TOC pointer initialization. // ... // .Llocal_entry_point: // # load the __private_ss member of the threads tcbhead. diff --git a/lld/ELF/CallGraphSort.cpp b/lld/ELF/CallGraphSort.cpp index 6f8ef8954af3..6dad7c965f1a 100644 --- a/lld/ELF/CallGraphSort.cpp +++ b/lld/ELF/CallGraphSort.cpp @@ -16,9 +16,9 @@ /// /// Definitions: /// * Cluster -/// * An ordered list of input sections which are layed out as a unit. At the +/// * An ordered list of input sections which are laid out as a unit. At the /// beginning of the algorithm each input section has its own cluster and -/// the weight of the cluster is the sum of the weight of all incomming +/// the weight of the cluster is the sum of the weight of all incoming /// edges. /// * Call-Chain Clustering (C³) Heuristic /// * Defines when and how clusters are combined. Pick the highest weighted @@ -26,7 +26,7 @@ /// penalize it too much. /// * Density /// * The weight of the cluster divided by the size of the cluster. This is a -/// proxy for the ammount of execution time spent per byte of the cluster. +/// proxy for the amount of execution time spent per byte of the cluster. /// /// It does so given a call graph profile by the following: /// * Build a weighted call graph from the call graph profile @@ -86,7 +86,7 @@ private: std::vector sections; }; -// Maximum ammount the combined cluster density can be worse than the original +// Maximum amount the combined cluster density can be worse than the original // cluster to consider merging. constexpr int MAX_DENSITY_DEGRADATION = 8; diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h index 0c68a8485fa2..43d23ef3029a 100644 --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -239,7 +239,7 @@ struct Configuration { int32_t splitStackAdjustSize; // The following config options do not directly correspond to any - // particualr command line options. + // particular command line options. // True if we need to pass through relocations in input files to the // output file. Usually false because we consume relocations. diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 96257a4c7624..e6c700dcb76c 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1370,7 +1370,7 @@ static void handleUndefined(Symbol *sym) { sym->fetch(); } -// As an extention to GNU linkers, lld supports a variant of `-u` +// As an extension to GNU linkers, lld supports a variant of `-u` // which accepts wildcard patterns. All symbols that match a given // pattern are handled as if they were given by `-u`. static void handleUndefinedGlob(StringRef arg) { diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index cd5c018ed9b4..09b20463af2f 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -741,7 +741,7 @@ static uint32_t readAndFeatures(ObjFile *obj, ArrayRef data) { if (type == featureAndType) { // We found a FEATURE_1_AND field. There may be more than one of these - // in a .note.gnu.propery section, for a relocatable object we + // in a .note.gnu.property section, for a relocatable object we // accumulate the bits set. featuresSet |= read32le(desc.data() + 8); } diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 0c93d2e10959..7a10eb4b38d2 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -72,7 +72,7 @@ InputSectionBase::InputSectionBase(InputFile *file, uint64_t flags, areRelocsRela = false; // The ELF spec states that a value of 0 means the section has - // no alignment constraits. + // no alignment constraints. uint32_t v = std::max(alignment, 1); if (!isPowerOf2_64(v)) fatal(toString(this) + ": sh_addralign is not a power of 2"); @@ -469,7 +469,7 @@ void InputSection::copyRelocations(uint8_t *buf, ArrayRef rels) { target->getRelExpr(type, sym, bufLoc) == R_MIPS_GOTREL) { // Some MIPS relocations depend on "gp" value. By default, // this value has 0x7ff0 offset from a .got section. But - // relocatable files produced by a complier or a linker + // relocatable files produced by a compiler or a linker // might redefine this default value and we must use it // for a calculation of the relocation result. When we // generate EXE or DSO it's trivial. Generating a relocatable @@ -757,7 +757,7 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a, case R_PPC32_PLTREL: // R_PPC_PLTREL24 uses the addend (usually 0 or 0x8000) to indicate r30 // stores _GLOBAL_OFFSET_TABLE_ or .got2+0x8000. The addend is ignored for - // target VA compuation. + // target VA computation. return sym.getPltVA() - p; case R_PPC64_CALL: { uint64_t symVA = sym.getVA(a); diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h index 621b8baeaae6..25a14e08dade 100644 --- a/lld/ELF/LinkerScript.h +++ b/lld/ELF/LinkerScript.h @@ -116,7 +116,7 @@ struct SymbolAssignment : BaseCommand { unsigned size; }; -// Linker scripts allow additional constraints to be put on ouput sections. +// Linker scripts allow additional constraints to be put on output sections. // If an output section is marked as ONLY_IF_RO, the section is created // only if its input sections are read-only. Likewise, an output section // with ONLY_IF_RW is created if all input sections are RW. diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index 02ab6d18e537..5d15e45ab5e7 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -332,7 +332,7 @@ template void markLive() { return; } - // Otheriwse, do mark-sweep GC. + // Otherwise, do mark-sweep GC. // // The -gc-sections option works only for SHF_ALLOC sections // (sections that are memory-mapped at runtime). So we can diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index c540efb25e90..358d01cefce3 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -298,7 +298,7 @@ defm print_icf_sections: B<"print-icf-sections", "Do not list identical folded sections (default)">; defm print_symbol_order: Eq<"print-symbol-order", - "Print a symbol order specified by --call-graph-ordering-file into the speficied file">; + "Print a symbol order specified by --call-graph-ordering-file into the specified file">; def pop_state: F<"pop-state">, HelpText<"Undo the effect of -push-state">; @@ -420,7 +420,7 @@ def z: JoinedOrSeparate<["-"], "z">, MetaVarName<"