[llvm] 60a8a50 - [llvm-objdump] Print file format in lowercase to match GNU output.
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 08:18:29 PST 2020
Author: Jordan Rupprecht
Date: 2020-02-12T08:17:01-08:00
New Revision: 60a8a504f16dbbc5f2a6887ecb668ef4cb834949
URL: https://github.com/llvm/llvm-project/commit/60a8a504f16dbbc5f2a6887ecb668ef4cb834949
DIFF: https://github.com/llvm/llvm-project/commit/60a8a504f16dbbc5f2a6887ecb668ef4cb834949.diff
LOG: [llvm-objdump] Print file format in lowercase to match GNU output.
Summary:
GNU objdump prints the file format in lowercase, e.g. `elf64-x86-64`. llvm-objdump prints `ELF64-x86-64` right now, even though piping that into llvm-objcopy refuses that as a valid arch to use.
As an example of a problem this causes, see: https://github.com/ClangBuiltLinux/linux/issues/779
Reviewers: MaskRay, jhenderson, alexshap
Reviewed By: MaskRay
Subscribers: tpimh, sbc100, grimar, jvesely, nhaehnle, kerbowa, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74433
Added:
Modified:
clang/test/Modules/pch_container.m
lld/test/COFF/savetemps.ll
llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll
llvm/test/CodeGen/ARM/Windows/trivial-gnu-object.ll
llvm/test/CodeGen/BPF/reloc-btf-2.ll
llvm/test/CodeGen/BPF/reloc-btf.ll
llvm/test/CodeGen/BPF/reloc.ll
llvm/test/Object/AMDGPU/objdump.s
llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
llvm/test/Object/X86/objdump-label.test
llvm/test/Object/X86/objdump-trivial-object.test
llvm/test/Object/dynamic-reloc.test
llvm/test/Object/objdump-symbol-table.test
llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s
llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-exec.test
llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test
llvm/test/tools/llvm-objdump/X86/output-ordering.test
llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
llvm/test/tools/llvm-objdump/all-headers.test
llvm/test/tools/llvm-objdump/archive-headers.test
llvm/test/tools/llvm-objdump/file-headers-coff.test
llvm/test/tools/llvm-objdump/file-headers-elf.test
llvm/test/tools/llvm-objdump/non-archive-object.test
llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test
llvm/tools/llvm-objdump/llvm-objdump.cpp
Removed:
################################################################################
diff --git a/clang/test/Modules/pch_container.m b/clang/test/Modules/pch_container.m
index 77cd5f352bc9..ed13baf2d26c 100644
--- a/clang/test/Modules/pch_container.m
+++ b/clang/test/Modules/pch_container.m
@@ -8,11 +8,11 @@
// RUN: llvm-objdump --section-headers %t-MachO/DependsOnModule.pcm %t-ELF/DependsOnModule.pcm %t-COFF/DependsOnModule.pcm | FileCheck %s
-// CHECK: file format Mach-O 64-bit x86-64
+// CHECK: file format mach-o 64-bit x86-64
// CHECK: __clangast {{[0-9a-f]+}} {{[0-9a-f]+}} DATA
-// CHECK: file format ELF64-x86-64
+// CHECK: file format elf64-x86-64
// CHECK: __clangast {{[0-9a-f]+}} {{[0-9a-f]+}} DATA
-// CHECK: file format COFF-x86-64
+// CHECK: file format coff-x86-64
// CHECK: clangast {{[0-9a-f]+}} {{[0-9a-f]+}}
// RUN: not llvm-objdump --section-headers %t-raw/DependsOnModule.pcm
diff --git a/lld/test/COFF/savetemps.ll b/lld/test/COFF/savetemps.ll
index e755ba9920d3..46a4958d2f78 100644
--- a/lld/test/COFF/savetemps.ll
+++ b/lld/test/COFF/savetemps.ll
@@ -19,7 +19,7 @@
; RUN: FileCheck --check-prefix=CHECK-OBJDUMP %s
; CHECK: define i32 @main()
-; CHECK-OBJDUMP: file format COFF
+; CHECK-OBJDUMP: file format coff
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
diff --git a/llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll b/llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll
index 1254365b8205..58691f8ffcd2 100644
--- a/llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll
@@ -11,7 +11,7 @@ define void @foo() nounwind {
; Similarly make sure ELF output works and is vaguely sane: aarch64 target
; machine with correct section & symbol names.
-; CHECK-ELF: file format ELF64-aarch64
+; CHECK-ELF: file format elf64-aarch64
; CHECK-ELF: Disassembly of section .text
; CHECK-ELF-LABEL: foo:
diff --git a/llvm/test/CodeGen/ARM/Windows/trivial-gnu-object.ll b/llvm/test/CodeGen/ARM/Windows/trivial-gnu-object.ll
index a242f39601cb..2d55f218ddce 100644
--- a/llvm/test/CodeGen/ARM/Windows/trivial-gnu-object.ll
+++ b/llvm/test/CodeGen/ARM/Windows/trivial-gnu-object.ll
@@ -2,7 +2,7 @@
; RUN: llc -mtriple=thumbv7-windows-gnu -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s
define void @foo() {
-; CHECK: file format COFF-ARM
+; CHECK: file format coff-arm
; CHECK-LABEL: foo:
; CHECK: bx lr
diff --git a/llvm/test/CodeGen/BPF/reloc-btf-2.ll b/llvm/test/CodeGen/BPF/reloc-btf-2.ll
index 2afeb24bae48..68f00081d7d7 100644
--- a/llvm/test/CodeGen/BPF/reloc-btf-2.ll
+++ b/llvm/test/CodeGen/BPF/reloc-btf-2.ll
@@ -21,7 +21,7 @@ define dso_local i32 @test() local_unnamed_addr #0 !dbg !14 {
ret i32 %3, !dbg !24
}
-; CHECK-RELOC: file format ELF64-BPF
+; CHECK-RELOC: file format elf64-bpf
; CHECK-RELOC: RELOCATION RECORDS FOR [.BTF]:
; CHECK-RELOC: R_BPF_NONE .bss
; CHECK-RELOC: R_BPF_NONE g
diff --git a/llvm/test/CodeGen/BPF/reloc-btf.ll b/llvm/test/CodeGen/BPF/reloc-btf.ll
index 484ef3336ff4..c6f34fbde46e 100644
--- a/llvm/test/CodeGen/BPF/reloc-btf.ll
+++ b/llvm/test/CodeGen/BPF/reloc-btf.ll
@@ -6,7 +6,7 @@ entry:
ret i32 0, !dbg !11
}
-; CHECK-RELOC: file format ELF64-BPF
+; CHECK-RELOC: file format elf64-bpf
; CHECK-RELOC: RELOCATION RECORDS FOR [.debug_info]:
; CHECK-RELOC: R_BPF_64_32 .debug_abbrev
; CHECK-RELOC: R_BPF_64_64 .text
diff --git a/llvm/test/CodeGen/BPF/reloc.ll b/llvm/test/CodeGen/BPF/reloc.ll
index d39131ad56ae..e00dfdb5d2fc 100644
--- a/llvm/test/CodeGen/BPF/reloc.ll
+++ b/llvm/test/CodeGen/BPF/reloc.ll
@@ -32,7 +32,7 @@ define i32 @bpf_prog1(%struct.bpf_context* nocapture %ctx) #0 section "events/ne
; <label>:13 ; preds = %10, %0
ret i32 0
-; CHECK-RELOC: file format ELF64-BPF
+; CHECK-RELOC: file format elf64-bpf
; CHECK-RELOC: RELOCATION RECORDS FOR [.eh_frame]:
; CHECK-RELOC: R_BPF_64_64 events/net/netif_receive_skb
}
diff --git a/llvm/test/Object/AMDGPU/objdump.s b/llvm/test/Object/AMDGPU/objdump.s
index 3c3f4a11df41..1fd51d0c1abb 100644
--- a/llvm/test/Object/AMDGPU/objdump.s
+++ b/llvm/test/Object/AMDGPU/objdump.s
@@ -45,7 +45,7 @@ BB5:
v_lshlrev_b32_e32 v7, 2, v7
s_endpgm
-// CHECK: file format ELF64-amdgpu
+// CHECK: file format elf64-amdgpu
// CHECK: Disassembly of section .text:
// CHECK: hello_world:
// CHECK: s_mov_b32 m0, 0x10000 // 000000000100: BEFC00FF 00010000
diff --git a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
index e7ee2084b56d..eca416a55c7a 100644
--- a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
+++ b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test
@@ -1,7 +1,7 @@
# RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-i386 \
# RUN: | FileCheck %s -check-prefix COFF-i386
-# COFF-i386: file format COFF-i386
+# COFF-i386: file format coff-i386
# COFF-i386: Disassembly of section .text:
# COFF-i386: 0: 83 ec 0c subl $12, %esp
# COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
@@ -18,7 +18,7 @@
# RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \
# RUN: | FileCheck %s -check-prefix COFF-x86-64
-# COFF-x86-64: file format COFF-x86-64
+# COFF-x86-64: file format coff-x86-64
# COFF-x86-64: Disassembly of section .text:
# COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp
# COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp)
@@ -35,7 +35,7 @@
# RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-i386 \
# RUN: | FileCheck %s -check-prefix MACHO-i386
-# MACHO-i386: file format Mach-O 32-bit i386
+# MACHO-i386: file format mach-o 32-bit i386
# MACHO-i386: Disassembly of section __TEXT,__text:
# MACHO-i386: _main:
# MACHO-i386: 0: 83 ec 0c subl $12, %esp
@@ -53,7 +53,7 @@
# RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-x86-64 \
# RUN: | FileCheck %s -check-prefix MACHO-x86-64
-# MACHO-x86-64: file format Mach-O 64-bit x86-64
+# MACHO-x86-64: file format mach-o 64-bit x86-64
# MACHO-x86-64: Disassembly of section __TEXT,__text:
# MACHO-x86-64: _main:
# MACHO-x86-64: 0: 48 83 ec 08 subq $8, %rsp
@@ -72,7 +72,7 @@
# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
# RUN: llvm-objdump -d -r %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
-# ELF-i386: file format ELF32-i386
+# ELF-i386: file format elf32-i386
# ELF-i386: Disassembly of section .text:
# ELF-i386: main:
# ELF-i386: 0: 83 ec 0c subl $12, %esp
@@ -170,7 +170,7 @@ Symbols:
- Name: puts
Binding: STB_GLOBAL
-# ELF-x86-64: file format ELF64-x86-64
+# ELF-x86-64: file format elf64-x86-64
# ELF-x86-64: Disassembly of section .text:
# ELF-x86-64: main:
# ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
diff --git a/llvm/test/Object/X86/objdump-label.test b/llvm/test/Object/X86/objdump-label.test
index f8b933451e52..4354168a9f4f 100644
--- a/llvm/test/Object/X86/objdump-label.test
+++ b/llvm/test/Object/X86/objdump-label.test
@@ -1,7 +1,7 @@
RUN: llvm-objdump -d %p/../Inputs/trivial-label-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-x86-64
-ELF-x86-64: file format ELF64-x86-64
+ELF-x86-64: file format elf64-x86-64
ELF-x86-64: Disassembly of section .text:
ELF-x86-64: foo:
ELF-x86-64: 0: 90 nop
diff --git a/llvm/test/Object/X86/objdump-trivial-object.test b/llvm/test/Object/X86/objdump-trivial-object.test
index b70b6a2de516..fda7251f5288 100644
--- a/llvm/test/Object/X86/objdump-trivial-object.test
+++ b/llvm/test/Object/X86/objdump-trivial-object.test
@@ -1,7 +1,7 @@
# RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \
# RUN: | FileCheck %s -check-prefix COFF-i386
-# COFF-i386: file format COFF-i386
+# COFF-i386: file format coff-i386
# COFF-i386: Disassembly of section .text:
# COFF-i386: 0: 83 ec 0c subl $12, %esp
# COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
@@ -15,7 +15,7 @@
# RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \
# RUN: | FileCheck %s -check-prefix COFF-x86-64
-# COFF-x86-64: file format COFF-x86-64
+# COFF-x86-64: file format coff-x86-64
# COFF-x86-64: Disassembly of section .text:
# COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp
# COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp)
@@ -29,7 +29,7 @@
# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
# RUN: llvm-objdump -d %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
-# ELF-i386: file format ELF32-i386
+# ELF-i386: file format elf32-i386
# ELF-i386: Disassembly of section .text:
# ELF-i386: 0: 83 ec 0c subl $12, %esp
# ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
@@ -55,7 +55,7 @@ Sections:
# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
# RUN: llvm-objdump -d %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64
-# ELF-x86-64: file format ELF64-x86-64
+# ELF-x86-64: file format elf64-x86-64
# ELF-x86-64: Disassembly of section .text:
# ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
# ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
diff --git a/llvm/test/Object/dynamic-reloc.test b/llvm/test/Object/dynamic-reloc.test
index 6a9a5cee44d5..1b73295e6229 100644
--- a/llvm/test/Object/dynamic-reloc.test
+++ b/llvm/test/Object/dynamic-reloc.test
@@ -8,5 +8,5 @@ READOBJ-NEXT: ]
RUN: llvm-objdump -r %p/Inputs/dynamic-reloc.so | FileCheck --check-prefix=OBJDUMP %s
-OBJDUMP: file format ELF64-x86-64
+OBJDUMP: file format elf64-x86-64
OBJDUMP-NOT: RELOCATION
diff --git a/llvm/test/Object/objdump-symbol-table.test b/llvm/test/Object/objdump-symbol-table.test
index bfd46cd63fbe..31aed81d6840 100644
--- a/llvm/test/Object/objdump-symbol-table.test
+++ b/llvm/test/Object/objdump-symbol-table.test
@@ -68,7 +68,7 @@ Symbols:
# RUN: llvm-objdump -t %p/Inputs/trivial-object-test.macho-i386 \
# RUN: | FileCheck %s -check-prefix macho-i386
-# macho-i386: trivial-object-test.macho-i386: file format Mach-O 32-bit i386
+# macho-i386: trivial-object-test.macho-i386: file format mach-o 32-bit i386
# macho-i386: SYMBOL TABLE:
# macho-i386: 00000000 g F __TEXT,__text _main
# macho-i386: 00000000 *UND* _SomeOtherFunction
diff --git a/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s b/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s
index 655d5adc9c97..080d0780d2f4 100644
--- a/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s
+++ b/llvm/test/tools/llvm-objdump/X86/disassemble-section-name.s
@@ -1,7 +1,7 @@
# RUN: yaml2obj %p/Inputs/simple-executable-x86_64.yaml -o %t
# RUN: llvm-objdump -d %t | FileCheck %s
-# CHECK: : file format ELF64-x86-64
+# CHECK: : file format elf64-x86-64
# CHECK-EMPTY:
# CHECK-EMPTY:
# CHECK-NEXT: Disassembly of section .text:
diff --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-exec.test b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-exec.test
index eb402f405e60..734032d217fc 100644
--- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-exec.test
+++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-labels-exec.test
@@ -7,7 +7,7 @@
# RUN: --implicit-check-not=other
# Match this line so the implicit check-nots don't match the path.
-# CHECK: {{^.*}}file format ELF64-x86-64
+# CHECK: {{^.*}}file format elf64-x86-64
# CHECK: 0000000000004000 first:
# CHECK: 0000000000004001 second:
diff --git a/llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test b/llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test
index 8a472430d3bc..557650ff496a 100644
--- a/llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test
+++ b/llvm/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test
@@ -6,7 +6,7 @@
# RUN: llvm-objdump --dynamic-reloc %t | FileCheck --implicit-check-not=R_X86 %s
# RUN: llvm-objdump -R %t | FileCheck --implicit-check-not=R_X86 %s
-# CHECK: file format ELF64-x86-64
+# CHECK: file format elf64-x86-64
# CHECK: DYNAMIC RELOCATION RECORDS
# CHECK-NEXT: 0000000000000000 R_X86_64_RELATIVE *ABS*
# CHECK-NEXT: 0000000000000000 R_X86_64_JUMP_SLOT bar
diff --git a/llvm/test/tools/llvm-objdump/X86/output-ordering.test b/llvm/test/tools/llvm-objdump/X86/output-ordering.test
index 6fe1a00512ed..ac76d54ecd6f 100644
--- a/llvm/test/tools/llvm-objdump/X86/output-ordering.test
+++ b/llvm/test/tools/llvm-objdump/X86/output-ordering.test
@@ -10,7 +10,7 @@
## --reloc, so we test them independently.
## File headers (-f)
-# CHECK: file format ELF64-x86-64
+# CHECK: file format elf64-x86-64
# CHECK: architecture: x86_64
# CHECK: start address: 0x0000000000000000
## Private headers (-p)
diff --git a/llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test b/llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
index 2a96c00b3e41..b6656a69b49d 100644
--- a/llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
+++ b/llvm/test/tools/llvm-objdump/X86/warn-missing-disasm-func.test
@@ -15,7 +15,7 @@ FileHeader:
# CHECK: warning: {{.*}}: failed to disassemble missing function foo
-# MULTI: file format ELF64-x86-64
+# MULTI: file format elf64-x86-64
# MULTI: warning: {{.*}}: failed to disassemble missing function foo
-# MULTI: file format ELF64-x86-64
+# MULTI: file format elf64-x86-64
# MULTI: warning: {{.*}}: failed to disassemble missing function foo
diff --git a/llvm/test/tools/llvm-objdump/all-headers.test b/llvm/test/tools/llvm-objdump/all-headers.test
index cf25fe6cfa56..c1c1815ef083 100644
--- a/llvm/test/tools/llvm-objdump/all-headers.test
+++ b/llvm/test/tools/llvm-objdump/all-headers.test
@@ -6,7 +6,7 @@
## --section-headers --private-headers --reloc --syms (-afhprt). Test for them
## in the following order which provides GNU objdump compatability.
-# CHECK: file format ELF64-x86-64
+# CHECK: file format elf64-x86-64
# CHECK-EMPTY:
# CHECK-NEXT: architecture: x86_64
# CHECK-NEXT: start address: 0x0000000000000000
@@ -25,7 +25,7 @@
# RUN: llvm-ar rcs %t.a %t %t2
# RUN: llvm-objdump --all-headers %t.a | FileCheck %s --check-prefix=ARCHIVE
-# ARCHIVE: {{.*}}.a({{.*}}): file format ELF64-x86-64
+# ARCHIVE: {{.*}}.a({{.*}}): file format elf64-x86-64
# ARCHIVE: rw-r--r--
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
@@ -34,7 +34,7 @@
# ARCHIVE: Sections:
# ARCHIVE: SYMBOL TABLE:
# ARCHIVE: RELOCATION RECORDS FOR [.text]:
-# ARCHIVE: {{.*}}.a({{.*}}2): file format ELF64-x86-64
+# ARCHIVE: {{.*}}.a({{.*}}2): file format elf64-x86-64
# ARCHIVE: rw-r--r--
# ARCHIVE: architecture: x86_64
# ARCHIVE: start address: 0x0000000000000000
diff --git a/llvm/test/tools/llvm-objdump/archive-headers.test b/llvm/test/tools/llvm-objdump/archive-headers.test
index cd653149ad33..bb649a657a16 100644
--- a/llvm/test/tools/llvm-objdump/archive-headers.test
+++ b/llvm/test/tools/llvm-objdump/archive-headers.test
@@ -1,21 +1,21 @@
# RUN: llvm-objdump -a %p/Inputs/liblong_filenames.a | FileCheck %s
# RUN: llvm-objdump -archive-headers %p/Inputs/liblong_filenames.a | FileCheck %s
-# CHECK: {{.*}}liblong_filenames.a(1.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(1.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 1416 {{.*}} 1.o
-# CHECK: {{.*}}liblong_filenames.a(2.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(2.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 1224 {{.*}} 2.o
-# CHECK: {{.*}}liblong_filenames.a(3.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(3.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 1312 {{.*}} 3.o
-# CHECK: {{.*}}liblong_filenames.a(4.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(4.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 957 {{.*}} 4.o
-# CHECK: {{.*}}liblong_filenames.a(5.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(5.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 951 {{.*}} 5.o
-# CHECK: {{.*}}liblong_filenames.a(6.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(6.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 951 {{.*}} 6.o
-# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopqrstuvwxyz1.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopqrstuvwxyz1.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 977 {{.*}} abcdefghijklmnopqrstuvwxyz1.o
-# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopqrstuvwxyz2.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopqrstuvwxyz2.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 1272 {{.*}} abcdefghijklmnopqrstuvwxyz2.o
-# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopq.o): file format ELF64-x86-64
+# CHECK: {{.*}}liblong_filenames.a(abcdefghijklmnopq.o): file format elf64-x86-64
# CHECK: rw-r--r-- 204299/200 977 {{.*}} abcdefghijklmnopq.o
diff --git a/llvm/test/tools/llvm-objdump/file-headers-coff.test b/llvm/test/tools/llvm-objdump/file-headers-coff.test
index 26c25f95a9cf..bdfc3248e147 100644
--- a/llvm/test/tools/llvm-objdump/file-headers-coff.test
+++ b/llvm/test/tools/llvm-objdump/file-headers-coff.test
@@ -9,6 +9,6 @@ header: !Header
sections:
symbols:
-# CHECK: [[FILE]]: file format COFF-i386
+# CHECK: [[FILE]]: file format coff-i386
# CHECK: architecture: i386
# CHECK: start address: 0x00000000
diff --git a/llvm/test/tools/llvm-objdump/file-headers-elf.test b/llvm/test/tools/llvm-objdump/file-headers-elf.test
index da90468e9a28..237818bab2db 100644
--- a/llvm/test/tools/llvm-objdump/file-headers-elf.test
+++ b/llvm/test/tools/llvm-objdump/file-headers-elf.test
@@ -10,7 +10,7 @@ FileHeader:
Machine: EM_X86_64
Entry: 0x123456789abcde
-# ELF64: [[FILE]]: file format ELF64-x86-64
+# ELF64: [[FILE]]: file format elf64-x86-64
# ELF64: architecture: x86_64
# ELF64: start address: 0x00123456789abcde
@@ -18,7 +18,7 @@ FileHeader:
# RUN: llvm-objdump -f %t-i386 | FileCheck -DFILE=%t-i386 %s -check-prefix ELF32
# RUN: llvm-objdump -file-headers %t-i386 | FileCheck %s -DFILE=%t-i386 -check-prefix ELF32
-# ELF32: [[FILE]]: file format ELF32-i386
+# ELF32: [[FILE]]: file format elf32-i386
# ELF32: architecture: i386
# ELF32: start address: 0x12345678
diff --git a/llvm/test/tools/llvm-objdump/non-archive-object.test b/llvm/test/tools/llvm-objdump/non-archive-object.test
index 0064f7de9f9f..eb6a186de24a 100644
--- a/llvm/test/tools/llvm-objdump/non-archive-object.test
+++ b/llvm/test/tools/llvm-objdump/non-archive-object.test
@@ -2,7 +2,7 @@
# RUN: llvm-objdump -a %t | FileCheck %s
# If this test has not crashed, then this test passed.
-# CHECK: file format ELF64-x86-64
+# CHECK: file format elf64-x86-64
!ELF
FileHeader:
diff --git a/llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test b/llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test
index 00f716dae903..e6b4e0c9b2a8 100644
--- a/llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test
+++ b/llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test
@@ -7,7 +7,7 @@
# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-objdump -r %t3 | FileCheck %s -DFILE=%t3 --check-prefixes=FMT,REL --implicit-check-not={{.}}
-# FMT: [[FILE]]: file format ELF64-x86-64
+# FMT: [[FILE]]: file format elf64-x86-64
# REL: RELOCATION RECORDS FOR []:
# REL-NEXT: OFFSET TYPE VALUE
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index a82fbb2cab14..1b98d7844d68 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -2168,7 +2168,7 @@ static void dumpObject(ObjectFile *O, const Archive *A = nullptr,
outs() << A->getFileName() << "(" << O->getFileName() << ")";
else
outs() << O->getFileName();
- outs() << ":\tfile format " << O->getFileFormatName() << "\n\n";
+ outs() << ":\tfile format " << O->getFileFormatName().lower() << "\n\n";
}
if (StartAddress.getNumOccurrences() || StopAddress.getNumOccurrences())
More information about the llvm-commits
mailing list