diff options
author | Fangrui Song <maskray@google.com> | 2019-05-01 05:27:20 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-01 05:27:20 +0000 |
commit | e29e30b1397f3e50f3487491f8a77ae08e4e3471 (patch) | |
tree | 214ee9eb6e3ea8b5007db0c5eee8bde4ea017c3f /llvm/test/tools/llvm-objcopy | |
parent | fccb505f0f59d94b0c46f2dd28fd8893ca45899d (diff) | |
download | bcm5719-llvm-e29e30b1397f3e50f3487491f8a77ae08e4e3471.tar.gz bcm5719-llvm-e29e30b1397f3e50f3487491f8a77ae08e4e3471.zip |
[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
Diffstat (limited to 'llvm/test/tools/llvm-objcopy')
10 files changed, 20 insertions, 20 deletions
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 fd47d79739e..7afe4cddd61 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 @@ RUN: yaml2obj %p/Inputs/x86_64-exe.yaml > %t.in123.exe # 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 8a92ac61509..5e3ed9c4091 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 268b097255d..5eb64426179 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 8ed887da3b0..02f0bb97f2c 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 a72ecbfc04c..e99cc0d7ee3 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 1d6ac308d8f..969aa5973bf 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 70eb2e8af50..2abd22e5781 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 0e7d713aebc..fb4919b6c9a 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 d6c74295e26..374a8264af0 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 6fed22a9800..906fb3a6fbb 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-objcopy %t %t2 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 |