diff options
| -rw-r--r-- | lld/include/lld/Core/DefinedAtom.h | 2 | ||||
| -rw-r--r-- | lld/include/lld/Core/Instrumentation.h | 2 | ||||
| -rw-r--r-- | lld/include/lld/Passes/LayoutPass.h | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/DefaultLayout.h | 8 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/File.h | 4 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/SectionChunks.h | 4 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/SegmentChunks.h | 6 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/LinkerScript.cpp | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/Native/ReaderNative.cpp | 6 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp | 2 | ||||
| -rw-r--r-- | lld/test/elf/Inputs/shared.c | 2 |
13 files changed, 22 insertions, 22 deletions
diff --git a/lld/include/lld/Core/DefinedAtom.h b/lld/include/lld/Core/DefinedAtom.h index 4be7fac7b24..e85f278b19e 100644 --- a/lld/include/lld/Core/DefinedAtom.h +++ b/lld/include/lld/Core/DefinedAtom.h @@ -97,7 +97,7 @@ public: enum Merge { mergeNo, // Another atom with same name is error - mergeAsTentative, // Is ANSI C tentative defintion, can be coalesced + mergeAsTentative, // Is ANSI C tentative definition, can be coalesced mergeAsWeak, // is C++ inline definition that was not inlined, // but address was not taken, so atom can be hidden // by linker diff --git a/lld/include/lld/Core/Instrumentation.h b/lld/include/lld/Core/Instrumentation.h index 3059d0c5618..32f70937d3c 100644 --- a/lld/include/lld/Core/Instrumentation.h +++ b/lld/include/lld/Core/Instrumentation.h @@ -61,7 +61,7 @@ public: /// A task cannot transfer threads. /// /// SBRM is used to ensure task starts and ends are ballanced. The lifetime of -/// a task is either the liftime of this object, or until end is called. +/// a task is either the lifetime of this object, or until end is called. class ScopedTask { __itt_domain *_domain; diff --git a/lld/include/lld/Passes/LayoutPass.h b/lld/include/lld/Passes/LayoutPass.h index bbd277f488f..f8196bf21cd 100644 --- a/lld/include/lld/Passes/LayoutPass.h +++ b/lld/include/lld/Passes/LayoutPass.h @@ -28,7 +28,7 @@ class MutableFile; /// This linker pass does the layout of the atoms. The pass is done after the /// order their .o files were found on the command line, then by order of the -/// atoms (address) in the .o file. But some atoms have a prefered location +/// atoms (address) in the .o file. But some atoms have a preferred location /// in their section (such as pinned to the start or end of the section), so /// the sort must take that into account too. class LayoutPass : public Pass { diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h index c980c533aca..4bedd0cefe6 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h +++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h @@ -205,7 +205,7 @@ public: } // Merge sections with the same name into a MergedSections - void mergeSimiliarSections(); + void mergeSimilarSections(); void assignSectionsToSegments(); @@ -571,7 +571,7 @@ ErrorOr<const lld::AtomLayout &> DefaultLayout<ELFT>::addAtom(const Atom *atom) /// Merge sections with the same name into a MergedSections template<class ELFT> void -DefaultLayout<ELFT>::mergeSimiliarSections() { +DefaultLayout<ELFT>::mergeSimilarSections() { MergedSections<ELFT> *mergedSection; for (auto &si : _sections) { @@ -603,7 +603,7 @@ template <class ELFT> void DefaultLayout<ELFT>::assignSectionsToSegments() { return A->order() < B->order(); }); // Merge all sections - mergeSimiliarSections(); + mergeSimilarSections(); // Set the ordinal after sorting the sections int ordinal = 1; for (auto msi : _mergedSections) { @@ -639,7 +639,7 @@ template <class ELFT> void DefaultLayout<ELFT>::assignSectionsToSegments() { lookupSectionFlag &= ~(llvm::ELF::SHF_TLS); Segment<ELFT> *segment; - // We need a seperate segment for sections that dont have + // We need a separate segment for sections that dont have // the segment type to be PT_LOAD if (segmentType != llvm::ELF::PT_LOAD) { const AdditionalSegmentKey key(segmentType, lookupSectionFlag); diff --git a/lld/lib/ReaderWriter/ELF/File.h b/lld/lib/ReaderWriter/ELF/File.h index 5bd9e37d01c..0e91506c254 100644 --- a/lld/lib/ReaderWriter/ELF/File.h +++ b/lld/lib/ReaderWriter/ELF/File.h @@ -224,7 +224,7 @@ public: // Divide the section that contains mergeable strings into tokens // TODO // a) add resolver support to recognize multibyte chars - // b) Create a seperate section chunk to write mergeable atoms + // b) Create a separate section chunk to write mergeable atoms std::vector<MergeString *> tokens; for (const Elf_Shdr *msi : _mergeStringSections) { auto sectionName = _objFile->getSectionName(msi); @@ -400,7 +400,7 @@ public: (uint8_t *)sectionContents->data() + symbol->st_value, contentSize); // If the linker finds that a section has global atoms that are in a - // mergeable section, treat them as defined atoms as they shouldnt be + // mergeable section, treat them as defined atoms as they shouldn't be // merged away as well as these symbols have to be part of symbol // resolution if (isMergeableStringSection(section)) { diff --git a/lld/lib/ReaderWriter/ELF/SectionChunks.h b/lld/lib/ReaderWriter/ELF/SectionChunks.h index cc0ce1687c2..d9659010a03 100644 --- a/lld/lib/ReaderWriter/ELF/SectionChunks.h +++ b/lld/lib/ReaderWriter/ELF/SectionChunks.h @@ -284,7 +284,7 @@ const lld::AtomLayout &AtomSection<ELFT>::appendAtom(const Atom *atom) { DefinedAtom::Alignment atomAlign = definedAtom->alignment(); uint64_t align2 = 1u << atomAlign.powerOf2; // Align the atom to the required modulus/ align the file offset and the - // memory offset seperately this is required so that BSS symbols are handled + // memory offset separately this is required so that BSS symbols are handled // properly as the BSS symbols only occupy memory size and not file size uint64_t fOffset = alignOffset(this->fileSize(), atomAlign); uint64_t mOffset = alignOffset(this->memSize(), atomAlign); @@ -393,7 +393,7 @@ void AtomSection<ELFT>::write(ELFWriter *writer, /// \brief A MergedSections represents a set of sections grouped by the same /// name. The output file that gets written by the linker has sections grouped -/// by similiar names +/// by similar names template<class ELFT> class MergedSections { public: diff --git a/lld/lib/ReaderWriter/ELF/SegmentChunks.h b/lld/lib/ReaderWriter/ELF/SegmentChunks.h index 1afc6513068..18d7ebdd7c7 100644 --- a/lld/lib/ReaderWriter/ELF/SegmentChunks.h +++ b/lld/lib/ReaderWriter/ELF/SegmentChunks.h @@ -103,8 +103,8 @@ private: uint64_t _memSize; }; -/// \brief A segment contains a set of sections, that have similiar properties -// the sections are already seperated based on different flags and properties +/// \brief A segment contains a set of sections, that have similar properties +// the sections are already separated based on different flags and properties // the segment is just a way to concatenate sections to segments template<class ELFT> class Segment : public Chunk<ELFT> { @@ -457,7 +457,7 @@ template <class ELFT> void Segment<ELFT>::assignOffsets(uint64_t startOffset) { uint64_t newOffset = llvm::RoundUpToAlignment(curOffset, (*si)->align2()); SegmentSlice<ELFT> *slice = nullptr; // If the newOffset computed is more than a page away, lets create - // a seperate segment, so that memory is not used up while running + // a separate segment, so that memory is not used up while running if (((newOffset - curOffset) > this->_context.getPageSize()) && (_outputMagic != ELFLinkingContext::OutputMagic::NMAGIC && _outputMagic != ELFLinkingContext::OutputMagic::OMAGIC)) { diff --git a/lld/lib/ReaderWriter/LinkerScript.cpp b/lld/lib/ReaderWriter/LinkerScript.cpp index 999018ea00b..7a3cd796d09 100644 --- a/lld/lib/ReaderWriter/LinkerScript.cpp +++ b/lld/lib/ReaderWriter/LinkerScript.cpp @@ -140,7 +140,7 @@ void Lexer::skipWhitespace() { if (!_buffer.empty() && _buffer[0] == '/') _buffer = _buffer.drop_front(); - // Scan for /'s. We're done if it is preceeded by a *. + // Scan for /'s. We're done if it is preceded by a *. while (true) { if (_buffer.empty()) break; diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp index c96c1ecf51b..9c609d675df 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp @@ -426,7 +426,7 @@ void MachOFileLayout::buildFileOffsets() { DEBUG_WITH_TYPE("MachOFileLayout", llvm::dbgs() << "buildFileOffsets()\n"); for (const Segment &sg : _file.segments) { - // FIXME: 4096 should be infered from segments in normalized file. + // FIXME: 4096 should be inferred from segments in normalized file. _segInfo[&sg].fileOffset = llvm::RoundUpToAlignment(fileOffset, 4096); if ((_seg1addr == INT64_MAX) && sg.access) _seg1addr = sg.address; diff --git a/lld/lib/ReaderWriter/Native/ReaderNative.cpp b/lld/lib/ReaderWriter/Native/ReaderNative.cpp index d649cb956ec..7f6f4616c23 100644 --- a/lld/lib/ReaderWriter/Native/ReaderNative.cpp +++ b/lld/lib/ReaderWriter/Native/ReaderNative.cpp @@ -266,7 +266,7 @@ class File : public lld::File { public: /// Instantiates a File object from a native object file. Ownership - /// of the MemoryBuffer is transfered to the resulting File object. + /// of the MemoryBuffer is transferred to the resulting File object. static error_code make(const LinkingContext &context, std::unique_ptr<MemoryBuffer> mb, std::vector<std::unique_ptr<lld::File> > &result) { @@ -599,7 +599,7 @@ private: return make_error_code(NativeReaderError::success); } - // instantiate array of Referemces from v1 ivar data in file + // instantiate array of References from v1 ivar data in file error_code processReferencesV1(const uint8_t *base, const NativeChunk *chunk) { uint8_t *refsStart, *refsEnd; @@ -619,7 +619,7 @@ private: return make_error_code(NativeReaderError::success); } - // instantiate array of Referemces from v2 ivar data in file + // instantiate array of References from v2 ivar data in file error_code processReferencesV2(const uint8_t *base, const NativeChunk *chunk) { uint8_t *refsStart, *refsEnd; diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp index 28c6751d2ea..45dfda51ff5 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp @@ -66,7 +66,7 @@ /// fn_in_dll(); // is equivalent to (*_imp__fn_in_dll)(); /// /// It's just the compiler rewrites code for you so that you don't need to -/// handle the indirection youself. +/// handle the indirection yourself. /// /// Note 2: __declspec(dllimport) is mandatory for data but optional for /// function. For a function, the linker creates a jump table with the original diff --git a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp index ace10cb6041..9746639185f 100644 --- a/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp @@ -12,7 +12,7 @@ /// PE/COFF file consists of DOS Header, PE Header, COFF Header and Section /// Tables followed by raw section data. /// -/// This writer is reponsible for writing Core Linker results to an Windows +/// This writer is responsible for writing Core Linker results to an Windows /// executable file. Currently it can only output ".text" section; other /// sections including the symbol table are silently ignored. /// diff --git a/lld/test/elf/Inputs/shared.c b/lld/test/elf/Inputs/shared.c index 62134c4d6e0..2be91c4b9e4 100644 --- a/lld/test/elf/Inputs/shared.c +++ b/lld/test/elf/Inputs/shared.c @@ -6,7 +6,7 @@ int i = 42; // Undefined weak function in a dynamic library. __attribute__((weak)) void weakfoo(); -// Regular funtion in a dynamic library. +// Regular function in a dynamic library. void foo() { // Try to call weakfoo so that the reference to weekfoo will be included in // the resulting .so file. |

