]> granicus.if.org Git - llvm/commitdiff
[llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC
authorFangrui Song <maskray@google.com>
Wed, 1 May 2019 05:55:22 +0000 (05:55 +0000)
committerFangrui Song <maskray@google.com>
Wed, 1 May 2019 05:55:22 +0000 (05:55 +0000)
The latter is much more common.

A dedicated --elf-output-style=GNU test demonstrating it is the same as
llvm-readelf is sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359652 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/MC/ELF/exclude-debug-dwo.s
test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test
test/tools/llvm-objcopy/ELF/keep-global-symbols.test
test/tools/llvm-readobj/broken-group.test
test/tools/llvm-readobj/elf-groups.test
test/tools/llvm-readobj/elf-hash-histogram.test
test/tools/llvm-readobj/gnu-file-headers.test
test/tools/llvm-readobj/gnu-phdrs.test
test/tools/llvm-readobj/gnu-relocations.test
test/tools/llvm-readobj/gnu-sections.test
test/tools/llvm-readobj/gnu-symbols.test
test/tools/llvm-readobj/many-sections.s
test/tools/llvm-readobj/mips-got.test
test/tools/llvm-readobj/mips-plt.test

index 02cdc0d3ff2d0b6480fffecc021ac5a8a12c6b98..058ae848e27ef0318a9f728a0b33aa8f931c0d23 100644 (file)
@@ -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
index b227407f414707f52e44513781611786446b3d35..8fecc7a146aa36436bb72ee060f2a5841eddad34 100644 (file)
@@ -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:
index 52707fc774fd76789f5542a8a2d8b290d47154c4..cb4d9110578b046c892b0e927987decefd8cf6d5 100644 (file)
 # 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:
index 3742fe237b61a184d32a2cc1e6b2e6efec557bbf..23bd76a821ef9743fb2dfcad509d683d78dfe173 100644 (file)
@@ -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]
index 9d13900a214b71f2d7426d5370a5f2e174c46093..a698eb7337e133e301cff30b201d3eb490cba364 100644 (file)
@@ -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 {
index e500c4fa8cd4a87da0e90208cabf799b5e4cc509..13aa5137301b126b268864dea6914b31b8f39657 100644 (file)
@@ -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)
index e246a3d717bc0f590e7b39bd9730377d81b8666f..c6060ca1beb7758bae56cc89cefa5d504c203c96 100644 (file)
@@ -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:
index 6db6d546d6830e972537da3109d3cc6dd03b7fd9..cf6ba17259abc69fe605d786eb3eb7760e2ba7b1 100644 (file)
@@ -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
index 5b269e06377f8b064be0020137823643055aea58..1bba0ffad3f85965ca3c5ddb843844bda984e797 100644 (file)
@@ -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:
index a61f767fe14fac6ad335b59abd0910eee4922aa5..faf00d9d5acfe5f5cfcc6fdd2dddd0011312cfb6 100644 (file)
@@ -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 \
index 2d864d426c57befb6178f185700ae45f06980a70..3d087ac459b2bf42a76497ef41c8ea09ef403b48 100644 (file)
@@ -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:
index bf3e7b2267572b3609b7e1114f05b9d0b5a137e9..b2050c74eec24f23af3139b7bfbaf79f26464aa8 100644 (file)
 ## 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)
 
 ## 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)
index c9311421bf522a6ac7a9fbe7729e3c4d4bb11186..021dcfb116d3c1c9ef3b6f31f4d9bd0f3efba14f 100644 (file)
@@ -11,23 +11,17 @@ RUN:   FileCheck %s -check-prefix GOT-EMPTY
 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
index 21670b0fb570d55bae8431c42c392c0db7e8152d..686182f873ac9fb5de5a38394089a6da02c7a427 100644 (file)
@@ -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 [