Recommit of r263252, [ELF] - Change all messages to lowercase to be consistent.

which was reverted because included
unrelative changes by mistake.

Original commit message:

[ELF] - Change all messages to lowercase to be consistent.

That is directly opposite to http://reviews.llvm.org/D18045,
which was reverted.

This patch changes all messages to start from lowercase letter if
they were not before.

That is done to be consistent with clang.

Differential revision: http://reviews.llvm.org/D18085

llvm-svn: 263337
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 9be3732..a37a926 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -61,9 +61,9 @@
   if (S == "aarch64linux")
     return {ELF64LEKind, EM_AARCH64};
   if (S == "i386pe" || S == "i386pep" || S == "thumb2pe")
-    error("Windows targets are not supported on the ELF frontend: " + S);
+    error("windows targets are not supported on the ELF frontend: " + S);
   else
-    error("Unknown emulation: " + S);
+    error("unknown emulation: " + S);
   return {ELFNoneKind, 0};
 }
 
@@ -112,7 +112,7 @@
     return;
   case file_magic::elf_shared_object:
     if (Config->Relocatable) {
-      error("Attempted static link of dynamic object " + Path);
+      error("attempted static link of dynamic object " + Path);
       return;
     }
     Files.push_back(createSharedFile(MBRef));
@@ -126,7 +126,7 @@
 void LinkerDriver::addLibrary(StringRef Name) {
   std::string Path = searchLibrary(Name);
   if (Path.empty())
-    error("Unable to find library -l" + Name);
+    error("unable to find library -l" + Name);
   else
     addFile(Path);
 }
@@ -137,7 +137,7 @@
   // The MIPS ABI as of 2016 does not support the GNU-style symbol lookup
   // table which is a relatively new feature.
   if (Config->EMachine == EM_MIPS && Config->GnuHash)
-    error("The .gnu.hash section is not compatible with the MIPS target.");
+    error("the .gnu.hash section is not compatible with the MIPS target.");
 
   if (Config->EMachine == EM_AMDGPU && !Config->Entry.empty())
     error("-e option is not valid for AMDGPU.");
@@ -263,7 +263,7 @@
   if (auto *Arg = Args.getLastArg(OPT_O)) {
     StringRef Val = Arg->getValue();
     if (Val.getAsInteger(10, Config->Optimize))
-      error("Invalid optimization level");
+      error("invalid optimization level");
   }
 
   if (auto *Arg = Args.getLastArg(OPT_hash_style)) {
@@ -274,7 +274,7 @@
     } else if (S == "both") {
       Config->GnuHash = true;
     } else if (S != "sysv")
-      error("Unknown hash style: " + S);
+      error("unknown hash style: " + S);
   }
 
   for (auto *Arg : Args.filtered(OPT_undefined))
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index fcc05c2..7292f4a 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -53,7 +53,7 @@
   uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end());
   uint32_t FirstNonLocal = Symtab->sh_info;
   if (FirstNonLocal > NumSymbols)
-    fatal("Invalid sh_info in symbol table");
+    fatal("invalid sh_info in symbol table");
 
   if (OnlyGlobals)
     return make_range(Syms.begin() + FirstNonLocal, Syms.end());
@@ -137,7 +137,7 @@
   ArrayRef<uint32_X> Entries =
       check(Obj.template getSectionContentsAsArray<uint32_X>(&Sec));
   if (Entries.empty() || Entries[0] != GRP_COMDAT)
-    fatal("Unsupported SHT_GROUP format");
+    fatal("unsupported SHT_GROUP format");
   return Entries.slice(1);
 }
 
@@ -148,7 +148,7 @@
   if (!(Flags & SHF_MERGE))
     return false;
   if (Flags & SHF_WRITE)
-    fatal("Writable SHF_MERGE sections are not supported");
+    fatal("writable SHF_MERGE sections are not supported");
   uintX_t EntSize = Sec.sh_entsize;
   if (!EntSize || Sec.sh_size % EntSize)
     fatal("SHF_MERGE section size must be a multiple of sh_entsize");
@@ -187,7 +187,7 @@
         continue;
       for (uint32_t SecIndex : getShtGroupEntries(Sec)) {
         if (SecIndex >= Size)
-          fatal("Invalid section index in group");
+          fatal("invalid section index in group");
         Sections[SecIndex] = InputSection<ELFT>::Discarded;
       }
       break;
@@ -204,7 +204,7 @@
     case SHT_REL: {
       uint32_t RelocatedSectionIndex = Sec.sh_info;
       if (RelocatedSectionIndex >= Size)
-        fatal("Invalid relocated section index");
+        fatal("invalid relocated section index");
       InputSectionBase<ELFT> *RelocatedSection =
           Sections[RelocatedSectionIndex];
       // Strictly speaking, a relocation section must be included in the
@@ -213,7 +213,7 @@
       if (RelocatedSection == InputSection<ELFT>::Discarded)
         continue;
       if (!RelocatedSection)
-        fatal("Unsupported relocation reference");
+        fatal("unsupported relocation reference");
       if (Config->Relocatable) {
         // For -r, relocation sections are handled as regular input sections.
         Sections[I] = new (Alloc) InputSection<ELFT>(this, &Sec);
@@ -221,10 +221,10 @@
         S->RelocSections.push_back(&Sec);
       } else if (auto *S = dyn_cast<EHInputSection<ELFT>>(RelocatedSection)) {
         if (S->RelocSection)
-          fatal("Multiple relocation sections to .eh_frame are not supported");
+          fatal("multiple relocation sections to .eh_frame are not supported");
         S->RelocSection = &Sec;
       } else {
-        fatal("Relocations pointing to SHF_MERGE are not supported");
+        fatal("relocations pointing to SHF_MERGE are not supported");
       }
       break;
     }
@@ -247,7 +247,7 @@
     return InputSection<ELFT>::Discarded;
 
   if (Name == ".note.GNU-split-stack")
-    error("Objects using splitstacks are not supported");
+    error("objects using splitstacks are not supported");
 
   // A MIPS object file has a special section that contains register
   // usage info, which needs to be handled by the linker specially.
@@ -281,7 +281,7 @@
   if (Index == 0)
     return nullptr;
   if (Index >= Sections.size() || !Sections[Index])
-    fatal("Invalid section index");
+    fatal("invalid section index");
   InputSectionBase<ELFT> *S = Sections[Index];
   if (S == InputSectionBase<ELFT>::Discarded)
     return S;
@@ -397,7 +397,7 @@
     if (Dyn.d_tag == DT_SONAME) {
       uintX_t Val = Dyn.getVal();
       if (Val >= this->StringTable.size())
-        fatal("Invalid DT_SONAME entry");
+        fatal("invalid DT_SONAME entry");
       SoName = StringRef(this->StringTable.data() + Val);
       return;
     }
@@ -433,7 +433,7 @@
   case GlobalValue::ProtectedVisibility:
     return STV_PROTECTED;
   }
-  llvm_unreachable("Unknown visibility");
+  llvm_unreachable("unknown visibility");
 }
 
 SymbolBody *
@@ -516,7 +516,7 @@
 static std::unique_ptr<InputFile> createELFFile(MemoryBufferRef MB) {
   std::pair<unsigned char, unsigned char> Type = getElfArchType(MB.getBuffer());
   if (Type.second != ELF::ELFDATA2LSB && Type.second != ELF::ELFDATA2MSB)
-    fatal("Invalid data encoding: " + MB.getBufferIdentifier());
+    fatal("invalid data encoding: " + MB.getBufferIdentifier());
 
   if (Type.first == ELF::ELFCLASS32) {
     if (Type.second == ELF::ELFDATA2LSB)
@@ -528,7 +528,7 @@
       return createELFFileAux<T<ELF64LE>>(MB);
     return createELFFileAux<T<ELF64BE>>(MB);
   }
-  fatal("Invalid file class: " + MB.getBufferIdentifier());
+  fatal("invalid file class: " + MB.getBufferIdentifier());
 }
 
 std::unique_ptr<InputFile> elf::createObjectFile(MemoryBufferRef MB,
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 1c21163..b4802cd 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -62,7 +62,7 @@
     // so it should never be copied to output.
     llvm_unreachable("MIPS .reginfo reached writeTo().");
   }
-  llvm_unreachable("Invalid section kind");
+  llvm_unreachable("invalid section kind");
 }
 
 template <class ELFT>
@@ -387,7 +387,7 @@
   StringRef Data((const char *)D.data(), D.size());
   uintX_t Size = Data.size();
   if (Offset >= Size)
-    fatal("Entry is past the end of the section");
+    fatal("entry is past the end of the section");
 
   // Find the element this offset points to.
   auto I = std::upper_bound(
@@ -431,7 +431,7 @@
   // Initialize this->Reginfo.
   ArrayRef<uint8_t> D = this->getSectionData();
   if (D.size() != sizeof(Elf_Mips_RegInfo<ELFT>))
-    fatal("Invalid size of .reginfo section");
+    fatal("invalid size of .reginfo section");
   Reginfo = reinterpret_cast<const Elf_Mips_RegInfo<ELFT> *>(D.data());
 }
 
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index b4580b5..677abb1 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -296,7 +296,7 @@
   } else {
     std::string Path = findFromSearchPaths(S);
     if (Path.empty())
-      setError("Unable to find " + S);
+      setError("unable to find " + S);
     else
       Driver->addFile(Saver.save(Path));
   }
@@ -419,7 +419,7 @@
     S = S.substr(2);
     uint8_t H;
     if (B.getAsInteger(16, H)) {
-      setError("Not a HEX value: " + B);
+      setError("not a HEX value: " + B);
       return {};
     }
     Hex.push_back(H);
@@ -442,13 +442,13 @@
       readSectionPatterns(OutSec, true);
       expect(")");
     } else {
-      setError("Unknown command " + Tok);
+      setError("unknown command " + Tok);
     }
   }
   StringRef Tok = peek();
   if (Tok.startswith("=")) {
     if (!Tok.startswith("=0x")) {
-      setError("Filler should be a HEX value");
+      setError("filler should be a HEX value");
       return;
     }
     Tok = Tok.substr(3);
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 5bde535..5163fe2 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -256,7 +256,7 @@
   case Off_GotPlt:
     return Sym->getGotPltVA<ELFT>();
   }
-  llvm_unreachable("Invalid offset kind");
+  llvm_unreachable("invalid offset kind");
 }
 
 template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
@@ -1150,7 +1150,7 @@
         uint32_t CieOffset = Offset + 4 - ID;
         auto I = OffsetToIndex.find(CieOffset);
         if (I == OffsetToIndex.end())
-          fatal("Invalid CIE reference");
+          fatal("invalid CIE reference");
         Cies[I->second].Fdes.push_back(EHRegion<ELFT>(S, Index));
         Out<ELFT>::EhFrameHdr->reserveFde();
         this->Header.sh_size += alignTo(Length, sizeof(uintX_t));
@@ -1266,7 +1266,7 @@
     while (!Data.empty()) {
       size_t End = findNull(Data, EntSize);
       if (End == StringRef::npos)
-        fatal("String is not null terminated");
+        fatal("string is not null terminated");
       StringRef Entry = Data.substr(0, End + EntSize);
       uintX_t OutputOffset = Builder.add(Entry);
       if (shouldTailMerge())
@@ -1512,7 +1512,7 @@
   case SymbolBody::LazyKind:
     break;
   case SymbolBody::DefinedBitcodeKind:
-    llvm_unreachable("Should have been replaced");
+    llvm_unreachable("should have been replaced");
   }
   return nullptr;
 }
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index aa97595..b66882a 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -119,7 +119,7 @@
   std::string ErrMsg;
   const Target *TheTarget = TargetRegistry::lookupTarget(TripleStr, ErrMsg);
   if (!TheTarget)
-    fatal("Target not found: " + ErrMsg);
+    fatal("target not found: " + ErrMsg);
 
   TargetOptions Options;
   Reloc::Model R = Config->Shared ? Reloc::PIC_ : Reloc::Static;
@@ -130,7 +130,7 @@
   legacy::PassManager CodeGenPasses;
   if (TM->addPassesToEmitFile(CodeGenPasses, OS,
                               TargetMachine::CGFT_ObjectFile))
-    fatal("Failed to setup codegen");
+    fatal("failed to setup codegen");
   CodeGenPasses.run(M);
   LtoBuffer = MemoryBuffer::getMemBuffer(OwningLTOData, "", false);
   if (Config->SaveTemps)
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 30179e4..aea97c4 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -73,12 +73,12 @@
   case SymbolBody::UndefinedKind:
     return 0;
   case SymbolBody::LazyKind:
-    assert(Body.isUsedInRegularObj() && "Lazy symbol reached writer");
+    assert(Body.isUsedInRegularObj() && "lazy symbol reached writer");
     return 0;
   case SymbolBody::DefinedBitcodeKind:
-    llvm_unreachable("Should have been replaced");
+    llvm_unreachable("should have been replaced");
   }
-  llvm_unreachable("Invalid symbol kind");
+  llvm_unreachable("invalid symbol kind");
 }
 
 template <class ELFT>
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 1fbd5bc..ed89aad 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -46,28 +46,28 @@
   if (isInt<N>(V))
     return;
   StringRef S = getELFRelocationTypeName(Config->EMachine, Type);
-  error("Relocation " + S + " out of range");
+  error("relocation " + S + " out of range");
 }
 
 template <unsigned N> static void checkUInt(uint64_t V, uint32_t Type) {
   if (isUInt<N>(V))
     return;
   StringRef S = getELFRelocationTypeName(Config->EMachine, Type);
-  error("Relocation " + S + " out of range");
+  error("relocation " + S + " out of range");
 }
 
 template <unsigned N> static void checkIntUInt(uint64_t V, uint32_t Type) {
   if (isInt<N>(V) || isUInt<N>(V))
     return;
   StringRef S = getELFRelocationTypeName(Config->EMachine, Type);
-  error("Relocation " + S + " out of range");
+  error("relocation " + S + " out of range");
 }
 
 template <unsigned N> static void checkAlignment(uint64_t V, uint32_t Type) {
   if ((V & (N - 1)) == 0)
     return;
   StringRef S = getELFRelocationTypeName(Config->EMachine, Type);
-  error("Improper alignment for relocation " + S);
+  error("improper alignment for relocation " + S);
 }
 
 template <class ELFT> bool isGnuIFunc(const SymbolBody &S) {
@@ -246,7 +246,7 @@
     case ELF32BEKind:
       return new MipsTargetInfo<ELF32BE>();
     default:
-      fatal("Unsupported MIPS target");
+      fatal("unsupported MIPS target");
     }
   case EM_PPC:
     return new PPCTargetInfo();
@@ -255,7 +255,7 @@
   case EM_X86_64:
     return new X86_64TargetInfo();
   }
-  fatal("Unknown target machine");
+  fatal("unknown target machine");
 }
 
 TargetInfo::~TargetInfo() {}
@@ -566,7 +566,7 @@
     relocateOne(Loc, BufEnd, R_386_TLS_LE, P, SA);
     return 0;
   }
-  llvm_unreachable("Unknown TLS optimization");
+  llvm_unreachable("unknown TLS optimization");
 }
 
 // "Ulrich Drepper, ELF Handling For Thread-Local Storage" (5.1
@@ -914,7 +914,7 @@
     // The next relocation should be against __tls_get_addr, so skip it
     return 1;
   }
-  llvm_unreachable("Unknown TLS optimization");
+  llvm_unreachable("unknown TLS optimization");
 }
 
 void X86_64TargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type,
@@ -1470,7 +1470,7 @@
   case R_AARCH64_TLSDESC_ADD_LO12_NC:
   case R_AARCH64_TLSDESC_CALL: {
     if (canBePreempted(S))
-      fatal("Unsupported TLS optimization");
+      fatal("unsupported TLS optimization");
     uint64_t X = S.getVA<ELF64LE>();
     relocateTlsGdToLe(Type, Loc, BufEnd, P, X);
     return 0;
@@ -1480,7 +1480,7 @@
     relocateTlsIeToLe(Type, Loc, BufEnd, P, S.getVA<ELF64LE>());
     return 0;
   }
-  llvm_unreachable("Unknown TLS optimization");
+  llvm_unreachable("unknown TLS optimization");
 }
 
 // Global-Dynamic relocations can be relaxed to Local-Exec if both binary is
@@ -1519,7 +1519,7 @@
     NewInst = 0xf2800000 | ((X & 0xffff) << 5);
     break;
   default:
-    llvm_unreachable("Unsupported Relocation for TLS GD to LE relax");
+    llvm_unreachable("unsupported Relocation for TLS GD to LE relax");
   }
   write32le(Loc, NewInst);
 }
@@ -1544,7 +1544,7 @@
     unsigned RegNo = (Inst & 0x1f);
     NewInst = (0xf2800000 | RegNo) | ((X & 0xffff) << 5);
   } else {
-    llvm_unreachable("Invalid Relocation for TLS IE to LE Relax");
+    llvm_unreachable("invalid Relocation for TLS IE to LE Relax");
   }
   write32le(Loc, NewInst);
 }
diff --git a/lld/test/ELF/basic.s b/lld/test/ELF/basic.s
index bbc674ce..f2bf93b 100644
--- a/lld/test/ELF/basic.s
+++ b/lld/test/ELF/basic.s
@@ -213,4 +213,4 @@
 # DUP: duplicate symbol: _start in {{.*}} and {{.*}}
 
 # RUN: not ld.lld %t -o %t -m wrong_emul 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s
-# UNKNOWN_EMUL: Unknown emulation: wrong_emul
+# UNKNOWN_EMUL: unknown emulation: wrong_emul
diff --git a/lld/test/ELF/driver.test b/lld/test/ELF/driver.test
index 9c83fa5..cf6601a 100644
--- a/lld/test/ELF/driver.test
+++ b/lld/test/ELF/driver.test
@@ -6,9 +6,9 @@
 # UNKNOWN: warning: unknown argument: --unknown1
 # UNKNOWN: warning: unknown argument: --unknown2
 # UNKNOWN: unknown argument(s) found
-# UNKNOWN: Unknown emulation: foo
+# UNKNOWN: unknown emulation: foo
 # UNKNOWN: cannot open /no/such/file
-# UNKNOWN: Unable to find library -lnosuchlib
+# UNKNOWN: unable to find library -lnosuchlib
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
 # RUN: not ld.lld %t -o /no/such/file 2>&1 | FileCheck -check-prefix=MISSING %s
@@ -23,7 +23,7 @@
 ## Attempt to link DSO with -r
 # RUN: ld.lld -shared %t -o %t.so
 # RUN: not ld.lld -r %t.so %t -o %tfail 2>&1 | FileCheck -check-prefix=ERR %s
-# ERR: Attempted static link of dynamic object
+# ERR: attempted static link of dynamic object
 
 ## Attempt to use -r and -shared together
 # RUN: not ld.lld -r -shared %t -o %tfail 2>&1 | FileCheck -check-prefix=ERR2 %s
diff --git a/lld/test/ELF/invalid-cie-reference.s b/lld/test/ELF/invalid-cie-reference.s
index 1b099d1..fba2467 100644
--- a/lld/test/ELF/invalid-cie-reference.s
+++ b/lld/test/ELF/invalid-cie-reference.s
@@ -29,4 +29,4 @@
         .long 0x0
         .long 0x0
 
-// CHECK: Invalid CIE reference
+// CHECK: invalid CIE reference
diff --git a/lld/test/ELF/invalid-elf.test b/lld/test/ELF/invalid-elf.test
index 05e95ca..c3a97d3 100644
--- a/lld/test/ELF/invalid-elf.test
+++ b/lld/test/ELF/invalid-elf.test
@@ -2,26 +2,27 @@
 
 # RUN: not ld.lld %t %p/Inputs/invalid-data-encoding.a -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-DATA-ENC %s
-# INVALID-DATA-ENC: Invalid data encoding: test.o
+# INVALID-DATA-ENC: invalid data encoding: test.o
 
 # RUN: not ld.lld %t %p/Inputs/invalid-file-class.a -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-FILE-CLASS %s
-# INVALID-FILE-CLASS: Invalid file class: test.o
+# INVALID-FILE-CLASS: invalid file class: test.o
 
 # RUN: not ld.lld %p/Inputs/invalid-symtab-sh_info.elf -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-SYMTAB-SHINFO %s
-# INVALID-SYMTAB-SHINFO: Invalid sh_info in symbol table
+# INVALID-SYMTAB-SHINFO: invalid sh_info in symbol table
 
 # RUN: not ld.lld %p/Inputs/invalid-binding.elf -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-BINDING %s
 # INVALID-BINDING: unexpected binding
 
 # RUN: not ld.lld %p/Inputs/invalid-section-index.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX %s
-# INVALID-SECTION-INDEX: Invalid section index
+# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX-LLD %s
+# INVALID-SECTION-INDEX-LLD: invalid section index
 
 # RUN: not ld.lld %p/Inputs/invalid-shstrndx.so -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX %s
+# INVALID-SECTION-INDEX: Invalid section index
 
 # RUN: not ld.lld %p/Inputs/invalid-shentsize-zero.elf -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-SHENTSIZE-ZERO %s
@@ -29,6 +30,6 @@
 
 # RUN: not ld.lld %p/Inputs/invalid-multiple-eh-relocs.elf -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-EH-RELOCS %s
-# INVALID-EH-RELOCS: Multiple relocation sections to .eh_frame are not supported
+# INVALID-EH-RELOCS: multiple relocation sections to .eh_frame are not supported
 
 .long foo
diff --git a/lld/test/ELF/invalid-relocations.test b/lld/test/ELF/invalid-relocations.test
index 2b4a6c4..1278ba5 100644
--- a/lld/test/ELF/invalid-relocations.test
+++ b/lld/test/ELF/invalid-relocations.test
@@ -19,4 +19,4 @@
   Global:
     - Name:            lulz
 
-# CHECK: Invalid relocated section index
+# CHECK: invalid relocated section index
diff --git a/lld/test/ELF/libsearch.s b/lld/test/ELF/libsearch.s
index c965b9b..5f5aea7 100644
--- a/lld/test/ELF/libsearch.s
+++ b/lld/test/ELF/libsearch.s
@@ -23,7 +23,7 @@
 // Should fail if cannot find specified library (without -L switch)
 // RUN: not ld.lld -o %t3 %t.o -lls 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOLIB %s
-// NOLIB: Unable to find library -lls
+// NOLIB: unable to find library -lls
 
 // Should use explicitly specified static library
 // Also ensure that we accept -L <arg>
@@ -55,7 +55,7 @@
 // RUN: llvm-readobj --symbols %t3 | FileCheck --check-prefix=STATIC %s
 // RUN: not ld.lld -o %t3 %t.o -L%t.dir -Bstatic -lls2 2>&1 \
 // RUN:   | FileCheck --check-prefix=NOLIB2 %s
-// NOLIB2: Unable to find library -lls2
+// NOLIB2: unable to find library -lls2
 
 // -Bdynamic should restore default behaviour
 // RUN: ld.lld -o %t3 %t.o -L%t.dir -Bstatic -Bdynamic -lls
diff --git a/lld/test/ELF/linkerscript-sections-padding.s b/lld/test/ELF/linkerscript-sections-padding.s
index eb2c919..c6f4333 100644
--- a/lld/test/ELF/linkerscript-sections-padding.s
+++ b/lld/test/ELF/linkerscript-sections-padding.s
@@ -23,13 +23,13 @@
 # RUN: echo "SECTIONS { .mysec : { *(.mysec*) } =99 }" > %t.script
 # RUN: not ld.lld -o %t.out --script %t.script %t 2>&1 \
 # RUN:   | FileCheck --check-prefix=ERR %s
-# ERR: Filler should be a HEX value
+# ERR: filler should be a HEX value
 
 ## Filler should be a hex value (2):
 # RUN: echo "SECTIONS { .mysec : { *(.mysec*) } =0x99XX }" > %t.script
 # RUN: not ld.lld -o %t.out --script %t.script %t 2>&1 \
 # RUN:   | FileCheck --check-prefix=ERR2 %s
-# ERR2: Not a HEX value: XX
+# ERR2: not a HEX value: XX
 
 .section        .mysec.1,"a"
 .align  16
diff --git a/lld/test/ELF/merge-string-error.s b/lld/test/ELF/merge-string-error.s
index 58a6243..235a3d7 100644
--- a/lld/test/ELF/merge-string-error.s
+++ b/lld/test/ELF/merge-string-error.s
@@ -8,4 +8,4 @@
         .text
         .long .rodata.str1.1 + 4
 
-// CHECK: Entry is past the end of the section
+// CHECK: entry is past the end of the section
diff --git a/lld/test/ELF/merge-string-no-null.s b/lld/test/ELF/merge-string-no-null.s
index 70d6bbb..fd3f507 100644
--- a/lld/test/ELF/merge-string-no-null.s
+++ b/lld/test/ELF/merge-string-no-null.s
@@ -5,4 +5,4 @@
 	.section	.rodata.str1.1,"aMS",@progbits,1
 	.ascii	"abc"
 
-// CHECK: String is not null terminated
+// CHECK: string is not null terminated
diff --git a/lld/test/ELF/mips-gnu-hash.s b/lld/test/ELF/mips-gnu-hash.s
index 4b11f21..288d540 100644
--- a/lld/test/ELF/mips-gnu-hash.s
+++ b/lld/test/ELF/mips-gnu-hash.s
@@ -6,7 +6,7 @@
 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t-el.o
 # RUN: not ld.lld -shared -hash-style=gnu %t-el.o -o %t-el.so 2>&1 | FileCheck %s
 
-# CHECK: The .gnu.hash section is not compatible with the MIPS target.
+# CHECK: the .gnu.hash section is not compatible with the MIPS target.
 
 # REQUIRES: mips
 
diff --git a/lld/test/ELF/ppc64-addr16-error.s b/lld/test/ELF/ppc64-addr16-error.s
index c731c6e..2bc8ef2 100644
--- a/lld/test/ELF/ppc64-addr16-error.s
+++ b/lld/test/ELF/ppc64-addr16-error.s
@@ -5,4 +5,4 @@
 
 .short sym+65539
 
-// CHECK: Relocation R_PPC64_ADDR16 out of range
+// CHECK: relocation R_PPC64_ADDR16 out of range
diff --git a/lld/test/ELF/relocation-in-merge.s b/lld/test/ELF/relocation-in-merge.s
index 820208a..9ce2e4f 100644
--- a/lld/test/ELF/relocation-in-merge.s
+++ b/lld/test/ELF/relocation-in-merge.s
@@ -1,7 +1,7 @@
 // REQUIRES: x86
 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
 // RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
-// CHECK: Relocations pointing to SHF_MERGE are not supported
+// CHECK: relocations pointing to SHF_MERGE are not supported
 
         .section	.foo,"aM",@progbits,4
         .long bar
diff --git a/lld/test/ELF/relocation-past-merge-end.s b/lld/test/ELF/relocation-past-merge-end.s
index 4dadea1..409b4e2 100644
--- a/lld/test/ELF/relocation-past-merge-end.s
+++ b/lld/test/ELF/relocation-past-merge-end.s
@@ -1,7 +1,7 @@
 // REQUIRES: x86
 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
 // RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
-// CHECK: Entry is past the end of the section
+// CHECK: entry is past the end of the section
 
         .long .foo + 1
         .section	.foo,"aM",@progbits,4
diff --git a/lld/test/ELF/splitstacks.s b/lld/test/ELF/splitstacks.s
index 809ed2b..6506b48 100644
--- a/lld/test/ELF/splitstacks.s
+++ b/lld/test/ELF/splitstacks.s
@@ -2,7 +2,7 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
 
 # RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s
-# CHECK: Objects using splitstacks are not supported
+# CHECK: objects using splitstacks are not supported
 
 .globl _start
 _start:
diff --git a/lld/test/ELF/sysroot.s b/lld/test/ELF/sysroot.s
index 35154be..202b105 100644
--- a/lld/test/ELF/sysroot.s
+++ b/lld/test/ELF/sysroot.s
@@ -14,7 +14,7 @@
 // We need to be sure that there is no suitable library in the /lib directory
 // RUN: not ld.lld -o %t/r %t/m.o -L/lib -l:libls.a 2>&1 \
 // RUN:     | FileCheck --check-prefix=NOLIB %s
-// NOLIB: Unable to find library -l:libls.a
+// NOLIB: unable to find library -l:libls.a
 
 // Should just remove the '=' symbol if --sysroot is not specified.
 // Case 1: relative path
diff --git a/lld/test/ELF/writable-merge.s b/lld/test/ELF/writable-merge.s
index dd7b853..6375573 100644
--- a/lld/test/ELF/writable-merge.s
+++ b/lld/test/ELF/writable-merge.s
@@ -1,6 +1,6 @@
 // REQUIRES: x86
 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
 // RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
-// CHECK: Writable SHF_MERGE sections are not supported
+// CHECK: writable SHF_MERGE sections are not supported
 
         .section	.foo,"awM",@progbits,4