[llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.
In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.
While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).
llvm-svn: 359649
diff --git a/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test b/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
index fd47d79..7afe4cd 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/add-gnu-debuglink.test
@@ -4,7 +4,7 @@
# showcase padding in CONTENTS below.
RUN: llvm-objcopy --add-gnu-debuglink=%t.in123.exe %t.in123.exe %t.out.exe
-RUN: llvm-readobj -sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS
+RUN: llvm-readobj --sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS
RUN: llvm-objdump -s %t.out.exe | FileCheck %s --check-prefix=CONTENTS
# Show the last of the preexisting sections, which is used for choosing
diff --git a/llvm/test/tools/llvm-objcopy/COFF/strip-all.test b/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
index 8a92ac6..5e3ed9c 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-all.test
@@ -4,7 +4,7 @@
# RUN: llvm-objcopy --strip-all %t.in.o %t.out.o
# RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
-# RUN: llvm-readobj -relocs %t.out.o | FileCheck %s --check-prefix=RELOCS
+# RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefix=RELOCS
# Test that -S, llvm-strip without arguments and --strip-all-gnu produces
# output identical to --strip-all above.
diff --git a/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test b/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
index 268b097..5eb6442 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/strip-symbol.test
@@ -1,14 +1,14 @@
RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o
-RUN: llvm-readobj -relocations %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
+RUN: llvm-readobj -r %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
RUN: llvm-objcopy -N mainfunc %t.in.o %t.out.o
-RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
+RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
RUN: llvm-objcopy --strip-symbol mainfunc %t.in.o %t.out.o
-RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
+RUN: llvm-readobj -r %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST
RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS
Explicitly listing the relocations for the input as well, to show
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default.test
index 8ed887d..02f0bb9 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-default.test
@@ -2,7 +2,7 @@
# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o
# RUN: llvm-objcopy --compress-debug-sections %t.o %t-compressed.o
-# RUN: llvm-readobj -s %t-compressed.o | FileCheck %s
+# RUN: llvm-readobj -S %t-compressed.o | FileCheck %s
# CHECK: Name: .debug_foo
# CHECK-NEXT: Type: SHT_PROGBITS
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-groups.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-groups.test
index a72ecbf..e99cc0d 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-groups.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-groups.test
@@ -7,22 +7,22 @@
## Check compression of debug sections.
# RUN: llvm-objcopy --compress-debug-sections %t.o %t-compressed.o
-# RUN: llvm-readobj -s -elf-section-groups %t-compressed.o | \
+# RUN: llvm-readobj -S --elf-section-groups %t-compressed.o | \
# RUN: FileCheck %s --check-prefixes=CHECK,COMPRESS
## Check zlib-gnu compression of debug sections.
# RUN: llvm-objcopy --compress-debug-sections=zlib-gnu %t.o %t-compressed-gnu.o
-# RUN: llvm-readobj -s -elf-section-groups %t-compressed-gnu.o | \
+# RUN: llvm-readobj -S --elf-section-groups %t-compressed-gnu.o | \
# RUN: FileCheck %s --check-prefixes=CHECK,COMPRESSZLIB
## Check decompression of debug sections.
# RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o
-# RUN: llvm-readobj -elf-section-groups %t-decompressed.o | \
+# RUN: llvm-readobj --elf-section-groups %t-decompressed.o | \
# RUN: FileCheck %s --check-prefixes=CHECK,DECOMPRESS
## Check decompression of zlib-gnu debug sections.
# RUN: llvm-objcopy --decompress-debug-sections %t-compressed-gnu.o %t-decompressed-gnu.o
-# RUN: llvm-readobj -elf-section-groups %t-decompressed-gnu.o | \
+# RUN: llvm-readobj --elf-section-groups %t-decompressed-gnu.o | \
# RUN: FileCheck %s --check-prefixes=CHECK,DECOMPRESS
# COMPRESSZLIB: Name: .zdebug_in_group
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-symbols.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-symbols.test
index 1d6ac30..969aa59 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-symbols.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-symbols.test
@@ -6,10 +6,10 @@
## and it is placed into the right section.
# RUN: llvm-objcopy --compress-debug-sections %t.o %t-compressed1.o
-# RUN: llvm-readobj -symbols %t-compressed1.o | FileCheck %s --check-prefixes=CHECK,ZLIB
+# RUN: llvm-readobj --symbols %t-compressed1.o | FileCheck %s --check-prefixes=CHECK,ZLIB
# RUN: llvm-objcopy --compress-debug-sections=zlib-gnu %t.o %t-compressed2.o
-# RUN: llvm-readobj -symbols %t-compressed2.o | FileCheck %s --check-prefixes=CHECK,ZLIBGNU
+# RUN: llvm-readobj --symbols %t-compressed2.o | FileCheck %s --check-prefixes=CHECK,ZLIBGNU
# CHECK: Name: .Linfo_string0
# CHECK-NEXT: Value: 0x0
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
index 70eb2e8..2abd22e 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
@@ -6,9 +6,9 @@
# RUN: llvm-objdump -s %t.o --section=.debug_foo | FileCheck %s
# RUN: llvm-objdump -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-COMPRESSED
-# RUN: llvm-readobj --relocations -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
-# RUN: llvm-readobj --relocations -s %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
-# RUN: llvm-readobj --relocations -s %t.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-readobj --relocations -S %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
+# RUN: llvm-readobj --relocations -S %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-readobj --relocations -S %t.o | FileCheck %s --check-prefix=CHECK-HEADER
# RUN: llvm-objdump -s %t-decompressed.o --section=.debug_foo | FileCheck %s
# CHECK: .debug_foo:
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test
index 0e7d713..fb4919b 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test
@@ -2,7 +2,7 @@
# RUN: yaml2obj %s -o %t1.o
# RUN: llvm-objcopy --compress-debug-sections %t1.o %t2.o
-# RUN: llvm-readobj -s %t2.o | FileCheck %s
+# RUN: llvm-readobj -S %t2.o | FileCheck %s
# Non-.zdebug* sections whose data does start with "ZLIB" should
# not be considered as zlib-gnu compressed sections.
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test
index d6c7429..374a826 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test
@@ -6,9 +6,9 @@
# RUN: llvm-objdump -s %t.o --section=.debug_foo | FileCheck %s
# RUN: llvm-objdump -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-COMPRESSED
-# RUN: llvm-readobj --relocations -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
-# RUN: llvm-readobj --relocations -s %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
-# RUN: llvm-readobj --relocations -s %t.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-readobj --relocations -S %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
+# RUN: llvm-readobj --relocations -S %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-readobj --relocations -S %t.o | FileCheck %s --check-prefix=CHECK-HEADER
# RUN: llvm-objdump -s %t-decompressed.o --section=.debug_foo | FileCheck %s
# CHECK: .debug_foo:
diff --git a/llvm/test/tools/llvm-objcopy/ELF/many-sections.test b/llvm/test/tools/llvm-objcopy/ELF/many-sections.test
index 6fed22a..906fb3a 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/many-sections.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/many-sections.test
@@ -3,7 +3,7 @@
RUN: llvm-readobj --file-headers %t2 | FileCheck --check-prefix=EHDR %s
RUN: llvm-readobj --sections %t2 | FileCheck --check-prefix=SECS %s
RUN: llvm-readobj --symbols %t2 | grep "Symbol {" | wc -l | FileCheck --check-prefix=SYMS %s
-RUN: llvm-readobj -symbols %t2 | FileCheck %s --check-prefix=SYM_SEC_IDS
+RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=SYM_SEC_IDS
EHDR: Format: ELF64-x86-64
EHDR-NEXT: Arch: x86_64