[llvm] r359652 - [llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 22:55:22 PDT 2019
Author: maskray
Date: Tue Apr 30 22:55:22 2019
New Revision: 359652
URL: http://llvm.org/viewvc/llvm-project?rev=359652&view=rev
Log:
[llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC
The latter is much more common.
A dedicated --elf-output-style=GNU test demonstrating it is the same as
llvm-readelf is sufficient.
Modified:
llvm/trunk/test/MC/ELF/exclude-debug-dwo.s
llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
llvm/trunk/test/tools/llvm-readobj/broken-group.test
llvm/trunk/test/tools/llvm-readobj/elf-groups.test
llvm/trunk/test/tools/llvm-readobj/elf-hash-histogram.test
llvm/trunk/test/tools/llvm-readobj/gnu-file-headers.test
llvm/trunk/test/tools/llvm-readobj/gnu-phdrs.test
llvm/trunk/test/tools/llvm-readobj/gnu-relocations.test
llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
llvm/trunk/test/tools/llvm-readobj/gnu-symbols.test
llvm/trunk/test/tools/llvm-readobj/many-sections.s
llvm/trunk/test/tools/llvm-readobj/mips-got.test
llvm/trunk/test/tools/llvm-readobj/mips-plt.test
Modified: llvm/trunk/test/MC/ELF/exclude-debug-dwo.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/exclude-debug-dwo.s?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/exclude-debug-dwo.s (original)
+++ llvm/trunk/test/MC/ELF/exclude-debug-dwo.s Tue Apr 30 22:55:22 2019
@@ -1,5 +1,5 @@
# RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o %t.o
-# RUN: llvm-readobj -S --elf-output-style=GNU %t.o | FileCheck %s
+# RUN: llvm-readelf -S %t.o | FileCheck %s
## Check we add SHF_EXCLUDE flag for .dwo debug sections.
# CHECK: .debug_info.dwo {{.*}} E
Modified: llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test Tue Apr 30 22:55:22 2019
@@ -11,7 +11,7 @@
# RUN: --globalize-symbol Global1 \
# RUN: --keep-global-symbol Global2 \
# RUN: %t.o %t.2.o
-# RUN: llvm-readobj --elf-output-style=GNU --symbols %t.2.o | FileCheck %s
+# RUN: llvm-readelf --symbols %t.2.o | FileCheck %s
!ELF
FileHeader:
Modified: llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols.test (original)
+++ llvm/trunk/test/tools/llvm-objcopy/ELF/keep-global-symbols.test Tue Apr 30 22:55:22 2019
@@ -40,10 +40,10 @@
# RUN: -G Weak1 \
# RUN: --globalize-symbol Weak2 \
# RUN: %t.o %t.2.o
-# RUN: llvm-readobj --elf-output-style=GNU --symbols %t.2.o | FileCheck %s
+# RUN: llvm-readelf --symbols %t.2.o | FileCheck %s
# RUN: llvm-objcopy --regex --keep-global-symbols %t-globals-regexp.txt %t.o %t.3.o
-# RUN: llvm-readobj --elf-output-style=GNU --symbols %t.3.o | FileCheck %s --check-prefix=REGEXP
+# RUN: llvm-readelf --symbols %t.3.o | FileCheck %s --check-prefix=REGEXP
!ELF
FileHeader:
Modified: llvm/trunk/test/tools/llvm-readobj/broken-group.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/broken-group.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/broken-group.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/broken-group.test Tue Apr 30 22:55:22 2019
@@ -1,6 +1,6 @@
# RUN: yaml2obj %s -o %t.o
-# RUN: llvm-readobj --elf-section-groups --elf-output-style=GNU \
+# RUN: llvm-readelf --elf-section-groups \
# RUN: %t.o >%tout.log 2>%terr.log
# RUN: FileCheck %s -check-prefix=GNU-STDERR < %terr.log
# GNU-STDERR: Error: section [ 3] in group section [ 4] already in group section [ 2]
Modified: llvm/trunk/test/tools/llvm-readobj/elf-groups.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-groups.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-groups.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-groups.test Tue Apr 30 22:55:22 2019
@@ -15,7 +15,7 @@
RUN: llvm-readobj -g %p/Inputs/elf-groups.x86_64 \
RUN: | FileCheck %s
-RUN: llvm-readobj -g --elf-output-style=GNU %p/Inputs/elf-groups.x86_64 \
+RUN: llvm-readelf -g %p/Inputs/elf-groups.x86_64 \
RUN: | FileCheck --check-prefix="GNU" %s
CHECK: Groups {
CHECK-NEXT: Group {
Modified: llvm/trunk/test/tools/llvm-readobj/elf-hash-histogram.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-hash-histogram.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-hash-histogram.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-hash-histogram.test Tue Apr 30 22:55:22 2019
@@ -1,8 +1,8 @@
-RUN: llvm-readobj --elf-hash-histogram %p/Inputs/gnuhash.so.elf-ppc64 \
-RUN: --elf-output-style=GNU | FileCheck %s -check-prefix PPC64GNU
-RUN: llvm-readobj --elf-hash-histogram %p/Inputs/gnuhash.so.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf --elf-hash-histogram %p/Inputs/gnuhash.so.elf-ppc64 \
+RUN: | FileCheck %s -check-prefix PPC64GNU
+RUN: llvm-readelf --elf-hash-histogram %p/Inputs/gnuhash.so.elf-x86_64 \
RUN: | FileCheck %s -check-prefix X86GNU
-RUN: llvm-readobj --elf-hash-histogram %p/Inputs/got-plt.exe.elf-mipsel --elf-output-style=GNU \
+RUN: llvm-readelf --elf-hash-histogram %p/Inputs/got-plt.exe.elf-mipsel \
RUN: | FileCheck %s -check-prefix SYSV
PPC64GNU: Histogram for `.gnu.hash' bucket list length (total of 3 buckets)
Modified: llvm/trunk/test/tools/llvm-readobj/gnu-file-headers.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-file-headers.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-file-headers.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/gnu-file-headers.test Tue Apr 30 22:55:22 2019
@@ -1,8 +1,8 @@
-RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-i386 --elf-output-style=GNU \
+RUN: llvm-readelf -h %p/Inputs/trivial.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF32
-RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-x86-64 --elf-output-style=GNU \
+RUN: llvm-readelf -h %p/Inputs/trivial.obj.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF64
-RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-mipsel --elf-output-style=GNU \
+RUN: llvm-readelf -h %p/Inputs/trivial.obj.elf-mipsel \
RUN: | FileCheck %s -check-prefix MIPSEL
ELF32: ELF Header:
Modified: llvm/trunk/test/tools/llvm-readobj/gnu-phdrs.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-phdrs.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-phdrs.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/gnu-phdrs.test Tue Apr 30 22:55:22 2019
@@ -10,9 +10,9 @@
# compiled as clang++ source.cpp
# and clang++ -m32 source.cpp
-RUN: llvm-readobj -l %p/Inputs/phdrs-elf.exe-i386 --elf-output-style=GNU \
+RUN: llvm-readelf -l %p/Inputs/phdrs-elf.exe-i386 \
RUN: | FileCheck %s -check-prefix ELF32
-RUN: llvm-readobj -l %p/Inputs/phdrs-elf.exe-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf -l %p/Inputs/phdrs-elf.exe-x86_64 \
RUN: | FileCheck %s -check-prefixes ELF64-PHDRS,ELF64-MAPPING
RUN: llvm-readelf -program-headers %p/Inputs/phdrs-elf.exe-x86_64 \
RUN: | FileCheck %s -check-prefixes ELF64-PHDRS,ELF64-MAPPING
Modified: llvm/trunk/test/tools/llvm-readobj/gnu-relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-relocations.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-relocations.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/gnu-relocations.test Tue Apr 30 22:55:22 2019
@@ -1,6 +1,6 @@
-RUN: llvm-readobj -r %p/Inputs/relocs.obj.elf-i386 --elf-output-style=GNU \
+RUN: llvm-readelf -r %p/Inputs/relocs.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF32
-RUN: llvm-readobj -r %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf -r %p/Inputs/relocs.obj.elf-x86_64 \
RUN: | FileCheck %s -check-prefix ELF64
ELF32: Relocation section '.rel.text' at offset 0x318 contains 41 entries:
Modified: llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-sections.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-sections.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/gnu-sections.test Tue Apr 30 22:55:22 2019
@@ -1,6 +1,6 @@
-RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-i386 --elf-output-style=GNU \
+RUN: llvm-readelf -S %p/Inputs/relocs.obj.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF32
-RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf -S %p/Inputs/relocs.obj.elf-x86_64 \
RUN: | FileCheck %s -check-prefix ELF64
RUN: llvm-readobj --wide --sections \
RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
Modified: llvm/trunk/test/tools/llvm-readobj/gnu-symbols.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-symbols.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-symbols.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/gnu-symbols.test Tue Apr 30 22:55:22 2019
@@ -1,12 +1,12 @@
-RUN: llvm-readobj --symbols %p/Inputs/symbols-proc-specific.elf-hexagon \
-RUN: --elf-output-style=GNU | FileCheck %s --check-prefix ELF32
-RUN: llvm-readobj --symbols %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf --symbols %p/Inputs/symbols-proc-specific.elf-hexagon \
+RUN: | FileCheck %s --check-prefix ELF32
+RUN: llvm-readelf --symbols %p/Inputs/relocs.obj.elf-x86_64 \
RUN: | FileCheck %s --check-prefix ELF64
-RUN: llvm-readobj --symbols %p/Inputs/gnuhash.so.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf --symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN: | FileCheck %s --check-prefixes=SYMTAB,DYN
-RUN: llvm-readobj --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN: | FileCheck %s --check-prefixes=NO-SYMTAB,DYN
-RUN: llvm-readobj --symbols --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 --elf-output-style=GNU \
+RUN: llvm-readelf --symbols --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN: | FileCheck %s --check-prefixes=SYMTAB,DYN
ELF32: Symbol table '.symtab' contains 5 entries:
Modified: llvm/trunk/test/tools/llvm-readobj/many-sections.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/many-sections.s?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/many-sections.s (original)
+++ llvm/trunk/test/tools/llvm-readobj/many-sections.s Tue Apr 30 22:55:22 2019
@@ -11,14 +11,14 @@
## space, but its e_shnum, e_shstrndx, sh_size and sh_link fields are set
## according to the above description, so that we can test the dumper.
-# RUN: llvm-readobj --file-headers -S --elf-output-style GNU \
-# RUN: %p/Inputs/many-sections.elf-x86_64 | FileCheck %s --check-prefix=GNU1
+# RUN: llvm-readelf --file-headers -S %p/Inputs/many-sections.elf-x86_64 | \
+# RUN: FileCheck %s --check-prefix=GNU1
# GNU1: Number of section headers: 0 (5)
# GNU1: Section header string table index: 65535 (3)
# GNU1: There are 5 section headers, starting at offset 0xb8
-# RUN: llvm-readobj --file-headers --elf-output-style LLVM \
-# RUN: %p/Inputs/many-sections.elf-x86_64 | FileCheck %s --check-prefix=LLVM1
+# RUN: llvm-readobj --file-headers %p/Inputs/many-sections.elf-x86_64 | \
+# RUN: FileCheck %s --check-prefix=LLVM1
# LLVM1: SectionHeaderCount: 0 (5)
# LLVM1: StringTableSectionIndex: 65535 (3)
@@ -26,12 +26,12 @@
## e_shoff field set to zero, but not e_shstrndx, to show that
## this corrupt case is handled correctly.
-# RUN: llvm-readobj --file-headers --elf-output-style GNU \
-# RUN: %p/Inputs/many-sections-stripped.elf-x86_64 | FileCheck %s --check-prefix=GNU2
+# RUN: llvm-readelf --file-headers %p/Inputs/many-sections-stripped.elf-x86_64 | \
+# RUN: FileCheck %s --check-prefix=GNU2
# GNU2: Number of section headers: 0
# GNU2: Section header string table index: 65535 (corrupt: out of range)
-# RUN: llvm-readobj --file-headers --elf-output-style LLVM \
-# RUN: %p/Inputs/many-sections-stripped.elf-x86_64 | FileCheck %s --check-prefix=LLVM2
+# RUN: llvm-readobj --file-headers %p/Inputs/many-sections-stripped.elf-x86_64 | \
+# RUN: FileCheck %s --check-prefix=LLVM2
# LLVM2: SectionHeaderCount: 0
# LLVM2: StringTableSectionIndex: 65535 (corrupt: out of range)
Modified: llvm/trunk/test/tools/llvm-readobj/mips-got.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-got.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-got.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-got.test Tue Apr 30 22:55:22 2019
@@ -11,23 +11,17 @@ RUN: FileCheck %s -check-prefix GOT-EM
RUN: llvm-readobj --mips-plt-got %p/Inputs/got-static.exe.mips | \
RUN: FileCheck %s -check-prefix GOT-STATIC
-RUN: not llvm-readobj --mips-plt-got %p/Inputs/relocs.obj.elf-mips \
-RUN: --elf-output-style=GNU 2>&1 | \
+RUN: not llvm-readelf --mips-plt-got %p/Inputs/relocs.obj.elf-mips 2>&1 | \
RUN: FileCheck %s -check-prefix GNU-GOT-OBJ
-RUN: llvm-readobj --mips-plt-got %p/Inputs/dynamic-table-exe.mips \
-RUN: --elf-output-style=GNU | \
+RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-exe.mips | \
RUN: FileCheck %s -check-prefix GNU-GOT-EXE
-RUN: llvm-readobj --mips-plt-got %p/Inputs/dynamic-table-so.mips \
-RUN: --elf-output-style=GNU | \
+RUN: llvm-readelf --mips-plt-got %p/Inputs/dynamic-table-so.mips | \
RUN: FileCheck %s -check-prefix GNU-GOT-SO
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-tls.so.elf-mips64el \
-RUN: --elf-output-style=GNU | \
+RUN: llvm-readelf --mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \
RUN: FileCheck %s -check-prefix GNU-GOT-TLS
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-empty.exe.mipsel \
-RUN: --elf-output-style=GNU | \
+RUN: llvm-readelf --mips-plt-got %p/Inputs/got-empty.exe.mipsel | \
RUN: FileCheck %s -check-prefix GNU-GOT-EMPTY
-RUN: llvm-readobj --mips-plt-got %p/Inputs/got-static.exe.mips \
-RUN: --elf-output-style=GNU | \
+RUN: llvm-readelf --mips-plt-got %p/Inputs/got-static.exe.mips | \
RUN: FileCheck %s -check-prefix GNU-GOT-STATIC
GOT-OBJ: error: Cannot find .got section
Modified: llvm/trunk/test/tools/llvm-readobj/mips-plt.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/mips-plt.test?rev=359652&r1=359651&r2=359652&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/mips-plt.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/mips-plt.test Tue Apr 30 22:55:22 2019
@@ -1,7 +1,5 @@
RUN: llvm-readobj --mips-plt-got %p/Inputs/got-plt.exe.elf-mipsel | FileCheck %s
-RUN: llvm-readobj --mips-plt-got --elf-output-style=GNU \
-RUN: %p/Inputs/got-plt.exe.elf-mipsel \
-RUN: | FileCheck --check-prefix=GNU %s
+RUN: llvm-readelf --mips-plt-got %p/Inputs/got-plt.exe.elf-mipsel FileCheck --check-prefix=GNU %s
CHECK: PLT GOT {
CHECK-NEXT: Reserved entries [
More information about the llvm-commits
mailing list