diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index d2af7f50cc4c2..fc212f5397316 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -137,7 +137,7 @@ getRelaTocSymAndAddend(InputSectionBase *tocSec, uint64_t offset) { // When accessing a symbol defined in another translation unit, compilers // reserve a .toc entry, allocate a local label and generate toc-indirect -// instuctions: +// instructions: // // addis 3, 2, .LC0@toc@ha # R_PPC64_TOC16_HA // ld 3, .LC0@toc@l(3) # R_PPC64_TOC16_LO_DS, load the address from a .toc entry diff --git a/lld/ELF/CallGraphSort.cpp b/lld/ELF/CallGraphSort.cpp index 6dad7c965f1a7..9be27986693cf 100644 --- a/lld/ELF/CallGraphSort.cpp +++ b/lld/ELF/CallGraphSort.cpp @@ -263,7 +263,7 @@ DenseMap CallGraphSort::run() { // 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³ huristic. All clusters are then sorted by a density +// according to the C³ heuristic. All clusters are then sorted by a density // metric to further improve locality. DenseMap computeCallGraphProfileOrder() { return CallGraphSort().run(); diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index b3031a3723c2b..e93dec947d903 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -708,7 +708,7 @@ static uint64_t getRelocTargetVA(const InputFile *file, RelType type, int64_t a, // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf // microMIPS variants of these relocations use slightly different // expressions: AHL + GP - P + 3 for %lo() and AHL + GP - P - 1 for %hi() - // to correctly handle less-sugnificant bit of the microMIPS symbol. + // to correctly handle less-significant bit of the microMIPS symbol. uint64_t v = in.mipsGot->getGp(file) + a - p; if (type == R_MIPS_LO16 || type == R_MICROMIPS_LO16) v += 4; diff --git a/lld/ELF/ScriptLexer.cpp b/lld/ELF/ScriptLexer.cpp index 7453acfcf396b..200ade76d306e 100644 --- a/lld/ELF/ScriptLexer.cpp +++ b/lld/ELF/ScriptLexer.cpp @@ -187,7 +187,7 @@ static std::vector tokenizeExpr(StringRef s) { break; } - // Get a token before the opreator. + // Get a token before the operator. if (e != 0) ret.push_back(s.substr(0, e)); diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 48339099dc27a..8cf813ceffd0f 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2151,7 +2151,7 @@ template void SymbolTableSection::writeTo(uint8_t *buf) { eSym->st_size = sym->getSize(); // st_value is usually an address of a symbol, but that has a - // special meaining for uninstantiated common symbols (this can + // special meaning for uninstantiated common symbols (this can // occur if -r is given). if (BssSection *commonSec = getCommonSec(ent.sym)) eSym->st_value = commonSec->alignment; @@ -2250,7 +2250,7 @@ size_t SymtabShndxSection::getSize() const { // DSOs. That means resolving all dynamic symbols takes O(m)*O(n) // where m is the number of DSOs and n is the number of dynamic // symbols. For modern large programs, both m and n are large. So -// making each step faster by using hash tables substiantially +// making each step faster by using hash tables substantially // improves time to load programs. // // (Note that this is not the only way to design the shared library. diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index 190a4fd3ac9e2..05eee24ce34fa 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -364,7 +364,7 @@ class MipsGotSection final : public SyntheticSection { // Try to merge two GOTs. In case of success the `Dst` contains // result of merging and the function returns true. In case of - // ovwerflow the `Dst` is unchanged and the function returns false. + // overflow the `Dst` is unchanged and the function returns false. bool tryMergeGots(FileGot & dst, FileGot & src, bool isPrimary); }; diff --git a/lld/include/lld/Core/Reference.h b/lld/include/lld/Core/Reference.h index 4769882cde507..b104f84954747 100644 --- a/lld/include/lld/Core/Reference.h +++ b/lld/include/lld/Core/Reference.h @@ -91,7 +91,7 @@ class Reference { /// Some relocations require a symbol and a value (e.g. foo + 4). virtual Addend addend() const = 0; - /// During linking, some optimzations may change addend value. + /// During linking, some optimizations may change addend value. virtual void setAddend(Addend) = 0; /// Returns target specific attributes of the reference. diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp b/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp index a424edf4985aa..bee081aec0676 100644 --- a/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp +++ b/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp @@ -61,7 +61,7 @@ class ArchHandler_arm64 : public ArchHandler { /// Used by GOTPass to update GOT References. void updateReferenceToGOT(const Reference *ref, bool targetNowGOT) override { - // If GOT slot was instanciated, transform: + // If GOT slot was instantiated, transform: // gotPage21/gotOffset12 -> page21/offset12scale8 // If GOT slot optimized away, transform: // gotPage21/gotOffset12 -> page21/addOffset12 diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp index 94a105a6f159e..f3636feb217bb 100644 --- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -576,5 +576,5 @@ void addCompactUnwindPass(PassManager &pm, const MachOLinkingContext &ctx) { pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/lib/ReaderWriter/MachO/GOTPass.cpp b/lld/lib/ReaderWriter/MachO/GOTPass.cpp index 0f80dfa19d09c..10e611c1bd2b4 100644 --- a/lld/lib/ReaderWriter/MachO/GOTPass.cpp +++ b/lld/lib/ReaderWriter/MachO/GOTPass.cpp @@ -179,5 +179,5 @@ void addGOTPass(PassManager &pm, const MachOLinkingContext &ctx) { pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/lib/ReaderWriter/MachO/TLVPass.cpp b/lld/lib/ReaderWriter/MachO/TLVPass.cpp index 5f457b863d904..e0a031cfb07b2 100644 --- a/lld/lib/ReaderWriter/MachO/TLVPass.cpp +++ b/lld/lib/ReaderWriter/MachO/TLVPass.cpp @@ -136,5 +136,5 @@ void addTLVPass(PassManager &pm, const MachOLinkingContext &ctx) { pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/test/COFF/secidx-absolute.s b/lld/test/COFF/secidx-absolute.s index 0b467bbb09bfa..8befaf2f456c3 100644 --- a/lld/test/COFF/secidx-absolute.s +++ b/lld/test/COFF/secidx-absolute.s @@ -3,7 +3,7 @@ # RUN: lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe # RUN: llvm-readobj %t.exe -sections -section-data | FileCheck %s -# Section relocations against absolute symbols resolve to the last real ouput +# Section relocations against absolute symbols resolve to the last real output # section index plus one. .text diff --git a/lld/test/ELF/Inputs/undef-bad-debug.s b/lld/test/ELF/Inputs/undef-bad-debug.s index bf517f3ea1cd8..d3171f0236167 100644 --- a/lld/test/ELF/Inputs/undef-bad-debug.s +++ b/lld/test/ELF/Inputs/undef-bad-debug.s @@ -16,7 +16,7 @@ sym4: .long .Lprologue_end - .Lprologue_start # prologue length .Lprologue_start: .byte 1 # minimum instruction length - .byte 1 # maximum operatiosn per instruction + .byte 1 # maximum operations per instruction .byte 1 # default is_stmt .byte -5 # line base .byte 14 # line range @@ -59,7 +59,7 @@ sym4: .long .Lprologue2_end - .Lprologue2_start # prologue length .Lprologue2_start: .byte 1 # minimum instruction length - .byte 1 # maximum operatiosn per instruction + .byte 1 # maximum operations per instruction .byte 1 # default is_stmt .byte -5 # line base .byte 14 # line range diff --git a/lld/test/ELF/allow-multiple-definition.s b/lld/test/ELF/allow-multiple-definition.s index 8a3b97c0102e5..bcf5cc7213c32 100644 --- a/lld/test/ELF/allow-multiple-definition.s +++ b/lld/test/ELF/allow-multiple-definition.s @@ -14,7 +14,7 @@ # RUN: llvm-objdump -d %t3 | FileCheck %s # RUN: llvm-objdump -d %t4 | FileCheck --check-prefix=REVERT %s -# inputs contain different constants for instuction movl. +# inputs contain different constants for instruction movl. # Tests below checks that order of files in command line # affects on what symbol will be used. # If flag allow-multiple-definition is enabled the first diff --git a/lld/test/ELF/arm-exidx-add-missing.s b/lld/test/ELF/arm-exidx-add-missing.s index 1beaa299a82e0..da3c271f2355e 100644 --- a/lld/test/ELF/arm-exidx-add-missing.s +++ b/lld/test/ELF/arm-exidx-add-missing.s @@ -10,7 +10,7 @@ // The range of addresses covered by the table entry is terminated by the // next table entry. This means that an executable section without a .ARM.exidx // section does not terminate the range of addresses. To fix this the linker -// synthesises an EXIDX_CANTUNWIND entry for each section wihout a .ARM.exidx +// synthesises an EXIDX_CANTUNWIND entry for each section without a .ARM.exidx // section. .syntax unified diff --git a/lld/test/ELF/executable-undefined-ignoreall.s b/lld/test/ELF/executable-undefined-ignoreall.s index a479317c0f71c..cc38e17cdf619 100644 --- a/lld/test/ELF/executable-undefined-ignoreall.s +++ b/lld/test/ELF/executable-undefined-ignoreall.s @@ -1,7 +1,7 @@ # REQUIRES: x86 ## --unresolved-symbols=ignore-all behaves similar to -shared: -## for PLT relocations to undefined symbols, produce dynamic reloctions if we +## for PLT relocations to undefined symbols, produce dynamic relocations if we ## emit .dynsym. # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o diff --git a/lld/test/ELF/icf-absolute2.s b/lld/test/ELF/icf-absolute2.s index 37e26a9d9c46b..5cf1d69bdecf8 100644 --- a/lld/test/ELF/icf-absolute2.s +++ b/lld/test/ELF/icf-absolute2.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-absolute2.s -o %t2 # RUN: ld.lld %t %t2 -o /dev/null --icf=all --print-icf-sections | FileCheck -allow-empty %s -## Test we do not crash and do not fold sections which relocations reffering to +## Test we do not crash and do not fold sections which relocations referring to ## absolute symbols with a different values. # CHECK-NOT: selected diff --git a/lld/test/ELF/invalid/broken-relaxation-x64.test b/lld/test/ELF/invalid/broken-relaxation-x64.test index 1bd7fe0cc36d9..97a977e2c03ac 100644 --- a/lld/test/ELF/invalid/broken-relaxation-x64.test +++ b/lld/test/ELF/invalid/broken-relaxation-x64.test @@ -8,7 +8,7 @@ ## YAML below contains 2 relocations of type R_X86_64_GOTTPOFF, and a .text ## with fake content filled by 0xFF. That means instructions for relaxation are ## "broken", so they does not match any known valid relaxations. We also generate -## .tls section because we need it for correct proccessing of STT_TLS symbol. +## .tls section because we need it for correct processing of STT_TLS symbol. !ELF FileHeader: Class: ELFCLASS64 @@ -44,4 +44,4 @@ Symbols: Value: 0x12345 Size: 4 Binding: STB_GLOBAL - \ No newline at end of file + diff --git a/lld/test/ELF/linkerscript/align1.test b/lld/test/ELF/linkerscript/align1.test index e7b65fc75ffe2..62dfdbfc5bd99 100644 --- a/lld/test/ELF/linkerscript/align1.test +++ b/lld/test/ELF/linkerscript/align1.test @@ -34,7 +34,7 @@ SECTIONS { # RUN: ld.lld -o %t5 --script %t.script %t.o # RUN: llvm-objdump --section-headers %t5 | FileCheck %s --check-prefix=ZERO -## Test we fail gracefuly when alignment value is not a power of 2 (#1). +## Test we fail gracefully when alignment value is not a power of 2 (#1). # RUN: echo "SECTIONS { . = 0x123; . = ALIGN(0x123, 3); .aaa : { *(.aaa) } }" > %t.script # RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s diff --git a/lld/test/ELF/linkerscript/subalign.s b/lld/test/ELF/linkerscript/subalign.s index bf812d17bb870..a817a69933143 100644 --- a/lld/test/ELF/linkerscript/subalign.s +++ b/lld/test/ELF/linkerscript/subalign.s @@ -34,7 +34,7 @@ # RUN: ld.lld %t1.o --script %t4.script -o %t4 # RUN: llvm-objdump -s %t4 | FileCheck --check-prefix=SUBALIGN %s -## Test we fail gracefuly when alignment value is not a power of 2. +## Test we fail gracefully when alignment value is not a power of 2. # RUN: echo "SECTIONS { .aaa : SUBALIGN(3) { *(.aaa*) } }" > %t5.script # RUN: not ld.lld %t1.o --script %t5.script -o /dev/null 2>&1 | FileCheck --check-prefix=ERR2 %s # ERR2: {{.*}}.script:1: alignment must be power of 2 diff --git a/lld/test/ELF/lto/common4.ll b/lld/test/ELF/lto/common4.ll index 7a40e4be32fa4..1b041667fb7bf 100644 --- a/lld/test/ELF/lto/common4.ll +++ b/lld/test/ELF/lto/common4.ll @@ -2,7 +2,7 @@ ;; Make sure that common symbols are properly internalized. ;; In this file, @a does not interpose any symbol in a DSO, -;; so LTO should be able to internelize it. +;; so LTO should be able to internalize it. ; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.so.o ; RUN: ld.lld -shared -o %t.so %t.so.o diff --git a/lld/test/ELF/mips-sto-pic-flag.s b/lld/test/ELF/mips-sto-pic-flag.s index c313a8eb3c7f8..6c9a660efca47 100644 --- a/lld/test/ELF/mips-sto-pic-flag.s +++ b/lld/test/ELF/mips-sto-pic-flag.s @@ -1,7 +1,7 @@ # REQUIRES: mips # In case of linking PIC and non-PIC code together and generation # of a relocatable object, all PIC symbols should have STO_MIPS_PIC -# flag in the symbol table of the ouput file. +# flag in the symbol table of the output file. # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-npic.o # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ diff --git a/lld/test/ELF/pack-dyn-relocs.s b/lld/test/ELF/pack-dyn-relocs.s index 34c9a3cb315cf..6ecf354f68a2c 100644 --- a/lld/test/ELF/pack-dyn-relocs.s +++ b/lld/test/ELF/pack-dyn-relocs.s @@ -69,7 +69,7 @@ // ANDROID32-HEADERS: 0x6000000F ANDROID_REL [[ADDR]] // ANDROID32-HEADERS: 0x60000010 ANDROID_RELSZ [[SIZE]] -// Packed should have the groups of non-relative reloations first, followed +// Packed should have the groups of non-relative relocations first, followed // by the larger groups of relative relocations (i.e. the 8 and 9 followed // by the 7.) // ANDROID32: Section ({{.+}}) .rel.dyn { diff --git a/lld/test/ELF/ppc64-local-dynamic.s b/lld/test/ELF/ppc64-local-dynamic.s index d7013ee6d1929..f0f3967387dd0 100644 --- a/lld/test/ELF/ppc64-local-dynamic.s +++ b/lld/test/ELF/ppc64-local-dynamic.s @@ -95,7 +95,7 @@ k: // OutputRelocs-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend // OutputRelocs-NEXT: R_PPC64_DTPMOD64 -// Check that the got has 3 entries, 1 for the TOC and 1 stucture of 2 entries +// Check that the got has 3 entries, 1 for the TOC and 1 structure of 2 entries // for the tls variables. Also verify the address so we can check the offsets // we calculate for each relocation type. // CheckGot: got 00000018 0000000000020100 diff --git a/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s b/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s index 0bd6f143a585e..002f80d5cb801 100644 --- a/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s +++ b/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s @@ -16,7 +16,7 @@ # A caller with a stack that is small enough that the addis instruction # from the split-stack prologue is unneeded, and after the prologue adjustment -# the stack size still fits whithin 16 bits. +# the stack size still fits within 16 bits. .p2align 2 .global caller_small_stack .type caller_small_stack, @function @@ -56,7 +56,7 @@ caller_small_stack: # CHECK-NEXT: cmpld 7, 12, 0 # CHECK-NEXT: bt- 28, 0x10010204 -# A caller that has a stack size that fits whithin 16 bits, but the adjusted +# A caller that has a stack size that fits within 16 bits, but the adjusted # stack size after prologue adjustment now overflows 16 bits needing both addis # and addi instructions. .p2align 2 diff --git a/lld/test/ELF/warn-backrefs.s b/lld/test/ELF/warn-backrefs.s index 629bd3be2fd99..8a9ee2291ecef 100644 --- a/lld/test/ELF/warn-backrefs.s +++ b/lld/test/ELF/warn-backrefs.s @@ -39,7 +39,7 @@ # RUN: echo ".globl foo; foo: call bar" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t4.o # RUN: ld.lld --fatal-warnings --warn-backrefs %t1.o --start-lib %t3.o %t4.o --end-lib -o /dev/null -# We don't report backward references to weak symbols as they can be overriden later. +# We don't report backward references to weak symbols as they can be overridden later. # RUN: echo ".weak foo; foo:" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t5.o # RUN: ld.lld --fatal-warnings --warn-backrefs --start-lib %t5.o --end-lib %t1.o %t2.o -o /dev/null diff --git a/lld/test/mach-o/error-simulator-vs-macosx.yaml b/lld/test/mach-o/error-simulator-vs-macosx.yaml index 609eb3be43abc..fcf1774d760ac 100644 --- a/lld/test/mach-o/error-simulator-vs-macosx.yaml +++ b/lld/test/mach-o/error-simulator-vs-macosx.yaml @@ -1,7 +1,7 @@ # RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s # RUN: not ld64.lld -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR # -# Test that i386 can link with a macos version but gives an error with a simululator version. +# Test that i386 can link with a macos version but gives an error with a simulator version. # --- !mach-o diff --git a/lld/test/mach-o/parse-literals-error.yaml b/lld/test/mach-o/parse-literals-error.yaml index 9dad0cbbf974b..de8b47c530478 100644 --- a/lld/test/mach-o/parse-literals-error.yaml +++ b/lld/test/mach-o/parse-literals-error.yaml @@ -1,7 +1,7 @@ # RUN: not ld64.lld -arch x86_64 -r -print_atoms %s -o %t 2> %t.err # RUN: FileCheck %s < %t.err # -# Test for error if literal section is not correct size mulitple. +# Test for error if literal section is not correct size multiple. # --- !mach-o diff --git a/lld/test/wasm/entry-signature.ll b/lld/test/wasm/entry-signature.ll index 8e245b14e9640..f7f3d481acfc6 100644 --- a/lld/test/wasm/entry-signature.ll +++ b/lld/test/wasm/entry-signature.ll @@ -1,4 +1,4 @@ -; Verify that the entry point signauture can be flexible. +; Verify that the entry point signature can be flexible. ; RUN: llc -filetype=obj %s -o %t.o ; RUN: wasm-ld -o %t1.wasm %t.o diff --git a/lld/test/wasm/export-optional-lazy.ll b/lld/test/wasm/export-optional-lazy.ll index 960e71c6ae6c6..c37a3e5183eba 100644 --- a/lld/test/wasm/export-optional-lazy.ll +++ b/lld/test/wasm/export-optional-lazy.ll @@ -1,7 +1,7 @@ ; Optional linker-synthetic symbols are only created if they are undefined ; in the final output. ; This test is for a regression where an explicit --export of an lazy archive -; symbol caused an undefined referece to an optional symbol to occur *after* +; symbol caused an undefined reference to an optional symbol to occur *after* ; the optional symbols were created. ; RUN: llc -filetype=obj %s -o %t.o diff --git a/lld/test/wasm/lto/signature-mismatch.ll b/lld/test/wasm/lto/signature-mismatch.ll index e12d91866023a..cf1a998826fc0 100644 --- a/lld/test/wasm/lto/signature-mismatch.ll +++ b/lld/test/wasm/lto/signature-mismatch.ll @@ -3,7 +3,7 @@ ; RUN: not wasm-ld --fatal-warnings %t.o %t1.o -o %t.wasm 2>&1 | FileCheck %s ; Test that functions defined in bitcode correctly report signature -; mistmaches with existing undefined sybmols in normal objects. +; mismatches with existing undefined sybmols in normal objects. target triple = "wasm32-unknown-unknown" diff --git a/lld/test/wasm/lto/undef.ll b/lld/test/wasm/lto/undef.ll index 65e8e4642d5e0..a5477cb3c3bdf 100644 --- a/lld/test/wasm/lto/undef.ll +++ b/lld/test/wasm/lto/undef.ll @@ -8,7 +8,7 @@ target triple = "wasm32-unknown-unknown" declare i32 @bar() ; Symbols such as foo which are only called indirectly are handled slightly -; differently with resepect to signature checking. +; differently with respect to signature checking. declare i32 @foo() @ptr = global i8* bitcast (i32 ()* @foo to i8*), align 8 diff --git a/lld/test/wasm/signature-mismatch-unknown.ll b/lld/test/wasm/signature-mismatch-unknown.ll index b354ed12207da..9bbad0065dcdc 100644 --- a/lld/test/wasm/signature-mismatch-unknown.ll +++ b/lld/test/wasm/signature-mismatch-unknown.ll @@ -4,7 +4,7 @@ ; RUN: wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o ; Also test the case where there are two different object files that contains -; referneces ret32: +; references ret32: ; %t.main.o: Does not call ret32 directly; used the wrong signature. ; %t.call-ret32.o: Calls ret32 directly; uses the correct signature. ; RUN: llc -filetype=obj %p/Inputs/call-ret32.ll -o %t.call-ret32.o diff --git a/lld/test/wasm/undefined-entry.test b/lld/test/wasm/undefined-entry.test index a36212f2c9e3c..3106a76510f46 100644 --- a/lld/test/wasm/undefined-entry.test +++ b/lld/test/wasm/undefined-entry.test @@ -3,7 +3,7 @@ RUN: not wasm-ld -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s RUN: not wasm-ld --allow-undefined -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s RUN: not wasm-ld -entry=foo -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-CUSTOM -CHECK: error: entry symbol not defined (pass --no-entry to supress): _start -CHECK-CUSTOM: error: entry symbol not defined (pass --no-entry to supress): foo +CHECK: error: entry symbol not defined (pass --no-entry to suppress): _start +CHECK-CUSTOM: error: entry symbol not defined (pass --no-entry to suppress): foo RUN: wasm-ld --no-entry -o %t.wasm %t.ret32.o diff --git a/lld/test/wasm/visibility-hidden.ll b/lld/test/wasm/visibility-hidden.ll index f5731c4e964ad..99acd5651f7ba 100644 --- a/lld/test/wasm/visibility-hidden.ll +++ b/lld/test/wasm/visibility-hidden.ll @@ -3,12 +3,12 @@ ; RUN: rm -f %t2.a ; RUN: llvm-ar rcs %t2.a %t2.o -; Test that symbols with hidden visitiblity are not export, even with +; Test that symbols with hidden visibility are not export, even with ; --export-dynamic ; RUN: wasm-ld --export-dynamic %t.o %t2.a -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s -; Test that symbols with default visitiblity are not exported without +; Test that symbols with default visibility are not exported without ; --export-dynamic ; RUN: wasm-ld %t.o %t2.a -o %t.nodef.wasm ; RUN: obj2yaml %t.nodef.wasm | FileCheck %s -check-prefix=NO-DEFAULT diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index aaf5808fa6f36..b6cd879e89c63 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -784,7 +784,7 @@ void LinkerDriver::link(ArrayRef argsArr) { if (entrySym && entrySym->isDefined()) entrySym->forceExport = true; else - error("entry symbol not defined (pass --no-entry to supress): " + + error("entry symbol not defined (pass --no-entry to suppress): " + config->entry); } diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp index dc095adf6dff0..99d18178eeacf 100644 --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -138,7 +138,7 @@ static void reportTypeError(const Symbol *existing, const InputFile *file, } // Check the type of new symbol matches that of the symbol is replacing. -// Returns true if the function types match, false is there is a singature +// Returns true if the function types match, false is there is a signature // mismatch. static bool signatureMatches(FunctionSymbol *existing, const WasmSignature *newSig) { @@ -279,7 +279,7 @@ Symbol *SymbolTable::addDefinedFunction(StringRef name, uint32_t flags, std::tie(s, wasInserted) = insert(name, file); auto replaceSym = [&](Symbol *sym) { - // If the new defined function doesn't have signture (i.e. bitcode + // If the new defined function doesn't have signature (i.e. bitcode // functions) but the old symbol does, then preserve the old signature const WasmSignature *oldSig = s->getSignature(); auto* newSym = replaceSymbol(sym, name, flags, file, function); diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h index 9803ad439f9c1..522ea46b38bc2 100644 --- a/lld/wasm/SymbolTable.h +++ b/lld/wasm/SymbolTable.h @@ -108,7 +108,7 @@ class SymbolTable { llvm::DenseMap symMap; std::vector symVector; - // For certain symbols types, e.g. function symbols, we allow for muliple + // For certain symbols types, e.g. function symbols, we allow for multiple // variants of the same symbol with different signatures. llvm::DenseMap> symVariants; diff --git a/lld/wasm/Symbols.cpp b/lld/wasm/Symbols.cpp index 349fc651533e7..7112db6b08260 100644 --- a/lld/wasm/Symbols.cpp +++ b/lld/wasm/Symbols.cpp @@ -156,7 +156,7 @@ void Symbol::setGOTIndex(uint32_t index) { LLVM_DEBUG(dbgs() << "setGOTIndex " << name << " -> " << index << "\n"); assert(gotIndex == INVALID_INDEX); if (config->isPic) { - // Any symbol that is assigned a GOT entry must be exported othewise the + // Any symbol that is assigned a GOT entry must be exported otherwise the // dynamic linker won't be able create the entry that contains it. forceExport = true; } diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h index 11836e11f3eca..3400cde1c7e25 100644 --- a/lld/wasm/Symbols.h +++ b/lld/wasm/Symbols.h @@ -415,7 +415,7 @@ class LazySymbol : public Symbol { // Lazy symbols can have a signature because they can replace an // UndefinedFunction which which case we need to be able to preserve the - // signture. + // signature. // TODO(sbc): This repetition of the signature field is inelegant. Revisit // the use of class hierarchy to represent symbol taxonomy. const WasmSignature *signature = nullptr;