# 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:
# 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:
# 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:
# 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:
# 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)
# 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
# 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
# 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
# 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:
# 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
# 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
# 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:
# 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
# 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 [
# 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:
# 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:
# 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:
# 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:
# 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:
# 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
# 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
# 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
# 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)
# 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.
-# 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
# 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
# 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
# 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
# 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:
# 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
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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,
# 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
# 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,
+# 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
# 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:
# 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:
# 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:
# 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:
# 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
# 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:
# 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:
# 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:
# 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:
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
# 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:
# 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:
# 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:
# 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:
# 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
# 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:
# 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:
# 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:
# 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:
# 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 {
# 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
# 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:
# 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:
# 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:
# 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:
# 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
# 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 (
# 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:
# ===== 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:
# ===== 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:
# ===== 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:
# ===== 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:
# 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:
# 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
# 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:
# 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
# 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:
# 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:
# 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
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
# 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
# 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
# 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
# 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
# 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
# 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
# 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:
//
//
// 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.
# 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
# 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
# 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:
# 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
# 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
# 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
# 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:
# 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
# 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:
# 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
# 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:
# 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:
# 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:
# 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:
# 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:
# 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:
# 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: