Our warnings/errors reported are using lowercase normally.
This addresses one of review comments from D92382.
# RUN: yaml2obj %s --docnum=20 -o %t20
# RUN: llvm-readobj --dynamic-table %t20 2>&1 | FileCheck -DFILE=%t20 --check-prefix=INVALID-DTSTRTAB %s
-# INVALID-DTSTRTAB: warning: '[[FILE]]': Unable to parse DT_STRTAB: virtual address is not in any segment: 0xffff0000
+# INVALID-DTSTRTAB: warning: '[[FILE]]': unable to parse DT_STRTAB: virtual address is not in any segment: 0xffff0000
--- !ELF
FileHeader:
# RUN: llvm-readelf %t2.so --dyn-symbols 2>&1 | \
# RUN: FileCheck %s -DFILE=%t2.so --implicit-check-not=warning: -DNAME=.dynsym --check-prefix=NOPHDRS-GNU
-# NOPHDRS-LLVM: warning: '[[FILE]]': Unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
+# NOPHDRS-LLVM: warning: '[[FILE]]': unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
# NOPHDRS-LLVM: DynamicSymbols [
# NOPHDRS-LLVM-NEXT: Symbol {
# NOPHDRS-LLVM-NEXT: Name: (0)
# NOPHDRS-LLVM-NEXT: }
# NOPHDRS-LLVM-NEXT: ]
-# NOPHDRS-GNU: warning: '[[FILE]]': Unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
+# NOPHDRS-GNU: warning: '[[FILE]]': unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
# NOPHDRS-NAMEWARN: warning: '[[FILE]]': unable to get the name of SHT_DYNSYM section with index 2: a section [index 2] has an invalid sh_name (0xffffffff) offset which goes past the end of the section name string table
# NOPHDRS-GNU: Symbol table '[[NAME]]' contains 2 entries:
# NOPHDRS-GNU-NEXT: Num: Value Size Type Bind Vis Ndx Name
# RUN: llvm-readobj %t3.so --dyn-symbols 2>&1 | FileCheck %s -DFILE=%t3.so --check-prefixes=NOSHT-DYNSYM,NOSHT-DYNSYM-LLVM
# RUN: llvm-readelf %t3.so --dyn-symbols 2>&1 | FileCheck %s -DFILE=%t3.so --check-prefix=NOSHT-DYNSYM
-# NOSHT-DYNSYM: warning: '[[FILE]]': Unable to parse DT_SYMTAB: virtual address is not in any segment: 0x0
+# NOSHT-DYNSYM: warning: '[[FILE]]': unable to parse DT_SYMTAB: virtual address is not in any segment: 0x0
# NOSHT-DYNSYM-LLVM: DynamicSymbols [
# NOSHT-DYNSYM-LLVM-NEXT: ]
# RUN: llvm-readobj %t4.so --dyn-symbols 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefixes=BROKEN-DTSYMTAB,BROKEN-DTSYMTAB-LLVM
# RUN: llvm-readelf %t4.so --dyn-symbols 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefixes=BROKEN-DTSYMTAB,BROKEN-DTSYMTAB-GNU
-# BROKEN-DTSYMTAB: warning: '[[FILE]]': Unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
+# BROKEN-DTSYMTAB: warning: '[[FILE]]': unable to parse DT_SYMTAB: virtual address is not in any segment: 0xffff1234
# BROKEN-DTSYMTAB-LLVM: Name: foo
# BROKEN-DTSYMTAB-GNU: 1: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND foo
# RUN: FileCheck -DFILE=%t.bad-strtab %s --implicit-check-not=warning: --check-prefix=BAD-STRTAB-ERR
# RUN: llvm-readelf --dynamic-table %t.bad-strtab 2>&1 >/dev/null | \
# RUN: FileCheck -DFILE=%t.bad-strtab %s --implicit-check-not=warning: --check-prefix=BAD-STRTAB-ERR
-# BAD-STRTAB-ERR: warning: '[[FILE]]': Unable to parse DT_STRTAB: virtual address is not in any segment: 0x2000000
+# BAD-STRTAB-ERR: warning: '[[FILE]]': unable to parse DT_STRTAB: virtual address is not in any segment: 0x2000000
# BAD-STRTAB-ERR: warning: '[[FILE]]': string table was not found
# BAD-STRTAB-ERR-NOT:{{.}}
# RUN: llvm-readelf --dynamic-table --needed-libs %t.bad-strtab 2>&1 | \
# RUN: FileCheck -DFILE=%t.bad-strtab %s --check-prefixes=BAD-STRTAB-ERR2,BAD-STRTAB,BAD-STRTAB-GNU
-# BAD-STRTAB-ERR2: warning: '[[FILE]]': Unable to parse DT_STRTAB: virtual address is not in any segment: 0x2000000
+# BAD-STRTAB-ERR2: warning: '[[FILE]]': unable to parse DT_STRTAB: virtual address is not in any segment: 0x2000000
# BAD-STRTAB-LLVM: LoadName: <Not found>
# BAD-STRTAB: warning: '[[FILE]]': string table was not found
# BAD-STRTAB-LLVM-NEXT: 0x0000000000000001 NEEDED Shared library: [<?>]
# RUN: llvm-readobj --dynamic-table %t.bad-rela 2>&1 | FileCheck -DFILE=%t.bad-rela %s --check-prefixes=CHECK,BAD-RELA
# RUN: llvm-readelf --dynamic-table %t.bad-rela 2>&1 | FileCheck -DFILE=%t.bad-rela %s --check-prefixes=CHECK,BAD-RELA-GNU
-# CHECK: warning: '[[FILE]]': Unable to parse DT_RELA: virtual address is not in any segment: 0x1000000
+# CHECK: warning: '[[FILE]]': unable to parse DT_RELA: virtual address is not in any segment: 0x1000000
# BAD-RELA: DynamicSection [ (2 entries)
# BAD-RELA-NEXT: Tag Type Name/Value
# RUN: --check-prefixes=PHENTSIZE-WARN,PHENTSIZE-GNU
# PHENTSIZE-WARN: warning: '[[FILE]]': unable to read program headers to locate the PT_DYNAMIC segment: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_HASH: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_STRTAB: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_SYMTAB: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_RELA: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_HASH: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_STRTAB: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_SYMTAB: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_RELA: invalid e_phentsize: 1
# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': DT_SYMENT value of 0x987 is not the size of a symbol (0x18)
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_REL: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_JMPREL: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_RELR: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_ANDROID_RELR: invalid e_phentsize: 1
-# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': Unable to parse DT_GNU_HASH: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_REL: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_JMPREL: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_RELR: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_ANDROID_RELR: invalid e_phentsize: 1
+# PHENTSIZE-WARN-NEXT: warning: '[[FILE]]': unable to parse DT_GNU_HASH: invalid e_phentsize: 1
# PHENTSIZE-LLVM: warning: '[[FILE]]': string table was not found
# PHENTSIZE-LLVM-NEXT: LoadName: <?>
# RUN: llvm-readobj %t.err.1.o 2>&1 | FileCheck %s -DFILE=%t.err.1.o --check-prefixes=BROKEN-OFFSET,BROKEN-OFFSET-LLVM
# RUN: llvm-readelf --dynamic-table %t.err.1.o 2>&1 | FileCheck %s -DFILE=%t.err.1.o --check-prefixes=BROKEN-OFFSET,BROKEN-OFFSET-GNU
-# BROKEN-OFFSET: warning: '[[FILE]]': Unable to parse DT_STRTAB: can't map virtual address 0xfffe to the segment with index 1: the segment ends at 0x10077, which is greater than the file size (0x228)
+# BROKEN-OFFSET: warning: '[[FILE]]': unable to parse DT_STRTAB: can't map virtual address 0xfffe to the segment with index 1: the segment ends at 0x10077, which is greater than the file size (0x228)
# BROKEN-OFFSET: warning: '[[FILE]]': string table was not found
# BROKEN-OFFSET-LLVM: LoadName: <?>
# BROKEN-OFFSET-GNU: 0x000000000000000e (SONAME) Library soname: [<?>]
loadDynamicTable();
}
-template <typename ELFT>
-void ELFDumper<ELFT>::parseDynamicTable() {
+template <typename ELFT> void ELFDumper<ELFT>::parseDynamicTable() {
auto toMappedAddr = [&](uint64_t Tag, uint64_t VAddr) -> const uint8_t * {
auto MappedAddrOrError = Obj.toMappedAddr(VAddr);
if (!MappedAddrOrError) {
- this->reportUniqueWarning("Unable to parse DT_" +
+ this->reportUniqueWarning("unable to parse DT_" +
Obj.getDynamicTagAsString(Tag) + ": " +
llvm::toString(MappedAddrOrError.takeError()));
return nullptr;