Index: test/tools/llvm-objcopy/ELF/abs-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/abs-symbol.test +++ test/tools/llvm-objcopy/ELF/abs-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test =================================================================== --- test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test +++ test/tools/llvm-objcopy/ELF/add-gnu-debuglink.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t # RUN: printf 0000 > %t.blob -# RUN: llvm-objcopy -add-gnu-debuglink=%t.blob %t %t2 -# RUN: llvm-readobj -sections -section-data %t2 | FileCheck %s +# RUN: llvm-objcopy --add-gnu-debuglink=%t.blob %t %t2 +# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/add-section-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/add-section-remove.test +++ test/tools/llvm-objcopy/ELF/add-section-remove.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t # RUN: echo 0000 > %t.sec -# RUN: llvm-objcopy -R .test2 -add-section=.test2=%t.sec %t %t2 -# RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s +# RUN: llvm-objcopy -R .test2 --add-section=.test2=%t.sec %t %t2 +# RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/add-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/add-section.test +++ test/tools/llvm-objcopy/ELF/add-section.test @@ -1,8 +1,8 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -O binary -j .test2 %t %t.sec # RUN: llvm-objcopy -R .test2 %t %t2 -# RUN: llvm-objcopy -add-section=.test2=%t.sec %t2 %t3 -# RUN: llvm-readobj -file-headers -sections -section-data %t3 | FileCheck %s +# RUN: llvm-objcopy --add-section=.test2=%t.sec %t2 %t3 +# RUN: llvm-readobj --file-headers --sections --section-data %t3 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/armexidx-link.test =================================================================== --- test/tools/llvm-objcopy/ELF/armexidx-link.test +++ test/tools/llvm-objcopy/ELF/armexidx-link.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -remove-section=.text.bar %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck %s +# RUN: llvm-objcopy --remove-section=.text.bar %t %t2 +# RUN: llvm-readobj --sections %t2 | FileCheck %s # CHECK: Index: 2 # CHECK-NEXT: Name: .ARM.exidx.text.foo (1) Index: test/tools/llvm-objcopy/ELF/auto-remove-shndx.test =================================================================== --- test/tools/llvm-objcopy/ELF/auto-remove-shndx.test +++ test/tools/llvm-objcopy/ELF/auto-remove-shndx.test @@ -1,5 +1,5 @@ # RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t # RUN: llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6 %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck --check-prefix=SECS %s +# RUN: llvm-readobj --sections %t2 | FileCheck --check-prefix=SECS %s # SECS-NOT: Name: .symtab_shndx Index: test/tools/llvm-objcopy/ELF/basic-archive-copy.test =================================================================== --- test/tools/llvm-objcopy/ELF/basic-archive-copy.test +++ test/tools/llvm-objcopy/ELF/basic-archive-copy.test @@ -8,9 +8,9 @@ # RUN: llvm-ar p %t2.a > %t3 # RUN: cmp %t2 %t3 -# RUN: llvm-readobj -sections %t2 | FileCheck %s -# RUN: llvm-nm -print-armap %t.a | FileCheck --check-prefix=INDEX-TABLE %s -# RUN: llvm-nm -print-armap %t2.a | FileCheck --check-prefix=INDEX-TABLE %s +# RUN: llvm-readobj --sections %t2 | FileCheck %s +# RUN: llvm-nm --print-armap %t.a | FileCheck --check-prefix=INDEX-TABLE %s +# RUN: llvm-nm --print-armap %t2.a | FileCheck --check-prefix=INDEX-TABLE %s # Verify that llvm-objcopy has not modifed the input. # RUN: cmp %t.copy.a %t.a @@ -22,8 +22,8 @@ # RUN: llvm-objcopy %t.no.index.a %t2.no.index.a # RUN: llvm-ar p %t2.no.index.a > %t4 -# RUN: llvm-nm -print-armap %t.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s -# RUN: llvm-nm -print-armap %t2.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s +# RUN: llvm-nm --print-armap %t.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s +# RUN: llvm-nm --print-armap %t2.no.index.a | FileCheck --check-prefix=NO-INDEX-TABLE %s # RUN: cmp %t2 %t4 # NO-INDEX-TABLE-NOT: Archive map Index: test/tools/llvm-objcopy/ELF/basic-copy.test =================================================================== --- test/tools/llvm-objcopy/ELF/basic-copy.test +++ test/tools/llvm-objcopy/ELF/basic-copy.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck %s +# RUN: llvm-readobj --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/basic-keep.test =================================================================== --- test/tools/llvm-objcopy/ELF/basic-keep.test +++ test/tools/llvm-objcopy/ELF/basic-keep.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -strip-non-alloc -keep-section=.test %t %t2 -# RUN: llvm-strip --strip-all -keep-section=.test %t -o %t3 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy --strip-non-alloc --keep-section=.test %t %t2 +# RUN: llvm-strip --strip-all --keep-section=.test %t -o %t3 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # RUN: cmp %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/basic-only-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/basic-only-section.test +++ test/tools/llvm-objcopy/ELF/basic-only-section.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -only-section=.test %t %t2 +# RUN: llvm-objcopy --only-section=.test %t %t2 # RUN: llvm-objcopy -j .test %t %t3 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # RUN: diff %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/basic-relocations.test =================================================================== --- test/tools/llvm-objcopy/ELF/basic-relocations.test +++ test/tools/llvm-objcopy/ELF/basic-relocations.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -relocations %t2 | FileCheck %s +# RUN: llvm-readobj --relocations %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/binary-input-arch.test =================================================================== --- test/tools/llvm-objcopy/ELF/binary-input-arch.test +++ test/tools/llvm-objcopy/ELF/binary-input-arch.test @@ -1,25 +1,25 @@ # RUN: echo abcd > %t.txt # RUN: llvm-objcopy -I binary -B aarch64 %t.txt %t.aarch64.o -# RUN: llvm-readobj -file-headers %t.aarch64.o | FileCheck %s --check-prefixes=CHECK,AARCH64,64 +# RUN: llvm-readobj --file-headers %t.aarch64.o | FileCheck %s --check-prefixes=CHECK,AARCH64,64 # RUN: llvm-objcopy -I binary -B arm %t.txt %t.arm.o -# RUN: llvm-readobj -file-headers %t.arm.o | FileCheck %s --check-prefixes=CHECK,ARM,32 +# RUN: llvm-readobj --file-headers %t.arm.o | FileCheck %s --check-prefixes=CHECK,ARM,32 # RUN: llvm-objcopy -I binary -B i386 %t.txt %t.i386.o -# RUN: llvm-readobj -file-headers %t.i386.o | FileCheck %s --check-prefixes=CHECK,I386,32 +# RUN: llvm-readobj --file-headers %t.i386.o | FileCheck %s --check-prefixes=CHECK,I386,32 # RUN: llvm-objcopy -I binary -B i386:x86-64 %t.txt %t.i386_x86-64.o -# RUN: llvm-readobj -file-headers %t.i386_x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64 +# RUN: llvm-readobj --file-headers %t.i386_x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64 # RUN: llvm-objcopy -I binary -B powerpc:common64 %t.txt %t.powerpc_common64.o -# RUN: llvm-readobj -file-headers %t.powerpc_common64.o | FileCheck %s --check-prefixes=CHECK,PPC,64 +# RUN: llvm-readobj --file-headers %t.powerpc_common64.o | FileCheck %s --check-prefixes=CHECK,PPC,64 # RUN: llvm-objcopy -I binary -B sparc %t.txt %t.sparc.o -# RUN: llvm-readobj -file-headers %t.sparc.o | FileCheck %s --check-prefixes=CHECK,SPARC,32 +# RUN: llvm-readobj --file-headers %t.sparc.o | FileCheck %s --check-prefixes=CHECK,SPARC,32 # RUN: llvm-objcopy -I binary -B x86-64 %t.txt %t.x86-64.o -# RUN: llvm-readobj -file-headers %t.x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64 +# RUN: llvm-readobj --file-headers %t.x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64 # CHECK: Format: # AARCH64-SAME: ELF64-aarch64-little Index: test/tools/llvm-objcopy/ELF/binary-input.test =================================================================== --- test/tools/llvm-objcopy/ELF/binary-input.test +++ test/tools/llvm-objcopy/ELF/binary-input.test @@ -2,7 +2,7 @@ # Preserve input to verify it is not modified # RUN: cp %t.x-txt %t-copy.txt # RUN: llvm-objcopy -I binary -B i386:x86-64 %t.x-txt %t.o -# RUN: llvm-readobj -sections -symbols %t.o | FileCheck %s +# RUN: llvm-readobj --sections --symbols %t.o | FileCheck %s # RUN: cmp %t.x-txt %t-copy.txt # CHECK: Sections [ Index: test/tools/llvm-objcopy/ELF/binary-remove-all-but-one.test =================================================================== --- test/tools/llvm-objcopy/ELF/binary-remove-all-but-one.test +++ test/tools/llvm-objcopy/ELF/binary-remove-all-but-one.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text -R .text3 -O binary %t %t2 # RUN: od -Ax -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/binary-remove-end.test =================================================================== --- test/tools/llvm-objcopy/ELF/binary-remove-end.test +++ test/tools/llvm-objcopy/ELF/binary-remove-end.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text3 -O binary %t %t2 # RUN: od -Ax -v -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/binary-remove-middle.test =================================================================== --- test/tools/llvm-objcopy/ELF/binary-remove-middle.test +++ test/tools/llvm-objcopy/ELF/binary-remove-middle.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text2 -O binary %t %t2 # RUN: od -Ax -v -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/check-addr-offset-align.test =================================================================== --- test/tools/llvm-objcopy/ELF/check-addr-offset-align.test +++ test/tools/llvm-objcopy/ELF/check-addr-offset-align.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/common-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/common-symbol.test +++ test/tools/llvm-objcopy/ELF/common-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test =================================================================== --- test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test +++ test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test @@ -4,12 +4,12 @@ # RUN: llvm-objcopy --compress-debug-sections=zlib-gnu %t.o %t-compressed.o # RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o -# RUN: llvm-objdump -s %t.o -section=.debug_foo | FileCheck %s +# 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-objdump -s %t-decompressed.o -section=.debug_foo | FileCheck %s +# 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: # CHECK-NEXT: 0000 00000000 00000000 Index: test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test =================================================================== --- test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test +++ test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib.test @@ -4,12 +4,12 @@ # RUN: llvm-objcopy --compress-debug-sections=zlib %t.o %t-compressed.o # RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o -# RUN: llvm-objdump -s %t.o -section=.debug_foo | FileCheck %s +# 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-objdump -s %t-decompressed.o -section=.debug_foo | FileCheck %s +# 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: # CHECK-NEXT: 0000 00000000 00000000 Index: test/tools/llvm-objcopy/ELF/compress-debug-sections.test =================================================================== --- test/tools/llvm-objcopy/ELF/compress-debug-sections.test +++ test/tools/llvm-objcopy/ELF/compress-debug-sections.test @@ -12,9 +12,9 @@ # RUN: llvm-objcopy --decompress-debug-sections %tzg.o %t3.o # Using redirects to avoid llvm-objdump from printing the filename. -# RUN: llvm-objdump -s -section=.debug_str - < %t.o > %t.txt -# RUN: llvm-objdump -s -section=.debug_str - < %t2.o > %t2.txt -# RUN: llvm-objdump -s -section=.debug_str - < %t3.o > %t3.txt +# RUN: llvm-objdump -s --section=.debug_str - < %t.o > %t.txt +# RUN: llvm-objdump -s --section=.debug_str - < %t2.o > %t2.txt +# RUN: llvm-objdump -s --section=.debug_str - < %t3.o > %t3.txt # RUN: diff %t.txt %t2.txt # RUN: diff %t.txt %t3.txt Index: test/tools/llvm-objcopy/ELF/copy-osabi.test =================================================================== --- test/tools/llvm-objcopy/ELF/copy-osabi.test +++ test/tools/llvm-objcopy/ELF/copy-osabi.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -file-headers %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers %t2 | FileCheck %s ## Check that llvm-objcopy preserves the OSABI and ABIVersion fields. # CHECK: OS/ABI: FreeBSD (0x9) Index: test/tools/llvm-objcopy/ELF/discard-all.test =================================================================== --- test/tools/llvm-objcopy/ELF/discard-all.test +++ test/tools/llvm-objcopy/ELF/discard-all.test @@ -3,7 +3,7 @@ # RUN: llvm-objcopy --discard-all %t %t2 # Verify that llvm-objcopy has not modified the input. # RUN: cmp %t %t1 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s # RUN: llvm-objcopy -x %t %t3 # Verify that llvm-objcopy has not modified the input. Index: test/tools/llvm-objcopy/ELF/drawf-fission.test =================================================================== --- test/tools/llvm-objcopy/ELF/drawf-fission.test +++ test/tools/llvm-objcopy/ELF/drawf-fission.test @@ -1,8 +1,8 @@ -# RUN: llvm-objcopy -extract-dwo %p/Inputs/dwarf.dwo %t -# RUN: llvm-objcopy -strip-dwo %p/Inputs/dwarf.dwo %t2 -# RUN: llvm-objcopy -split-dwo=%t3 %p/Inputs/dwarf.dwo %t4 -# RUN: llvm-readobj -file-headers -sections %t | FileCheck %s -check-prefix=DWARF -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s -check-prefix=STRIP +# RUN: llvm-objcopy --extract-dwo %p/Inputs/dwarf.dwo %t +# RUN: llvm-objcopy --strip-dwo %p/Inputs/dwarf.dwo %t2 +# RUN: llvm-objcopy --split-dwo=%t3 %p/Inputs/dwarf.dwo %t4 +# RUN: llvm-readobj --file-headers --sections %t | FileCheck %s --check-prefix=DWARF +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s --check-prefix=STRIP # RUN: diff %t %t3 # RUN: diff %t2 %t4 Index: test/tools/llvm-objcopy/ELF/dump-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/dump-section.test +++ test/tools/llvm-objcopy/ELF/dump-section.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -O binary -j .text %t %t2 -# RUN: llvm-objcopy -O binary -only-section .text %t %t3 +# RUN: llvm-objcopy -O binary --only-section .text %t %t3 # RUN: llvm-objcopy --dump-section .text=%t4 %t %t5 # RUN: llvm-objcopy --dump-section .foo=%t6 %t %t7 # RUN: not llvm-objcopy --dump-section .bar=%t8 %t %t9 2>&1 | FileCheck %s --check-prefix=NOBITS Index: test/tools/llvm-objcopy/ELF/dynamic-relocations.test =================================================================== --- test/tools/llvm-objcopy/ELF/dynamic-relocations.test +++ test/tools/llvm-objcopy/ELF/dynamic-relocations.test @@ -1,5 +1,5 @@ # RUN: llvm-objcopy %p/Inputs/dynrel.elf %t -# RUN: llvm-readobj -sections -section-data %t | FileCheck %s +# RUN: llvm-readobj --sections --section-data %t | FileCheck %s #CHECK: Name: .rela.plt #CHECK-NEXT: Type: SHT_RELA Index: test/tools/llvm-objcopy/ELF/dynamic.test =================================================================== --- test/tools/llvm-objcopy/ELF/dynamic.test +++ test/tools/llvm-objcopy/ELF/dynamic.test @@ -1,6 +1,6 @@ # RUN: llvm-objcopy %p/Inputs/dynamic.so %t -# RUN: llvm-readobj -dynamic-table %t | FileCheck %s -# RUN: llvm-readobj -sections %t | FileCheck -check-prefix=LINK %s +# RUN: llvm-readobj --dynamic-table %t | FileCheck %s +# RUN: llvm-readobj --sections %t | FileCheck --check-prefix=LINK %s #CHECK: DynamicSection [ #CHECK-NEXT: Tag Type Name/Value Index: test/tools/llvm-objcopy/ELF/dynstr.test =================================================================== --- test/tools/llvm-objcopy/ELF/dynstr.test +++ test/tools/llvm-objcopy/ELF/dynstr.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -sections -section-data %t2 | FileCheck %s +# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/dynsym.test =================================================================== --- test/tools/llvm-objcopy/ELF/dynsym.test +++ test/tools/llvm-objcopy/ELF/dynsym.test @@ -1,6 +1,6 @@ # RUN: llvm-objcopy %p/Inputs/dynsym.so %t -# RUN: llvm-readobj -dyn-symbols %t | FileCheck %s -# RUN: llvm-readobj -sections %t | FileCheck -check-prefix=LINK %s +# RUN: llvm-readobj --dyn-symbols %t | FileCheck %s +# RUN: llvm-readobj --sections %t | FileCheck --check-prefix=LINK %s #LINK: Name: .dynsym #LINK-NEXT: Type: SHT_DYNSYM Index: test/tools/llvm-objcopy/ELF/elf32be.test =================================================================== --- test/tools/llvm-objcopy/ELF/elf32be.test +++ test/tools/llvm-objcopy/ELF/elf32be.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/elf32le.test =================================================================== --- test/tools/llvm-objcopy/ELF/elf32le.test +++ test/tools/llvm-objcopy/ELF/elf32le.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/elf64be.test =================================================================== --- test/tools/llvm-objcopy/ELF/elf64be.test +++ test/tools/llvm-objcopy/ELF/elf64be.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/empty-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/empty-section.test +++ test/tools/llvm-objcopy/ELF/empty-section.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck %s +# RUN: llvm-readobj --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/explicit-keep-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/explicit-keep-remove.test +++ test/tools/llvm-objcopy/ELF/explicit-keep-remove.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -R=.test -keep-section=.test %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy -R=.test --keep-section=.test %t %t2 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test +++ test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -R=.test -only-section=.test %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy -R=.test --only-section=.test %t %t2 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/globalize.test =================================================================== --- test/tools/llvm-objcopy/ELF/globalize.test +++ test/tools/llvm-objcopy/ELF/globalize.test @@ -3,7 +3,7 @@ # RUN: --globalize-symbol Local \ # RUN: --globalize-symbol Weak \ # RUN: --globalize-symbol WeakUndef %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/group-big-endian.test =================================================================== --- test/tools/llvm-objcopy/ELF/group-big-endian.test +++ test/tools/llvm-objcopy/ELF/group-big-endian.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -remove-section=.text.bar %t %t2 -# RUN: llvm-readobj -elf-section-groups %t2 | FileCheck %s +# RUN: llvm-objcopy --remove-section=.text.bar %t %t2 +# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s # In this test the section .text.bar is getting removed, as a result, # the indices of the sections which go after .text.bar will change, Index: test/tools/llvm-objcopy/ELF/group-unchanged.test =================================================================== --- test/tools/llvm-objcopy/ELF/group-unchanged.test +++ test/tools/llvm-objcopy/ELF/group-unchanged.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -remove-section=.text.bar %t %t2 -# RUN: llvm-readobj -elf-section-groups %t2 | FileCheck %s +# RUN: llvm-objcopy --remove-section=.text.bar %t %t2 +# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s # In this test the section .text.bar is getting removed, since this section # goes after all the sections comprising a group, the content of the Index: test/tools/llvm-objcopy/ELF/group.test =================================================================== --- test/tools/llvm-objcopy/ELF/group.test +++ test/tools/llvm-objcopy/ELF/group.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -remove-section=.text.bar %t %t2 -# RUN: llvm-readobj -elf-section-groups %t2 | FileCheck %s +# RUN: llvm-objcopy --remove-section=.text.bar %t %t2 +# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s # In this test the section .text.bar is getting removed, as a result, # the indices of the sections which go after .text.bar will change, Index: test/tools/llvm-objcopy/ELF/help-message.test =================================================================== --- test/tools/llvm-objcopy/ELF/help-message.test +++ test/tools/llvm-objcopy/ELF/help-message.test @@ -1,15 +1,19 @@ +# RUN: llvm-objcopy -help | FileCheck --check-prefix=OBJCOPY-USAGE %s # RUN: llvm-objcopy --help | FileCheck --check-prefix=OBJCOPY-USAGE %s # RUN: not llvm-objcopy 2>&1 | FileCheck --check-prefix=OBJCOPY-USAGE %s # RUN: not llvm-objcopy -abcabc 2>&1 | FileCheck --check-prefix=UNKNOWN-ARG %s -# RUN: not llvm-objcopy -strip-debug 2>&1 | FileCheck %s --check-prefix=NO-INPUT-FILES +# RUN: not llvm-objcopy --abcabc 2>&1 | FileCheck --check-prefix=UNKNOWN-ARG %s +# RUN: not llvm-objcopy --strip-debug 2>&1 | FileCheck %s --check-prefix=NO-INPUT-FILES +# RUN: llvm-strip -help | FileCheck --check-prefix=STRIP-USAGE %s # RUN: llvm-strip --help | FileCheck --check-prefix=STRIP-USAGE %s # RUN: not llvm-strip 2>&1 | FileCheck --check-prefix=STRIP-USAGE %s # RUN: not llvm-strip -abcabc 2>&1 | FileCheck --check-prefix=UNKNOWN-ARG %s -# RUN: not llvm-strip -strip-debug 2>&1 | FileCheck %s --check-prefix=NO-INPUT-FILES +# RUN: not llvm-strip --abcabc 2>&1 | FileCheck --check-prefix=UNKNOWN-ARG %s +# RUN: not llvm-strip --strip-debug 2>&1 | FileCheck %s --check-prefix=NO-INPUT-FILES # OBJCOPY-USAGE: USAGE: llvm-objcopy # STRIP-USAGE: USAGE: llvm-strip -# UNKNOWN-ARG: unknown argument '-abcabc' +# UNKNOWN-ARG: unknown argument '{{-+}}abcabc' # NO-INPUT-FILES: No input file specified Index: test/tools/llvm-objcopy/ELF/keep-file-symbols.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-file-symbols.test +++ test/tools/llvm-objcopy/ELF/keep-file-symbols.test @@ -1,8 +1,8 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --strip-all --keep-file-symbols %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s --check-prefix=STRIPALL +# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIPALL # RUN: llvm-objcopy --keep-file-symbols --strip-symbol foo %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s --check-prefix=STRIP +# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIP !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test +++ test/tools/llvm-objcopy/ELF/keep-global-symbols-mix-globalize.test @@ -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-readobj --elf-output-style=GNU --symbols %t.2.o | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/keep-global-symbols.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-global-symbols.test +++ test/tools/llvm-objcopy/ELF/keep-global-symbols.test @@ -39,7 +39,7 @@ # 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-readobj --elf-output-style=GNU --symbols %t.2.o | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/keep-many.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-many.test +++ test/tools/llvm-objcopy/ELF/keep-many.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -strip-non-alloc -keep-section=.test -keep-section=.test3 %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy --strip-non-alloc --keep-section=.test --keep-section=.test3 %t %t2 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/keep-only-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-only-section.test +++ test/tools/llvm-objcopy/ELF/keep-only-section.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -keep-section=.test2 -only-section=.test %t %t2 -# RUN: llvm-objcopy -j .test -keep-section=.test2 %t %t3 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy --keep-section=.test2 --only-section=.test %t %t2 +# RUN: llvm-objcopy -j .test --keep-section=.test2 %t %t3 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # RUN: diff %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test +++ test/tools/llvm-objcopy/ELF/keep-symbol-remove-section.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --remove-section .text --keep-symbol foo %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/keep-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/keep-symbol.test +++ test/tools/llvm-objcopy/ELF/keep-symbol.test @@ -1,8 +1,8 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --discard-all -K foo --keep-symbol bar %t %t2 # RUN: llvm-objcopy -K foo -N foo -N bar --keep-symbol bar -N baz %t %t3 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s -# RUN: llvm-readobj -symbols %t3 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t3 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/localize-hidden.test =================================================================== --- test/tools/llvm-objcopy/ELF/localize-hidden.test +++ test/tools/llvm-objcopy/ELF/localize-hidden.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -localize-hidden %t %t2 -# RUN: llvm-readobj -relocations -symbols %t2 | FileCheck %s +# RUN: llvm-objcopy --localize-hidden %t %t2 +# RUN: llvm-readobj --relocations --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/localize.test =================================================================== --- test/tools/llvm-objcopy/ELF/localize.test +++ test/tools/llvm-objcopy/ELF/localize.test @@ -5,7 +5,7 @@ # RUN: -L Weak \ # RUN: -L GlobalCommon \ # RUN: %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/many-sections.test =================================================================== --- test/tools/llvm-objcopy/ELF/many-sections.test +++ test/tools/llvm-objcopy/ELF/many-sections.test @@ -1,8 +1,8 @@ RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t 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 --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 EHDR: Format: ELF64-x86-64 EHDR-NEXT: Arch: x86_64 Index: test/tools/llvm-objcopy/ELF/marker-segment.test =================================================================== --- test/tools/llvm-objcopy/ELF/marker-segment.test +++ test/tools/llvm-objcopy/ELF/marker-segment.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/no-symbol-relocation.test =================================================================== --- test/tools/llvm-objcopy/ELF/no-symbol-relocation.test +++ test/tools/llvm-objcopy/ELF/no-symbol-relocation.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -relocations %t2 | FileCheck %s +# RUN: llvm-readobj --relocations %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/null-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/null-symbol.test +++ test/tools/llvm-objcopy/ELF/null-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/only-section-many.test =================================================================== --- test/tools/llvm-objcopy/ELF/only-section-many.test +++ test/tools/llvm-objcopy/ELF/only-section-many.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -j .test1 -j .test2 %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test =================================================================== --- test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test +++ test/tools/llvm-objcopy/ELF/only-section-remove-strtab.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -R .symtab -R .strtab -only-section=.test %t %t2 +# RUN: llvm-objcopy -R .symtab -R .strtab --only-section=.test %t %t2 # RUN: llvm-objcopy -j .test -R .strtab -R .symtab %t %t3 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # RUN: diff %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test =================================================================== --- test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test +++ test/tools/llvm-objcopy/ELF/only-section-strip-non-alloc.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -strip-non-alloc -only-section=.test %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-objcopy --strip-non-alloc --only-section=.test %t %t2 +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/overlap-chain.test =================================================================== --- test/tools/llvm-objcopy/ELF/overlap-chain.test +++ test/tools/llvm-objcopy/ELF/overlap-chain.test @@ -5,7 +5,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/prefix-symbols.test =================================================================== --- test/tools/llvm-objcopy/ELF/prefix-symbols.test +++ test/tools/llvm-objcopy/ELF/prefix-symbols.test @@ -1,8 +1,8 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --prefix-symbols prefix %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s --check-prefix=COMMON --check-prefix=BASIC +# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=COMMON --check-prefix=BASIC # RUN: llvm-objcopy --redefine-sym bar=baz --prefix-symbols prefix %t %t3 -# RUN: llvm-readobj -symbols %t3 | FileCheck %s --check-prefix=COMMON --check-prefix=REDEF +# RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=COMMON --check-prefix=REDEF !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/program-headers.test =================================================================== --- test/tools/llvm-objcopy/ELF/program-headers.test +++ test/tools/llvm-objcopy/ELF/program-headers.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/pt-phdr.test =================================================================== --- test/tools/llvm-objcopy/ELF/pt-phdr.test +++ test/tools/llvm-objcopy/ELF/pt-phdr.test @@ -2,7 +2,7 @@ # segments. # RUN: llvm-objcopy %p/Inputs/pt-phdr.elf %t -# RUN: llvm-readobj -program-headers %t | FileCheck %s +# RUN: llvm-readobj --program-headers %t | FileCheck %s #CHECK: ProgramHeaders [ #CHECK-NEXT: ProgramHeader { Index: test/tools/llvm-objcopy/ELF/redefine-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/redefine-symbol.test +++ test/tools/llvm-objcopy/ELF/redefine-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --redefine-sym foo=oof --redefine-sym empty= %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s # RUN: not llvm-objcopy --redefine-sym barbar %t %t2 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT # RUN: not llvm-objcopy --redefine-sym foo=f1 --redefine-sym foo=f2 %t %t2 2>&1 | FileCheck %s --check-prefix=MULTIPLE-REDEFINITION Index: test/tools/llvm-objcopy/ELF/reloc-no-symtab.test =================================================================== --- test/tools/llvm-objcopy/ELF/reloc-no-symtab.test +++ test/tools/llvm-objcopy/ELF/reloc-no-symtab.test @@ -7,8 +7,8 @@ # RUN: yaml2obj %s > %t.original # RUN: llvm-strip %t.original -o %t.stripped -# RUN: llvm-readobj -sections %t.original | FileCheck %s -# RUN: llvm-readobj -sections %t.stripped | FileCheck %s +# RUN: llvm-readobj --sections %t.original | FileCheck %s +# RUN: llvm-readobj --sections %t.stripped | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/relocatable-phdr.test =================================================================== --- test/tools/llvm-objcopy/ELF/relocatable-phdr.test +++ test/tools/llvm-objcopy/ELF/relocatable-phdr.test @@ -2,7 +2,7 @@ # for offset and header size when copied with llvm-objcopy. # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -file-headers %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/remove-multiple-sections.test =================================================================== --- test/tools/llvm-objcopy/ELF/remove-multiple-sections.test +++ test/tools/llvm-objcopy/ELF/remove-multiple-sections.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -R .test2 -R .test3 -R .test5 %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck %s +# RUN: llvm-readobj --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test +++ test/tools/llvm-objcopy/ELF/remove-section-with-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -R .test %t %t2 -# RUN: llvm-readobj -file-headers -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/remove-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/remove-section.test +++ test/tools/llvm-objcopy/ELF/remove-section.test @@ -2,13 +2,13 @@ # RUN: cp %t %t1 # RUN: llvm-objcopy -R .test2 %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # Verify that the first run of llvm-objcopy # has not modified the input binary. # RUN: cmp %t %t1 -# RUN: llvm-objcopy -remove-section=.test2 %t1 %t3 +# RUN: llvm-objcopy --remove-section=.test2 %t1 %t3 # RUN: cmp %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/remove-shndx.test =================================================================== --- test/tools/llvm-objcopy/ELF/remove-shndx.test +++ test/tools/llvm-objcopy/ELF/remove-shndx.test @@ -2,6 +2,6 @@ # that needs it, even if the original was removed. RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t RUN: llvm-objcopy -R .symtab_shndx %t %t2 -RUN: llvm-readobj -sections %t2 | FileCheck %s +RUN: llvm-readobj --sections %t2 | FileCheck %s CHECK: Name: .symtab_shndx ( Index: test/tools/llvm-objcopy/ELF/remove-symtab.test =================================================================== --- test/tools/llvm-objcopy/ELF/remove-symtab.test +++ test/tools/llvm-objcopy/ELF/remove-symtab.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy -R .symtab %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test =================================================================== --- test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test +++ test/tools/llvm-objcopy/ELF/rename-section-flag-osproc-mask.test @@ -2,9 +2,9 @@ # ===== x86_64 ===== -# RUN: yaml2obj -docnum 1 %s > %t-x86_64.o +# RUN: yaml2obj --docnum 1 %s > %t-x86_64.o # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-x86_64.o -# RUN: llvm-readobj -sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64 +# RUN: llvm-readobj --sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64 --- !ELF FileHeader: @@ -27,9 +27,9 @@ # ===== hex ===== -# RUN: yaml2obj -docnum 2 %s > %t-hex.o +# RUN: yaml2obj --docnum 2 %s > %t-hex.o # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-hex.o -# RUN: llvm-readobj -sections %t-hex.o | FileCheck %s --check-prefix=HEX +# RUN: llvm-readobj --sections %t-hex.o | FileCheck %s --check-prefix=HEX --- !ELF FileHeader: @@ -52,9 +52,9 @@ # ===== mips ===== -# RUN: yaml2obj -docnum 3 %s > %t-mips.o +# RUN: yaml2obj --docnum 3 %s > %t-mips.o # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-mips.o -# RUN: llvm-readobj -sections %t-mips.o | FileCheck %s --check-prefix=MIPS +# RUN: llvm-readobj --sections %t-mips.o | FileCheck %s --check-prefix=MIPS --- !ELF FileHeader: @@ -91,9 +91,9 @@ # ===== arm ===== -# RUN: yaml2obj -docnum 4 %s > %t-arm.o +# RUN: yaml2obj --docnum 4 %s > %t-arm.o # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-arm.o -# RUN: llvm-readobj -sections %t-arm.o | FileCheck %s --check-prefix=ARM +# RUN: llvm-readobj --sections %t-arm.o | FileCheck %s --check-prefix=ARM --- !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test =================================================================== --- test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test +++ test/tools/llvm-objcopy/ELF/rename-section-flag-preserved.test @@ -2,29 +2,29 @@ # Single flags on a section with all flags: # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc -# RUN: llvm-readobj -sections %t.alloc | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE +# RUN: llvm-readobj --sections %t.alloc | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,load %t %t.load -# RUN: llvm-readobj -sections %t.load | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.load | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,noload %t %t.noload -# RUN: llvm-readobj -sections %t.noload | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.noload | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,readonly %t %t.readonly -# RUN: llvm-readobj -sections %t.readonly | FileCheck %s --check-prefixes=CHECK +# RUN: llvm-readobj --sections %t.readonly | FileCheck %s --check-prefixes=CHECK # RUN: llvm-objcopy --rename-section=.foo=.bar,debug %t %t.debug -# RUN: llvm-readobj -sections %t.debug | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.debug | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,code %t %t.code -# RUN: llvm-readobj -sections %t.code | FileCheck %s --check-prefixes=CHECK,EXEC,WRITE +# RUN: llvm-readobj --sections %t.code | FileCheck %s --check-prefixes=CHECK,EXEC,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,data %t %t.data -# RUN: llvm-readobj -sections %t.data | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.data | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,rom %t %t.rom -# RUN: llvm-readobj -sections %t.rom | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.rom | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,contents %t %t.contents -# RUN: llvm-readobj -sections %t.contents | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.contents | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,merge %t %t.merge -# RUN: llvm-readobj -sections %t.merge | FileCheck %s --check-prefixes=CHECK,MERGE,WRITE +# RUN: llvm-readobj --sections %t.merge | FileCheck %s --check-prefixes=CHECK,MERGE,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,strings %t %t.strings -# RUN: llvm-readobj -sections %t.strings | FileCheck %s --check-prefixes=CHECK,STRINGS,WRITE +# RUN: llvm-readobj --sections %t.strings | FileCheck %s --check-prefixes=CHECK,STRINGS,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,share %t %t.share -# RUN: llvm-readobj -sections %t.share | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.share | FileCheck %s --check-prefixes=CHECK,WRITE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/rename-section-flag.test =================================================================== --- test/tools/llvm-objcopy/ELF/rename-section-flag.test +++ test/tools/llvm-objcopy/ELF/rename-section-flag.test @@ -2,35 +2,35 @@ # Single flags on a section with no flags: # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc -# RUN: llvm-readobj -sections %t.alloc | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE +# RUN: llvm-readobj --sections %t.alloc | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,load %t %t.load -# RUN: llvm-readobj -sections %t.load | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.load | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,noload %t %t.noload -# RUN: llvm-readobj -sections %t.noload | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.noload | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,readonly %t %t.readonly -# RUN: llvm-readobj -sections %t.readonly | FileCheck %s --check-prefixes=CHECK +# RUN: llvm-readobj --sections %t.readonly | FileCheck %s --check-prefixes=CHECK # RUN: llvm-objcopy --rename-section=.foo=.bar,debug %t %t.debug -# RUN: llvm-readobj -sections %t.debug | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.debug | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,code %t %t.code -# RUN: llvm-readobj -sections %t.code | FileCheck %s --check-prefixes=CHECK,EXEC,WRITE +# RUN: llvm-readobj --sections %t.code | FileCheck %s --check-prefixes=CHECK,EXEC,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,data %t %t.data -# RUN: llvm-readobj -sections %t.data | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.data | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,rom %t %t.rom -# RUN: llvm-readobj -sections %t.rom | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.rom | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,contents %t %t.contents -# RUN: llvm-readobj -sections %t.contents | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.contents | FileCheck %s --check-prefixes=CHECK,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,merge %t %t.merge -# RUN: llvm-readobj -sections %t.merge | FileCheck %s --check-prefixes=CHECK,MERGE,WRITE +# RUN: llvm-readobj --sections %t.merge | FileCheck %s --check-prefixes=CHECK,MERGE,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,strings %t %t.strings -# RUN: llvm-readobj -sections %t.strings | FileCheck %s --check-prefixes=CHECK,STRINGS,WRITE +# RUN: llvm-readobj --sections %t.strings | FileCheck %s --check-prefixes=CHECK,STRINGS,WRITE # RUN: llvm-objcopy --rename-section=.foo=.bar,share %t %t.share -# RUN: llvm-readobj -sections %t.share | FileCheck %s --check-prefixes=CHECK,WRITE +# RUN: llvm-readobj --sections %t.share | FileCheck %s --check-prefixes=CHECK,WRITE # Multiple flags: # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc,readonly,strings %t %t.alloc_ro_strings -# RUN: llvm-readobj -sections %t.alloc_ro_strings | FileCheck %s --check-prefixes=CHECK,ALLOC,STRINGS +# RUN: llvm-readobj --sections %t.alloc_ro_strings | FileCheck %s --check-prefixes=CHECK,ALLOC,STRINGS # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc,code %t %t.alloc_code -# RUN: llvm-readobj -sections %t.alloc_code | FileCheck %s --check-prefixes=CHECK,ALLOC,EXEC,WRITE +# RUN: llvm-readobj --sections %t.alloc_code | FileCheck %s --check-prefixes=CHECK,ALLOC,EXEC,WRITE # Invalid flags: # RUN: not llvm-objcopy --rename-section=.foo=.bar,xyzzy %t %t.xyzzy 2>&1 | FileCheck %s --check-prefix=BAD-FLAG Index: test/tools/llvm-objcopy/ELF/rename-section-multiple.test =================================================================== --- test/tools/llvm-objcopy/ELF/rename-section-multiple.test +++ test/tools/llvm-objcopy/ELF/rename-section-multiple.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --rename-section=.test1=.test2 --rename-section=.test3=.test4 --rename-section=.test5=.test6 %t %t2 -# RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/rename-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/rename-section.test +++ test/tools/llvm-objcopy/ELF/rename-section.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --rename-section=.foo=.bar %t %t2 -# RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s # RUN: not llvm-objcopy --rename-section=.foo.bar --rename-section=.foo=.other %t %t2 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT # RUN: not llvm-objcopy --rename-section=.foo=.bar --rename-section=.foo=.other %t %t2 2>&1 | FileCheck %s --check-prefix=MULTIPLE-RENAMES Index: test/tools/llvm-objcopy/ELF/segment-shift-section-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/segment-shift-section-remove.test +++ test/tools/llvm-objcopy/ELF/segment-shift-section-remove.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text2 %t %t2 -# RUN: llvm-readobj -file-headers -sections -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/segment-shift.test =================================================================== --- test/tools/llvm-objcopy/ELF/segment-shift.test +++ test/tools/llvm-objcopy/ELF/segment-shift.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --program-headers %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/segment-test-remove-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/segment-test-remove-section.test +++ test/tools/llvm-objcopy/ELF/segment-test-remove-section.test @@ -6,7 +6,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text2 %t %t2 -# RUN: llvm-readobj -file-headers -program-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --program-headers --sections %t2 | FileCheck %s # RUN: od -t x1 -j 8192 %t2 | FileCheck %s --check-prefix=DATA !ELF Index: test/tools/llvm-objcopy/ELF/strict-no-add.test =================================================================== --- test/tools/llvm-objcopy/ELF/strict-no-add.test +++ test/tools/llvm-objcopy/ELF/strict-no-add.test @@ -4,7 +4,7 @@ RUN: %python %p/Inputs/ungzip.py %p/Inputs/many-sections.o.gz > %t.0 RUN: cat %p/Inputs/alloc-symtab.o > %t RUN: llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6 %t.0 %t2 -RUN: llvm-objcopy -add-section=.s0=%t -add-section=.s1=%t -add-section=.s2=%t %t2 %t2 -RUN: llvm-readobj -sections %t2 | FileCheck --check-prefix=SECS %s +RUN: llvm-objcopy --add-section=.s0=%t --add-section=.s1=%t --add-section=.s2=%t %t2 %t2 +RUN: llvm-readobj --sections %t2 | FileCheck --check-prefix=SECS %s SECS-NOT: Name: .symtab_shndx Index: test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test +++ test/tools/llvm-objcopy/ELF/strip-all-and-keep-symbol.test @@ -1,13 +1,13 @@ # RUN: yaml2obj %s > %t # RUN: cp %t %t1 # RUN: llvm-objcopy --strip-all --keep-symbol foo %t %t2 -# RUN: llvm-readobj -sections -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --sections --symbols %t2 | FileCheck %s # Verify that the first run of llvm-objcopy # has not modified the input binary. # RUN: cmp %t %t1 -# RUN: llvm-strip -keep-symbol=foo %t1 +# RUN: llvm-strip --keep-symbol=foo %t1 # RUN: cmp %t1 %t2 # RUN: cp %t %t3 Index: test/tools/llvm-objcopy/ELF/strip-all-and-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-all-and-remove.test +++ test/tools/llvm-objcopy/ELF/strip-all-and-remove.test @@ -1,10 +1,10 @@ # RUN: yaml2obj %s > %t # RUN: cp %t %t1 -# RUN: llvm-strip -remove-section=.text.bar %t -# RUN: llvm-readobj -file-headers -sections -symbols %t | FileCheck %s +# RUN: llvm-strip --remove-section=.text.bar %t +# RUN: llvm-readobj --file-headers --sections --symbols %t | FileCheck %s -# RUN: llvm-objcopy -strip-all -remove-section=.text.bar %t1 %t1 +# RUN: llvm-objcopy --strip-all --remove-section=.text.bar %t1 %t1 # RUN: cmp %t %t1 !ELF Index: test/tools/llvm-objcopy/ELF/strip-all-gnu.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-all-gnu.test +++ test/tools/llvm-objcopy/ELF/strip-all-gnu.test @@ -2,7 +2,7 @@ # RUN: cp %t %t1 # RUN: llvm-objcopy --strip-all-gnu %t %t2 # RUN: llvm-strip --strip-all-gnu %t -o %t3 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # RUN: cmp %t2 %t3 !ELF Index: test/tools/llvm-objcopy/ELF/strip-all.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-all.test +++ test/tools/llvm-objcopy/ELF/strip-all.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t # RUN: cp %t %t3 # RUN: llvm-objcopy --strip-all %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s # Verify that the previous llvm-objcopy's run has not modified the input. # RUN: cmp %t %t3 Index: test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test +++ test/tools/llvm-objcopy/ELF/strip-debug-and-remove.test @@ -1,10 +1,10 @@ # RUN: yaml2obj %s > %t # RUN: cp %t %t1 -# RUN: llvm-strip -strip-debug -remove-section=.text.bar %t -# RUN: llvm-readobj -file-headers -sections -symbols %t | FileCheck %s +# RUN: llvm-strip --strip-debug --remove-section=.text.bar %t +# RUN: llvm-readobj --file-headers --sections --symbols %t | FileCheck %s -# RUN: llvm-objcopy -strip-debug -remove-section=.text.bar %t1 %t1 +# RUN: llvm-objcopy --strip-debug --remove-section=.text.bar %t1 %t1 # RUN: cmp %t %t1 !ELF Index: test/tools/llvm-objcopy/ELF/strip-debug.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-debug.test +++ test/tools/llvm-objcopy/ELF/strip-debug.test @@ -1,12 +1,12 @@ # RUN: yaml2obj %s > %t # RUN: cp %t %t3 -# RUN: llvm-objcopy -strip-debug %t %t2 -# RUN: llvm-readobj -file-headers -sections -symbols %t2 | FileCheck %s +# RUN: llvm-objcopy --strip-debug %t %t2 +# RUN: llvm-readobj --file-headers --sections --symbols %t2 | FileCheck %s # Verify that the previous run of llvm-objcopy has not modified the input. # RUN: cmp %t %t3 -# RUN: llvm-strip -strip-debug %t3 +# RUN: llvm-strip --strip-debug %t3 # RUN: cmp %t2 %t3 # RUN: cp %t %t4 Index: test/tools/llvm-objcopy/ELF/strip-dwo-groups.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-dwo-groups.test +++ test/tools/llvm-objcopy/ELF/strip-dwo-groups.test @@ -1,6 +1,6 @@ # RUN: cp %p/Inputs/groups.o %t -# RUN: llvm-objcopy -strip-dwo %t -# RUN: llvm-readobj -elf-section-groups %t | FileCheck %s +# RUN: llvm-objcopy --strip-dwo %t +# RUN: llvm-readobj --elf-section-groups %t | FileCheck %s // Source code of groups.o: // @@ -18,11 +18,11 @@ // // clang -g -gsplit-dwarf -std=c++11 -c groups.cpp -o groups.o -// `llvm-objcopy -strip-dwo` strips out dwo sections, as a result, the index of +// `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of // the symbol table, the indices of the symbols and the indices of the sections // which go after the removed ones will change. Consequently, the fields // Link, Info and the content of .group need to be updated. In the past -// `llvm-objcopy -strip-dwo` used to produce invalid binaries with +// `llvm-objcopy --strip-dwo` used to produce invalid binaries with // broken .group section, this test verifies the correctness of // Link, Info and the content of this section. Index: test/tools/llvm-objcopy/ELF/strip-dwo-inplace.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-dwo-inplace.test +++ test/tools/llvm-objcopy/ELF/strip-dwo-inplace.test @@ -1,6 +1,6 @@ # RUN: cp %p/Inputs/dwarf.dwo %t -# RUN: llvm-objcopy -strip-dwo %t -# RUN: llvm-readobj -file-headers -sections %t | FileCheck %s +# RUN: llvm-objcopy --strip-dwo %t +# RUN: llvm-readobj --file-headers --sections %t | FileCheck %s CHECK: SectionHeaderCount: 24 Index: test/tools/llvm-objcopy/ELF/strip-multiple-files.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-multiple-files.test +++ test/tools/llvm-objcopy/ELF/strip-multiple-files.test @@ -4,7 +4,7 @@ # tests so we only have to run FileCheck on it once. # RUN: cp %t.o %t.1.o # RUN: llvm-strip --keep-symbol=foo %t.1.o -o %t.stripped.o -# RUN: llvm-readobj -symbols %t.stripped.o | FileCheck %s +# RUN: llvm-readobj --symbols %t.stripped.o | FileCheck %s # llvm-strip on two files: # RUN: cp %t.o %t.1.o Index: test/tools/llvm-objcopy/ELF/strip-non-alloc.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-non-alloc.test +++ test/tools/llvm-objcopy/ELF/strip-non-alloc.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --strip-non-alloc %t %t2 -# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/strip-preserve-atime.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-preserve-atime.test +++ test/tools/llvm-objcopy/ELF/strip-preserve-atime.test @@ -43,7 +43,7 @@ # Preserve dates in split DWO files. # RUN: cp %p/Inputs/dwarf.dwo %t-input.dwo # RUN: touch -a -t 199505050555.55 %t-input.dwo -# RUN: llvm-objcopy -p -split-dwo=%t-dwo %t-input.dwo %t-nondwo +# RUN: llvm-objcopy -p --split-dwo=%t-dwo %t-input.dwo %t-nondwo # RUN: ls -lu %t-dwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME # RUN: llvm-readobj %t-dwo # RUN: ls -lu %t-nondwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME Index: test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test +++ test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test @@ -41,7 +41,7 @@ # Preserve dates in split DWO files. # RUN: cp %p/Inputs/dwarf.dwo %t-input.dwo # RUN: touch -m -t 199705050555.55 %t-input.dwo -# RUN: llvm-objcopy -p -split-dwo=%t-dwo %t-input.dwo %t-nondwo +# RUN: llvm-objcopy -p --split-dwo=%t-dwo %t-input.dwo %t-nondwo # RUN: ls -l %t-dwo | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME # RUN: llvm-readobj %t-dwo # RUN: ls -l %t-nondwo | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME Index: test/tools/llvm-objcopy/ELF/strip-sections-keep.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-sections-keep.test +++ test/tools/llvm-objcopy/ELF/strip-sections-keep.test @@ -1,5 +1,5 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -strip-sections -keep-section=.shstrtab %t %t2 +# RUN: llvm-objcopy --strip-sections --keep-section=.shstrtab %t %t2 # RUN: od -Ax -t c %t2 | FileCheck %s !ELF Index: test/tools/llvm-objcopy/ELF/strip-sections-only-section.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-sections-only-section.test +++ test/tools/llvm-objcopy/ELF/strip-sections-only-section.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s > %t -# RUN: llvm-objcopy -strip-sections -only-section=.test %t %t2 +# RUN: llvm-objcopy --strip-sections --only-section=.test %t %t2 # RUN: od -Ax -t x1 %t2 | FileCheck %s -# RUN: od -Ax -t c %t2 | FileCheck %s -check-prefix=TEXT +# RUN: od -Ax -t c %t2 | FileCheck %s --check-prefix=TEXT !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/strip-sections.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-sections.test +++ test/tools/llvm-objcopy/ELF/strip-sections.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --strip-sections %t %t2 -# RUN: llvm-readobj -file-headers -program-headers %t2 | FileCheck %s +# RUN: llvm-readobj --file-headers --program-headers %t2 | FileCheck %s # RUN: od -t x1 -j 4096 %t2 | FileCheck %s --check-prefix=DATA !ELF Index: test/tools/llvm-objcopy/ELF/strip-symbol.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-symbol.test +++ test/tools/llvm-objcopy/ELF/strip-symbol.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --strip-symbol baz -N bar %t %t2 -# RUN: llvm-readobj -symbols -sections %t2 | FileCheck %s +# RUN: llvm-readobj --symbols --sections %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/strip-unneeded.test =================================================================== --- test/tools/llvm-objcopy/ELF/strip-unneeded.test +++ test/tools/llvm-objcopy/ELF/strip-unneeded.test @@ -3,7 +3,7 @@ # RUN: llvm-objcopy --strip-unneeded %t %t2 # Verify that llvm-objcopy has not modified the input. # RUN: cmp %t %t1 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s # Verify that llvm-strip modifies the symbol table the same way. # RUN: llvm-strip --strip-unneeded %t Index: test/tools/llvm-objcopy/ELF/symbol-copy.test =================================================================== --- test/tools/llvm-objcopy/ELF/symbol-copy.test +++ test/tools/llvm-objcopy/ELF/symbol-copy.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/symtab-link.test =================================================================== --- test/tools/llvm-objcopy/ELF/symtab-link.test +++ test/tools/llvm-objcopy/ELF/symtab-link.test @@ -1,9 +1,9 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy %t %t2 -# RUN: llvm-readobj -sections %t2 | FileCheck %s +# RUN: llvm-readobj --sections %t2 | FileCheck %s # RUN: cp %t %t3 # RUN: llvm-strip --strip-debug %t3 -# RUN: llvm-readobj -sections %t3 | FileCheck %s +# RUN: llvm-readobj --sections %t3 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/two-seg-remove-end.test =================================================================== --- test/tools/llvm-objcopy/ELF/two-seg-remove-end.test +++ test/tools/llvm-objcopy/ELF/two-seg-remove-end.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text4 -O binary %t %t2 # RUN: od -Ax -v -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/two-seg-remove-first.test =================================================================== --- test/tools/llvm-objcopy/ELF/two-seg-remove-first.test +++ test/tools/llvm-objcopy/ELF/two-seg-remove-first.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text -O binary %t %t2 # RUN: od -Ax -v -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/two-seg-remove-third-sec.test =================================================================== --- test/tools/llvm-objcopy/ELF/two-seg-remove-third-sec.test +++ test/tools/llvm-objcopy/ELF/two-seg-remove-third-sec.test @@ -1,7 +1,7 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy -R .text3 -O binary %t %t2 # RUN: od -Ax -v -t x1 %t2 | FileCheck %s -# RUN: wc -c %t2 | FileCheck %s -check-prefix=SIZE +# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/weaken-all.test =================================================================== --- test/tools/llvm-objcopy/ELF/weaken-all.test +++ test/tools/llvm-objcopy/ELF/weaken-all.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --weaken %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: Index: test/tools/llvm-objcopy/ELF/weaken.test =================================================================== --- test/tools/llvm-objcopy/ELF/weaken.test +++ test/tools/llvm-objcopy/ELF/weaken.test @@ -1,6 +1,6 @@ # RUN: yaml2obj %s > %t # RUN: llvm-objcopy --weaken-symbol Global -W Local -W Weak %t %t2 -# RUN: llvm-readobj -symbols %t2 | FileCheck %s +# RUN: llvm-readobj --symbols %t2 | FileCheck %s !ELF FileHeader: