diff --git a/lld/ELF/Arch/LoongArch.cpp b/lld/ELF/Arch/LoongArch.cpp index 3e9d6e0e7420..49fd979bd0a5 100644 --- a/lld/ELF/Arch/LoongArch.cpp +++ b/lld/ELF/Arch/LoongArch.cpp @@ -75,7 +75,7 @@ enum Reg { // // Here a "page" is in fact just another way to refer to the 12-bit range // allowed by the immediate field of the addi/ld/st instructions, and not -// related to the system or the kernel's actual page size. The sematics happens +// related to the system or the kernel's actual page size. The semantics happen // to match the AArch64 `adrp`, so the concept of "page" is borrowed here. static uint64_t getLoongArchPage(uint64_t p) { return p & ~static_cast(0xfff); @@ -86,7 +86,7 @@ static uint32_t lo12(uint32_t val) { return val & 0xfff; } // Calculate the adjusted page delta between dest and PC. uint64_t elf::getLoongArchPageDelta(uint64_t dest, uint64_t pc, RelType type) { // Note that if the sequence being relocated is `pcalau12i + addi.d + lu32i.d - // + lu52i.d`, they must be adjancent so that we can infer the PC of + // + lu52i.d`, they must be adjacent so that we can infer the PC of // `pcalau12i` when calculating the page delta for the other two instructions // (lu32i.d and lu52i.d). Compensate all the sign-extensions is a bit // complicated. Just use psABI recommended algorithm. @@ -539,7 +539,7 @@ void LoongArch::relocate(uint8_t *loc, const Relocation &rel, return; case R_LARCH_CALL36: { - // This relocation is designed for adjancent pcaddu18i+jirl pairs that + // This relocation is designed for adjacent pcaddu18i+jirl pairs that // are patched in one time. Because of sign extension of these insns' // immediate fields, the relocation range is [-128G - 0x20000, +128G - // 0x20000) (of course must be 4-byte aligned). diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 6c7ef27cbd49..00aebb47640e 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -41,8 +41,8 @@ using namespace llvm::support::endian; using namespace lld; using namespace lld::elf; -// This function is explicity instantiated in ARM.cpp, don't do it here to avoid -// warnings with MSVC. +// This function is explicitly instantiated in ARM.cpp, don't do it here to +// avoid warnings with MSVC. extern template void ObjFile::importCmseSymbols(); extern template void ObjFile::importCmseSymbols(); extern template void ObjFile::importCmseSymbols(); @@ -323,7 +323,7 @@ template static void doParseFile(InputFile *file) { // Add symbols in File to the symbol table. void elf::parseFile(InputFile *file) { invokeELFT(doParseFile, file); } -// This function is explicity instantiated in ARM.cpp. Mark it extern here, +// This function is explicitly instantiated in ARM.cpp. Mark it extern here, // to avoid warnings when building with MSVC. extern template void ObjFile::importCmseSymbols(); extern template void ObjFile::importCmseSymbols(); diff --git a/lld/ELF/Thunks.cpp b/lld/ELF/Thunks.cpp index 5f543ffdcfaa..f912f61e3729 100644 --- a/lld/ELF/Thunks.cpp +++ b/lld/ELF/Thunks.cpp @@ -1338,7 +1338,7 @@ static Thunk *addThunkV6M(const InputSection &isec, RelType reloc, Symbol &s, return make(s, a); fatal("relocation " + toString(reloc) + " to " + toString(s) + - " not supported for Armv6-M targets for position independant" + " not supported for Armv6-M targets for position independent" " and execute only code"); } if (isPureCode) diff --git a/lld/test/ELF/arm-thumb-thunk-v6m-xo.s b/lld/test/ELF/arm-thumb-thunk-v6m-xo.s index 10f1e73f0b60..f1b6c0c194b3 100644 --- a/lld/test/ELF/arm-thumb-thunk-v6m-xo.s +++ b/lld/test/ELF/arm-thumb-thunk-v6m-xo.s @@ -54,4 +54,4 @@ far: // CHECK-NEXT: : // CHECK-NEXT: 12345678: bx lr -// CHECK-PI: error: relocation R_ARM_THM_CALL to far not supported for Armv6-M targets for position independant and execute only code +// CHECK-PI: error: relocation R_ARM_THM_CALL to far not supported for Armv6-M targets for position independent and execute only code