diff --git a/lld/test/ELF/partition-notes.s b/lld/test/ELF/partition-notes.s --- a/lld/test/ELF/partition-notes.s +++ b/lld/test/ELF/partition-notes.s @@ -18,7 +18,7 @@ // CHECK: Displaying notes found at file offset 0x{{0*}}[[NOTE_OFFSET]] // CHECK-NEXT: Owner // CHECK-NEXT: foo 0x00000004 NT_VERSION (version) -// CHECK-NEXT: description data: 62 61 72 00 +// CHECK-NEXT: Description data: 62 61 72 00 // CHECK-NEXT: Displaying notes // CHECK-NEXT: Owner // CHECK-NEXT: GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) diff --git a/llvm/test/CodeGen/AMDGPU/elf-notes.ll b/llvm/test/CodeGen/AMDGPU/elf-notes.ll --- a/llvm/test/CodeGen/AMDGPU/elf-notes.ll +++ b/llvm/test/CodeGen/AMDGPU/elf-notes.ll @@ -31,8 +31,8 @@ ; OSABI-HSA: .amd_amdgpu_hsa_metadata ; OSABI-HSA-NOT: .amd_amdgpu_pal_metadata -; OSABI-HSA-ELF: Unknown note type (0x00000001) -; OSABI-HSA-ELF: Unknown note type (0x00000003) +; OSABI-HSA-ELF: Unknown note type: (0x00000001) +; OSABI-HSA-ELF: Unknown note type: (0x00000003) ; OSABI-HSA-ELF: NT_AMD_AMDGPU_ISA (ISA Version) ; OSABI-HSA-ELF: ISA Version: ; OSABI-HSA-ELF: amdgcn-amd-amdhsa--gfx802 @@ -59,7 +59,7 @@ ; OSABI-PAL-NOT: .amd_amdgpu_hsa_metadata ; OSABI-PAL: .amd_amdgpu_pal_metadata -; OSABI-PAL-ELF: Unknown note type (0x00000003) +; OSABI-PAL-ELF: Unknown note type: (0x00000003) ; OSABI-PAL-ELF: NT_AMD_AMDGPU_ISA (ISA Version) ; OSABI-PAL-ELF: ISA Version: ; OSABI-PAL-ELF: amdgcn-amd-amdpal--gfx802 diff --git a/llvm/test/tools/llvm-readobj/ELF/note-freebsd.s b/llvm/test/tools/llvm-readobj/ELF/note-freebsd.s --- a/llvm/test/tools/llvm-readobj/ELF/note-freebsd.s +++ b/llvm/test/tools/llvm-readobj/ELF/note-freebsd.s @@ -13,8 +13,8 @@ // GNU-NEXT: FreeBSD 0x00000000 NT_PROCSTAT_FILES (files data) // GNU-NEXT: Displaying notes found // GNU-NEXT: Owner Data size Description -// GNU-NEXT: FreeBSD 0x0000001c Unknown note type (0x00000003) -// GNU-NEXT: description data: 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 00 00 +// GNU-NEXT: FreeBSD 0x0000001c Unknown note type: (0x00000003) +// GNU-NEXT: Description data: 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 00 00 // LLVM: Notes [ // LLVM-NEXT: NoteSection { @@ -46,7 +46,7 @@ // LLVM-NEXT: Note { // LLVM-NEXT: Owner: FreeBSD // LLVM-NEXT: Data size: 0x1C -// LLVM-NEXT: Type: Unknown note type (0x00000003) +// LLVM-NEXT: Type: Unknown note type: (0x00000003) // LLVM-NEXT: Description data ( // LLVM-NEXT: 0000: 4C6F7265 6D206970 73756D20 646F6C6F |Lorem ipsum dolo| // LLVM-NEXT: 0010: 72207369 7420616D 65740000 |r sit amet..| diff --git a/llvm/test/tools/llvm-readobj/ELF/note-unknown.s b/llvm/test/tools/llvm-readobj/ELF/note-unknown.s --- a/llvm/test/tools/llvm-readobj/ELF/note-unknown.s +++ b/llvm/test/tools/llvm-readobj/ELF/note-unknown.s @@ -1,16 +1,16 @@ // REQUIRES: x86-registered-target // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t.o -// RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM -// RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU +// RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM --strict-whitespace +// RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU --strict-whitespace // GNU: Displaying notes found at file offset 0x00000040 with length 0x00000010: -// GNU-NEXT: Owner Data size Description -// GNU-NEXT: XYZ 0x00000000 Unknown note type: (0x00000003) -// GNU-NEXT: Displaying notes found at file offset 0x00000050 with length 0x0000002c: -// GNU-NEXT: Owner Data size Description -// GNU-NEXT: XYZ 0x0000001c Unknown note type: (0x00000003) -// GNU-NEXT: description data: 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 00 00 +// GNU-NEXT: Owner Data size Description +// GNU-NEXT: XYZ 0x00000000 Unknown note type: (0x00000003) +// GNU-NEXT:Displaying notes found at file offset 0x00000050 with length 0x0000002c: +// GNU-NEXT: Owner Data size Description +// GNU-NEXT: XYZ 0x0000001c Unknown note type: (0x00000003) +// GNU-NEXT: Description data: 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 00 00 // LLVM: Notes [ // LLVM-NEXT: NoteSection { diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -4581,7 +4581,7 @@ std::string string; raw_string_ostream OS(string); - OS << format("Unknown note type (0x%08x)", NT); + OS << format("Unknown note type: (0x%08x)", NT); return OS.str(); } @@ -4609,7 +4609,7 @@ std::string string; raw_string_ostream OS(string); - OS << format("Unknown note type (0x%08x)", NT); + OS << format("Unknown note type: (0x%08x)", NT); return OS.str(); } @@ -4629,7 +4629,7 @@ std::string string; raw_string_ostream OS(string); - OS << format("Unknown note type (0x%08x)", NT); + OS << format("Unknown note type: (0x%08x)", NT); return OS.str(); } @@ -4639,7 +4639,7 @@ std::string string; raw_string_ostream OS(string); - OS << format("Unknown note type (0x%08x)", NT); + OS << format("Unknown note type: (0x%08x)", NT); return OS.str(); } @@ -5051,7 +5051,7 @@ reportWarning(Note.takeError(), this->FileName); } } else if (!Descriptor.empty()) { - OS << " description data:"; + OS << " Description data:"; for (uint8_t B : Descriptor) OS << " " << format("%02x", B); OS << '\n';