-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-pdbutil dump --symbols %t.obj | FileCheck %s
# RUN: llvm-readobj -codeview %t.obj | FileCheck %s --check-prefix=READOBJ
-RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml > %T/obj-hashes-1.obj
-RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml > %T/obj-hashes-2.obj
+RUN: yaml2obj %p/Inputs/obj-hashes-1.yaml -o %T/obj-hashes-1.obj
+RUN: yaml2obj %p/Inputs/obj-hashes-2.yaml -o %T/obj-hashes-2.obj
RUN: echo obj-hashes-1 > %T/hashes-combined.out
RUN: llvm-pdbutil dump -type-extras %T/obj-hashes-1.obj >> %T/hashes-combined.out
RUN: echo obj-hashes-2 >> %T/hashes-combined.out
-# RUN: yaml2obj < %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-readobj --codeview %t.obj | FileCheck %s
# CHECK: Kind: S_UNAMESPACE (0x1124)
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-dwarfdump %t.o 2>&1 | FileCheck %s
# CHECK: failed to compute relocation: Unknown
RUN: mkdir %t1\r
RUN: obj2yaml %S/Inputs/precomp-a.obj > %t1/precomp-a.yaml\r
RUN: obj2yaml %S/Inputs/precomp.obj > %t1/precomp.yaml\r
-RUN: yaml2obj %t1/precomp-a.yaml > %t1/a.obj\r
-RUN: yaml2obj %t1/precomp.yaml > %t1/precomp.obj\r
+RUN: yaml2obj %t1/precomp-a.yaml -o %t1/a.obj\r
+RUN: yaml2obj %t1/precomp.yaml -o %t1/precomp.obj\r
RUN: llvm-readobj --codeview %t1/a.obj | FileCheck %s -check-prefix PRECOMP\r
RUN: llvm-readobj --codeview %t1/precomp.obj | FileCheck %s -check-prefix ENDPRECOMP\r
RUN: llvm-pdbutil dump -types %t1/a.obj | FileCheck %s -check-prefix PDB-PRECOMP\r
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: - Name: .rela.text
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-R600 %s
# RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-R600 %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
# RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-R630 %s
# RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-R630 %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
# RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-ALL,ELF-RS880 %s
# RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-RS880 %s
-# RUN: yaml2obj -docnum=4 %s > %t.o.4
+# RUN: yaml2obj --docnum=4 %s -o %t.o.4
# RUN: llvm-readobj -S --file-headers %t.o.4 | FileCheck --check-prefixes=ELF-ALL,ELF-RV670 %s
# RUN: obj2yaml %t.o.4 | FileCheck --check-prefixes=YAML-RV670 %s
-# RUN: yaml2obj -docnum=5 %s > %t.o.5
+# RUN: yaml2obj --docnum=5 %s -o %t.o.5
# RUN: llvm-readobj -S --file-headers %t.o.5 | FileCheck --check-prefixes=ELF-ALL,ELF-RV710 %s
# RUN: obj2yaml %t.o.5 | FileCheck --check-prefixes=YAML-RV710 %s
-# RUN: yaml2obj -docnum=6 %s > %t.o.6
+# RUN: yaml2obj --docnum=6 %s -o %t.o.6
# RUN: llvm-readobj -S --file-headers %t.o.6 | FileCheck --check-prefixes=ELF-ALL,ELF-RV730 %s
# RUN: obj2yaml %t.o.6 | FileCheck --check-prefixes=YAML-RV730 %s
-# RUN: yaml2obj -docnum=7 %s > %t.o.7
+# RUN: yaml2obj --docnum=7 %s -o %t.o.7
# RUN: llvm-readobj -S --file-headers %t.o.7 | FileCheck --check-prefixes=ELF-ALL,ELF-RV770 %s
# RUN: obj2yaml %t.o.7 | FileCheck --check-prefixes=YAML-RV770 %s
-# RUN: yaml2obj -docnum=8 %s > %t.o.8
+# RUN: yaml2obj --docnum=8 %s -o %t.o.8
# RUN: llvm-readobj -S --file-headers %t.o.8 | FileCheck --check-prefixes=ELF-ALL,ELF-CEDAR %s
# RUN: obj2yaml %t.o.8 | FileCheck --check-prefixes=YAML-CEDAR %s
-# RUN: yaml2obj -docnum=9 %s > %t.o.9
+# RUN: yaml2obj --docnum=9 %s -o %t.o.9
# RUN: llvm-readobj -S --file-headers %t.o.9 | FileCheck --check-prefixes=ELF-ALL,ELF-CYPRESS %s
# RUN: obj2yaml %t.o.9 | FileCheck --check-prefixes=YAML-CYPRESS %s
-# RUN: yaml2obj -docnum=10 %s > %t.o.10
+# RUN: yaml2obj --docnum=10 %s -o %t.o.10
# RUN: llvm-readobj -S --file-headers %t.o.10 | FileCheck --check-prefixes=ELF-ALL,ELF-JUNIPER %s
# RUN: obj2yaml %t.o.10 | FileCheck --check-prefixes=YAML-JUNIPER %s
-# RUN: yaml2obj -docnum=11 %s > %t.o.11
+# RUN: yaml2obj --docnum=11 %s -o %t.o.11
# RUN: llvm-readobj -S --file-headers %t.o.11 | FileCheck --check-prefixes=ELF-ALL,ELF-REDWOOD %s
# RUN: obj2yaml %t.o.11 | FileCheck --check-prefixes=YAML-REDWOOD %s
-# RUN: yaml2obj -docnum=12 %s > %t.o.12
+# RUN: yaml2obj --docnum=12 %s -o %t.o.12
# RUN: llvm-readobj -S --file-headers %t.o.12 | FileCheck --check-prefixes=ELF-ALL,ELF-SUMO %s
# RUN: obj2yaml %t.o.12 | FileCheck --check-prefixes=YAML-SUMO %s
-# RUN: yaml2obj -docnum=13 %s > %t.o.13
+# RUN: yaml2obj --docnum=13 %s -o %t.o.13
# RUN: llvm-readobj -S --file-headers %t.o.13 | FileCheck --check-prefixes=ELF-ALL,ELF-BARTS %s
# RUN: obj2yaml %t.o.13 | FileCheck --check-prefixes=YAML-BARTS %s
-# RUN: yaml2obj -docnum=14 %s > %t.o.14
+# RUN: yaml2obj --docnum=14 %s -o %t.o.14
# RUN: llvm-readobj -S --file-headers %t.o.14 | FileCheck --check-prefixes=ELF-ALL,ELF-CAICOS %s
# RUN: obj2yaml %t.o.14 | FileCheck --check-prefixes=YAML-CAICOS %s
-# RUN: yaml2obj -docnum=15 %s > %t.o.15
+# RUN: yaml2obj --docnum=15 %s -o %t.o.15
# RUN: llvm-readobj -S --file-headers %t.o.15 | FileCheck --check-prefixes=ELF-ALL,ELF-CAYMAN %s
# RUN: obj2yaml %t.o.15 | FileCheck --check-prefixes=YAML-CAYMAN %s
-# RUN: yaml2obj -docnum=16 %s > %t.o.16
+# RUN: yaml2obj --docnum=16 %s -o %t.o.16
# RUN: llvm-readobj -S --file-headers %t.o.16 | FileCheck --check-prefixes=ELF-ALL,ELF-TURKS %s
# RUN: obj2yaml %t.o.16 | FileCheck --check-prefixes=YAML-TURKS %s
-# RUN: yaml2obj -docnum=17 %s > %t.o.17
+# RUN: yaml2obj --docnum=17 %s -o %t.o.17
# RUN: llvm-readobj -S --file-headers %t.o.17 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX600 %s
# RUN: obj2yaml %t.o.17 | FileCheck --check-prefixes=YAML-GFX600 %s
-# RUN: yaml2obj -docnum=18 %s > %t.o.18
+# RUN: yaml2obj --docnum=18 %s -o %t.o.18
# RUN: llvm-readobj -S --file-headers %t.o.18 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX601 %s
# RUN: obj2yaml %t.o.18 | FileCheck --check-prefixes=YAML-GFX601 %s
-# RUN: yaml2obj -docnum=19 %s > %t.o.19
+# RUN: yaml2obj --docnum=19 %s -o %t.o.19
# RUN: llvm-readobj -S --file-headers %t.o.19 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX700 %s
# RUN: obj2yaml %t.o.19 | FileCheck --check-prefixes=YAML-GFX700 %s
-# RUN: yaml2obj -docnum=20 %s > %t.o.20
+# RUN: yaml2obj --docnum=20 %s -o %t.o.20
# RUN: llvm-readobj -S --file-headers %t.o.20 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX701 %s
# RUN: obj2yaml %t.o.20 | FileCheck --check-prefixes=YAML-GFX701 %s
-# RUN: yaml2obj -docnum=21 %s > %t.o.21
+# RUN: yaml2obj --docnum=21 %s -o %t.o.21
# RUN: llvm-readobj -S --file-headers %t.o.21 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX702 %s
# RUN: obj2yaml %t.o.21 | FileCheck --check-prefixes=YAML-GFX702 %s
-# RUN: yaml2obj -docnum=22 %s > %t.o.22
+# RUN: yaml2obj --docnum=22 %s -o %t.o.22
# RUN: llvm-readobj -S --file-headers %t.o.22 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX703 %s
# RUN: obj2yaml %t.o.22 | FileCheck --check-prefixes=YAML-GFX703 %s
-# RUN: yaml2obj -docnum=23 %s > %t.o.23
+# RUN: yaml2obj --docnum=23 %s -o %t.o.23
# RUN: llvm-readobj -S --file-headers %t.o.23 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX704 %s
# RUN: obj2yaml %t.o.23 | FileCheck --check-prefixes=YAML-GFX704 %s
-# RUN: yaml2obj -docnum=24 %s > %t.o.24
+# RUN: yaml2obj --docnum=24 %s -o %t.o.24
# RUN: llvm-readobj -S --file-headers %t.o.24 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX801 %s
# RUN: obj2yaml %t.o.24 | FileCheck --check-prefixes=YAML-GFX801 %s
-# RUN: yaml2obj -docnum=25 %s > %t.o.25
+# RUN: yaml2obj --docnum=25 %s -o %t.o.25
# RUN: llvm-readobj -S --file-headers %t.o.25 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX802 %s
# RUN: obj2yaml %t.o.25 | FileCheck --check-prefixes=YAML-GFX802 %s
-# RUN: yaml2obj -docnum=26 %s > %t.o.26
+# RUN: yaml2obj --docnum=26 %s -o %t.o.26
# RUN: llvm-readobj -S --file-headers %t.o.26 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX803 %s
# RUN: obj2yaml %t.o.26 | FileCheck --check-prefixes=YAML-GFX803 %s
-# RUN: yaml2obj -docnum=27 %s > %t.o.27
+# RUN: yaml2obj --docnum=27 %s -o %t.o.27
# RUN: llvm-readobj -S --file-headers %t.o.27 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX810 %s
# RUN: obj2yaml %t.o.27 | FileCheck --check-prefixes=YAML-GFX810 %s
-# RUN: yaml2obj -docnum=28 %s > %t.o.28
+# RUN: yaml2obj --docnum=28 %s -o %t.o.28
# RUN: llvm-readobj -S --file-headers %t.o.28 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX900 %s
# RUN: obj2yaml %t.o.28 | FileCheck --check-prefixes=YAML-GFX900 %s
-# RUN: yaml2obj -docnum=29 %s > %t.o.29
+# RUN: yaml2obj --docnum=29 %s -o %t.o.29
# RUN: llvm-readobj -S --file-headers %t.o.29 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX902 %s
# RUN: obj2yaml %t.o.29 | FileCheck --check-prefixes=YAML-GFX902 %s
-# RUN: yaml2obj -docnum=30 %s > %t.o.30
+# RUN: yaml2obj --docnum=30 %s -o %t.o.30
# RUN: llvm-readobj -S --file-headers %t.o.30 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX904 %s
# RUN: obj2yaml %t.o.30 | FileCheck --check-prefixes=YAML-GFX904 %s
-# RUN: yaml2obj -docnum=31 %s > %t.o.31
+# RUN: yaml2obj --docnum=31 %s -o %t.o.31
# RUN: llvm-readobj -S --file-headers %t.o.31 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX906 %s
# RUN: obj2yaml %t.o.31 | FileCheck --check-prefixes=YAML-GFX906 %s
-# RUN: yaml2obj -docnum=32 %s > %t.o.32
+# RUN: yaml2obj --docnum=32 %s -o %t.o.32
# RUN: llvm-readobj -s -file-headers %t.o.32 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX908 %s
# RUN: obj2yaml %t.o.32 | FileCheck --check-prefixes=YAML-GFX908 %s
-# RUN: yaml2obj -docnum=33 %s > %t.o.33
+# RUN: yaml2obj --docnum=33 %s -o %t.o.33
# RUN: llvm-readobj -s -file-headers %t.o.33 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX909 %s
# RUN: obj2yaml %t.o.33 | FileCheck --check-prefixes=YAML-GFX909 %s
-# RUN: yaml2obj -docnum=34 %s > %t.o.34
+# RUN: yaml2obj --docnum=34 %s -o %t.o.34
# RUN: llvm-readobj -s -file-headers %t.o.34 | FileCheck --check-prefixes=ELF-ALL,ELF-GFX1010 %s
# RUN: obj2yaml %t.o.34 | FileCheck --check-prefixes=YAML-GFX1010 %s
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-NONE %s
# RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-SRAM-ECC-NONE %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
# RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-GFX900 %s
# RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-SRAM-ECC-GFX900 %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
# RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-ALL,ELF-SRAM-ECC-XNACK-GFX900 %s
# RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-SRAM-ECC-XNACK-GFX900 %s
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-ALL,ELF-XNACK-NONE %s
# RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-XNACK-NONE %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
# RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-ALL,ELF-XNACK-GFX801 %s
# RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-XNACK-GFX801 %s
-# RUN: yaml2obj -docnum=1 %s > %t.o.1
+# RUN: yaml2obj --docnum=1 %s -o %t.o.1
# RUN: llvm-readobj -S --file-headers %t.o.1 | FileCheck --check-prefixes=ELF-HSA %s
# RUN: obj2yaml %t.o.1 | FileCheck --check-prefixes=YAML-HSA %s
-# RUN: yaml2obj -docnum=2 %s > %t.o.2
+# RUN: yaml2obj --docnum=2 %s -o %t.o.2
# RUN: llvm-readobj -S --file-headers %t.o.2 | FileCheck --check-prefixes=ELF-PAL %s
# RUN: obj2yaml %t.o.2 | FileCheck --check-prefixes=YAML-PAL %s
-# RUN: yaml2obj -docnum=3 %s > %t.o.3
+# RUN: yaml2obj --docnum=3 %s -o %t.o.3
# RUN: llvm-readobj -S --file-headers %t.o.3 | FileCheck --check-prefixes=ELF-MESA3D %s
# RUN: obj2yaml %t.o.3 | FileCheck --check-prefixes=YAML-MESA3D %s
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj -S --file-headers %t.o | FileCheck %s
# CHECK: Format: ELF32-amdgpu
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -r %t | FileCheck %s
# CHECK: Relocations [
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj -S --file-headers %t.o | FileCheck %s
# CHECK: Format: ELF64-amdgpu
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -r %t | FileCheck %s
# CHECK: Relocations [
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -A %t | FileCheck -check-prefix=OBJ %s
# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -r %t | FileCheck -check-prefix=OBJ %s
# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --file-headers %t | FileCheck -check-prefix=OBJ %s
# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
# MACHO-x86-64: 23: 48 83 c4 08 addq $8, %rsp
# MACHO-x86-64: 27: c3 ret
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
# RUN: llvm-objdump -d -r %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
# ELF-i386: file format ELF32-i386
- Name: puts
Binding: STB_GLOBAL
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
# RUN: llvm-objdump -d -r %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64
--- !ELF
# COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp
# COFF-x86-64: 25: c3 ret
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
# RUN: llvm-objdump -d %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
# ELF-i386: file format ELF32-i386
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Content: 83EC0CC744240800000000C7042400000000E8FCFFFFFFE8FCFFFFFF8B44240883C40CC3
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
# RUN: llvm-objdump -d %t.elf-x86-64 | FileCheck %s -check-prefix ELF-x86-64
# ELF-x86-64: file format ELF64-x86-64
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Relocations:
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -r %t | FileCheck %s
# CHECK: Relocations [
symbol table. Create such an object, put it into an archive, and check to
see that there is an empty symbol table.
RUN: mkdir -p %t
-RUN: yaml2obj %S/Inputs/solaris-nosymbols.yaml > %t/foo.o
+RUN: yaml2obj %S/Inputs/solaris-nosymbols.yaml -o %t/foo.o
RUN: llvm-ar rs %t/foo.a %t/foo.o
RUN: cat -v %t/foo.a | FileCheck -strict-whitespace --check-prefix=SOLARIS %s
SOLARIS: !<arch>
-# RUN: yaml2obj -docnum=1 %s > %t.elf-x86-64
-# RUN: yaml2obj -docnum=2 %s > %t2.elf-x86-64
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t2.elf-x86-64
--- !ELF
FileHeader:
## Test that llvm-nm returns an error because of the unknown file type, but
## keeps processing subsequent files.
-# RUN: yaml2obj %s > %t-i386
+# RUN: yaml2obj %s -o %t-i386
# RUN: touch %t
# RUN: not llvm-nm %t-i386 %t %t-i386 | FileCheck %s
# ERROR: File format has no dynamic symbol table.
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
# RUN: llvm-nm -D %t.elf-i386 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
# NO-SYMBOLS: no symbols
# WASM-NEXT: U puts
# WASM-NEXT: 00000010 D var
-# RUN: yaml2obj -docnum=1 %s > %t.elf-i386
+# RUN: yaml2obj --docnum=1 %s -o %t.elf-i386
--- !ELF
FileHeader:
## Test different ELF symbols for 64-bit platform.
-# RUN: yaml2obj -docnum=2 %s > %t.elf-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t.elf-x86-64
# RUN: llvm-nm %t.elf-x86-64 | FileCheck %s -check-prefix ELF64
# ELF64: U SomeOtherFunction
## Test llvm-nm shows all symbols with -a.
-# RUN: yaml2obj -docnum=3 %s > %t-a.elf-x86-64
+# RUN: yaml2obj --docnum=3 %s -o %t-a.elf-x86-64
# RUN: llvm-nm -a %t-a.elf-x86-64 | FileCheck %s -check-prefix ELF64-a
# ELF64-a: 00000000 b .bss
## Test that we drop the thumb bit only from function addresses.
-# RUN: yaml2obj -docnum=4 %s > %t.elf-arm32
+# RUN: yaml2obj --docnum=4 %s -o %t.elf-arm32
# RUN: llvm-nm %t.elf-arm32 | FileCheck %s -check-prefix ELF-THUMB
# ELF-THUMB: 00000000 t func
# ELF-MIPS64EL-NEXT: - Name: zed
# ELF-MIPS64EL-NEXT: Binding: STB_GLOBAL
-# RUN: yaml2obj %s > %t-x86-64
+# RUN: yaml2obj %s -o %t-x86-64
# RUN: obj2yaml %t-x86-64 | FileCheck %s --check-prefix ELF-X86-64
# ELF-X86-64: FileHeader:
# RUN: llvm-objdump -r %p/Inputs/trivial-object-test.coff-x86-64 \
# RUN: | FileCheck %s -check-prefix COFF-x86-64
-# RUN: yaml2obj -docnum=1 %s > %t-i386
+# RUN: yaml2obj --docnum=1 %s -o %t-i386
# RUN: llvm-objdump -r %t-i386 | FileCheck %s -check-prefix ELF-i386
# ELF-i386: .text
- Name: symbol
Binding: STB_GLOBAL
-# RUN: yaml2obj -docnum=2 %s > %t-x86-64
+# RUN: yaml2obj --docnum=2 %s -o %t-x86-64
# RUN: llvm-objdump -r %t-x86-64 | FileCheck %s -check-prefix ELF-x86-64
# ELF-x86-64: .text
# COFF-i386: Contents of section .data:
# COFF-i386: 0000 48656c6c 6f20576f 726c6421 00 Hello World!.
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
# RUN: llvm-objdump -s %t.elf-i386 | FileCheck %s -DFILE=%t.elf-i386 -check-prefix ELF-i386
# ELF-i386: [[FILE]]: file format
-# RUN: yaml2obj %s > %t.elf-x86-64
+# RUN: yaml2obj %s -o %t.elf-x86-64
# RUN: llvm-objdump -h %t.elf-x86-64 | FileCheck %s
# To verify this, use readelf -S, not objdump -h. Binutils objdump filters the
# COFF-i386: [ 6](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _puts
# COFF-i386: [ 7](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _SomeOtherFunction
-# RUN: yaml2obj %s > %t.elf-i386
+# RUN: yaml2obj %s -o %t.elf-i386
# RUN: llvm-objdump -t %t.elf-i386 | FileCheck %s -check-prefix ELF-i386
# ELF-i386: {{.*}}elf-i386: file format
## Don't crash if required information is absent
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --dyn-syms %t
--- !ELF
-# RUN: yaml2obj %s > %t.wasm
+# RUN: yaml2obj %s -o %t.wasm
# RUN: echo -e -n "\x01" >> %t.wasm
# Append a new section but truncate the encoding of the section size
# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE
# CHECK-SECTION-SIZE: '{{.*}}.wasm': Section too large
-# RUN: yaml2obj %s > %t.wasm
+# RUN: yaml2obj %s -o %t.wasm
# # Append an section with invalid type (type 0x20, size 0x1, content 0x0)
# RUN: echo -e -n "\x20\x01\x00" >> %t.wasm
# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE
-# RUN: yaml2obj %s > %t.obj
+# RUN: yaml2obj %s -o %t.obj
# RUN: obj2yaml %t.obj | FileCheck --check-prefix=CHECK %s
# RUN: llvm-objdump -section-headers %t.obj | FileCheck --check-prefix=HEADERS %s
content: CDAB3412
## Case 2: The content size equals the section size.
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s --check-prefix=CASE2
# CASE2: Index: 0
# CASE2-NEXT: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
## Case 3: The content size is less than the section size. In this case, the area
## after the custom content is filled with zeroes.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-readobj --sections --section-data %t3 | FileCheck %s --check-prefix=CASE3
# CASE3: Index: 0
# CASE3-NEXT: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-elfabi --elf %t --emit-tbe=- --soname=best.so | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s --check-prefix=ORIGINAL
# RUN: llvm-elfabi --elf %t --emit-tbe=- --soname=libbest.so | FileCheck %s --check-prefix=REPLACED
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-elfabi --elf %t --emit-tbe=%t.tbe 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-elfabi --elf %t --emit-tbe=- | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Tests that the output for an unknown architecture is the same as cctools lipo
# RUN: llvm-lipo %t -archs | FileCheck %s
# CHECK: unknown(151,3)
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-lipo %t -archs | FileCheck --check-prefix=ARCHS %s
# RUN: llvm-lipo %t --archs | FileCheck --check-prefix=ARCHS %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-lipo %t -archs | FileCheck %s
# CHECK: armv7k arm64
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Tests that the output for an unknown architecture is the same as cctools lipo
# RUN: llvm-lipo %t -archs 2>&1 | FileCheck %s
# CHECK: i386 unknown(16777367,3)
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-lipo %t -archs | FileCheck %s
# CHECK: i386 x86_64
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
# RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal.o
# RUN: llvm-lipo %t-i386.o -arch x86_64 %t-x86_64.o -create -output %t-universal-1.o
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: llvm-ar cr %t.empty.a
# RUN: not llvm-lipo %t.empty.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=EMPTY-ARCHIVE %s
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/CPU14-slice.yaml > %t-CPU14.o
-# RUN: yaml2obj %p/Inputs/CPU10-slice.yaml > %t-CPU10.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/CPU14-slice.yaml -o %t-CPU14.o
+# RUN: yaml2obj %p/Inputs/CPU10-slice.yaml -o %t-CPU10.o
# RUN: llvm-lipo %t-i386.o %t-CPU14.o %t-CPU10.o -create -output %t-universal.o
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
# RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal-llvm.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: cmp %t-universal-llvm.o %t-universal.o
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
# RUN: llvm-lipo %t-arm64.o %t-armv7.o %t-universal.o -create -output %t-universal-2.o
# RUN: llvm-lipo %t-universal-2.o -thin x86_64 -output %t-x86_64_extracted.o
# Executable testing is not supported on Windows, since all files are considered executable
# UNSUPPORTED: system-windows
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
# RUN: chmod a-x %t-i386.o
# RUN: chmod a-x %t-x86_64.o
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-32.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-32.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: not llvm-lipo %t-32.o -create 2>&1 | FileCheck --check-prefix=NO_OUTPUT %s
# NO_OUTPUT: error: create expects a single output file to be specified
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: not llvm-lipo %t-universal.o -extract arm64_32 -output /dev/null 2>&1 | FileCheck --check-prefix=ARCH_NOT_IN_FILE %s
# ARCH_NOT_IN_FILE: does not contain the specified architecture arm64_32
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
# RUN: not llvm-lipo %t-i386.o -extract arm64_32 -output /dev/null 2>&1 | FileCheck --check-prefix=INPUT_NOT_A_FAT_FILE %s
# INPUT_NOT_A_FAT_FILE: must be a fat file when the -extract option is specified
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-lipo %t -info 2>&1 | FileCheck %s
# CHECK: has unsupported binary format
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o
-# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
+# RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: llvm-lipo %t-universal.o %t-i386.o %t-universal.o %t-x86_64.o -info | FileCheck %s
# CHECK: Architectures in the fat file:
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-32.o
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-32.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: not llvm-lipo %t-universal.o -replace %t-32.o 2>&1 | FileCheck --check-prefix=MISSING_ARG %s
# MISSING_ARG: error: replace is missing an argument: expects -replace arch_type file_name
-# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml > %t-armv7big.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml -o %t-armv7big.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml -o %t-universal.o
# RUN: llvm-lipo %t-universal.o -replace armv7 %t-armv7big.o -o %t.o
# RUN: llvm-objdump %t.o -m --universal-headers | FileCheck --check-prefix=ARMV7_BIG %s
# ARMV7_BIG: size 516
# ARMV7_BIG: align 2^14 (16384)
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/armv7_i386_non_default_alignment.yaml > %t-universal-align.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/armv7_i386_non_default_alignment.yaml -o %t-universal-align.o
# RUN: llvm-lipo %t-universal-align.o -replace armv7 %t-armv7.o -o %t2.o
# RUN: llvm-objdump %t2.o -m --universal-headers | FileCheck --check-prefix=ARMV7_ALIGN_SWAP %s
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
# RUN: not llvm-lipo %t-armv7.o %t-arm64.o -create -o %t.o -segalign a 2>&1 | FileCheck --check-prefix=MISSING_ARG %s
# MISSING_ARG: error: segalign is missing an argument: expects -segalign arch_type alignment_value
-# RUN: yaml2obj %p/Inputs/arm64-slice.yaml > %t-arm64.o
-# RUN: yaml2obj %p/Inputs/armv7-slice.yaml > %t-armv7.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/arm64-slice.yaml -o %t-arm64.o
+# RUN: yaml2obj %p/Inputs/armv7-slice.yaml -o %t-armv7.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# segalign expects an architecture type followed by a hexadecimal value for alignment
# RUN: llvm-lipo %t2.o -thin armv7 -o %thin-armv7.o
# RUN: cmp %thin-armv7.o %t-armv7.o
-# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml > %t-armv7-big.o
-# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml > %t-universal-big.o
+# RUN: yaml2obj %p/Inputs/armv7-slice-big.yaml -o %t-armv7-big.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-armv7-arm64-universal.yaml -o %t-universal-big.o
# RUN: llvm-lipo %t-universal-big.o -replace armv7 %t-armv7-big.o -o %t3.o -segalign armv7 4
# RUN: llvm-objdump %t3.o -m --universal-headers | FileCheck --check-prefix=CHECK_REPLACE_ARMV7 %s
# Executable testing is not supported on Windows, since all files are considered executable
# UNSUPPORTED: system-windows
-# RUN: yaml2obj %s > %t-universal.o
+# RUN: yaml2obj %s -o %t-universal.o
# RUN: chmod a-x %t-universal.o
# RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-lipo %t -thin i386 2>&1 | FileCheck --check-prefix=NO_OUTPUT %s
# NO_OUTPUT: error: thin expects a single output file
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-lipo %t -thin arm64_32 -output %t.out 2>&1 | FileCheck --check-prefix=ARCH_NOT_IN_FILE %s
# ARCH_NOT_IN_FILE: does not contain the specified architecture arm64_32 to thin it to
# RUN: not llvm-lipo %t -thin aarch101 -output %t.out 2>&1 | FileCheck --check-prefix=INVALID_ARCH %s
# INVALID_ARCH: Invalid architecture: aarch101
-# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml > %t-universal.o
+# RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
# RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o
-# RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-basic32.o
+# RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-basic32.o
# RUN: cmp %t32.o %t-basic32.o
--- !fat-mach-o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-lipo %t -verify_arch i386
# RUN: llvm-lipo %t --verify_arch i386
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-lipo %t -verify_arch i386
# RUN: llvm-lipo %t -verify_arch i386 x86_64
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Test --special-syms flag. Currently this flag is a no-op, so outputs with and without
# this flag should be identical. GNU nm doesn't show ARM and AArch64 special symbols
# without --special-syms, so this test is to be changed when/if we decide to implement
## When a file contains only local symbols the "no symbols" error should not
## be shown, so we expect the output to be completely empty.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o 2>&1 | count 0
!ELF
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o 2>&1 | FileCheck %s -DFILE=%t.o
!ELF
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o --portability | FileCheck %s --strict-whitespace --match-full-lines
# RUN: llvm-nm %t.o -P | FileCheck %s --strict-whitespace --match-full-lines
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm --debug-syms %t.o | FileCheck %s --implicit-check-not U
# RUN: llvm-nm -a %t.o | FileCheck %s --implicit-check-not U
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o --debug-syms --format=sysv | FileCheck %s -DFILE=%t.o --strict-whitespace
# RUN: llvm-nm %t.o --debug-syms -f=sysv | FileCheck %s -DFILE=%t.o --strict-whitespace
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
# RUN: llvm-nm %t1.o --format=sysv | FileCheck %s
--- !ELF
## (sh_name offset goes past the end of the sections name string table).
## We test that we can still print a reasonable output and don't crash/assert.
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
# RUN: llvm-nm %t2.o --format=sysv | FileCheck %s --check-prefix=ERR
# ERR: foo |0000000000000000| ? | NOTYPE|0000000000000000| |
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o --debug-syms --format=sysv | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o | FileCheck %s --check-prefix=DEFAULT
# RUN: llvm-nm --no-sort %t.o | FileCheck %s --check-prefix=NOSORT
# RUN: llvm-nm -p %t.o | FileCheck %s --check-prefix=NOSORT
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o | FileCheck %s --check-prefix=DEFAULT
# RUN: llvm-nm --numeric-sort %t.o | FileCheck %s --check-prefix=NUMERIC
# RUN: llvm-nm -n %t.o | FileCheck %s --check-prefix=NUMERIC
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm --undefined-only %t.o | FileCheck %s --implicit-check-not=symbol_defined
!ELF
-RUN: yaml2obj %p/Inputs/x86_64-exe.yaml > %t.in123.exe
+RUN: yaml2obj %p/Inputs/x86_64-exe.yaml -o %t.in123.exe
# Using a debuglink filename with a length that is a multiple of 4, to
# showcase padding in CONTENTS below.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Test that llvm-objcopy adds a section to the given object with expected
## contents.
## Test that llvm-objcopy can add a section to an object with extended
## relocations.
# RUN: %python %p/../Inputs/ungzip.py %p/Inputs/x86_64-obj-xrelocs.yaml.gz > %t.xrelocs.yaml
-# RUN: yaml2obj %t.xrelocs.yaml > %t.xrelocs.obj
+# RUN: yaml2obj %t.xrelocs.yaml -o %t.xrelocs.obj
# RUN: llvm-objcopy --add-section=.test.section=%t.sec %t.xrelocs.obj %t1.xrelocs.obj
# RUN: llvm-readobj --file-headers --sections --section-data %t1.xrelocs.obj | FileCheck %s --check-prefixes=CHECK-EXTENDED-RELOCS
- Alignment of section data
- Checksums
-RUN: yaml2obj %p/Inputs/i386-obj.yaml > %t.i386.o
+RUN: yaml2obj %p/Inputs/i386-obj.yaml -o %t.i386.o
RUN: llvm-objcopy %t.i386.o %t.i386-copy.o
RUN: obj2yaml %t.i386.o > %t.i386.o.yaml
RUN: obj2yaml %t.i386-copy.o > %t.i386-copy.o.yaml
RUN: cmp %t.i386.o.yaml %t.i386-copy.o.yaml
-RUN: yaml2obj %p/Inputs/x86_64-obj.yaml > %t.x86_64.o
+RUN: yaml2obj %p/Inputs/x86_64-obj.yaml -o %t.x86_64.o
RUN: llvm-objcopy %t.x86_64.o %t.x86_64-copy.o
RUN: obj2yaml %t.x86_64.o > %t.x86_64.o.yaml
RUN: obj2yaml %t.x86_64-copy.o > %t.x86_64-copy.o.yaml
RUN: cmp %t.x86_64.o.yaml %t.x86_64-copy.o.yaml
-RUN: yaml2obj %p/Inputs/i386-exe.yaml > %t.i386.exe
+RUN: yaml2obj %p/Inputs/i386-exe.yaml -o %t.i386.exe
RUN: llvm-objcopy %t.i386.exe %t.i386-copy.exe
RUN: obj2yaml %t.i386.exe > %t.i386.exe.yaml
RUN: obj2yaml %t.i386-copy.exe > %t.i386-copy.exe.yaml
RUN: cmp %t.i386.exe.yaml %t.i386-copy.exe.yaml
-RUN: yaml2obj %p/Inputs/x86_64-exe.yaml > %t.x86_64.exe
+RUN: yaml2obj %p/Inputs/x86_64-exe.yaml -o %t.x86_64.exe
RUN: llvm-objcopy %t.x86_64.exe %t.x86_64-copy.exe
RUN: obj2yaml %t.x86_64.exe > %t.x86_64.exe.yaml
RUN: obj2yaml %t.x86_64-copy.exe > %t.x86_64-copy.exe.yaml
RUN: cmp %t.x86_64.exe.yaml %t.x86_64-copy.exe.yaml
-RUN: yaml2obj %p/Inputs/no-symbols.yaml > %t.no-symbols.o
+RUN: yaml2obj %p/Inputs/no-symbols.yaml -o %t.no-symbols.o
RUN: llvm-objcopy %t.no-symbols.o %t.no-symbols-copy.o
RUN: obj2yaml %t.no-symbols.o > %t.no-symbols.o.yaml
RUN: obj2yaml %t.no-symbols-copy.o > %t.no-symbols-copy.o.yaml
-RUN: yaml2obj %p/Inputs/discard-locals.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/discard-locals.yaml -o %t.in.o
RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-RUN: yaml2obj %p/Inputs/only-keep-sections.yaml > %t.in.exe
+RUN: yaml2obj %p/Inputs/only-keep-sections.yaml -o %t.in.exe
RUN: llvm-objcopy --only-keep-debug %t.in.exe %t.out.exe
RUN: llvm-readobj --sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS
-RUN: yaml2obj %p/Inputs/only-keep-sections.yaml > %t.in.exe
+RUN: yaml2obj %p/Inputs/only-keep-sections.yaml -o %t.in.exe
RUN: llvm-objcopy --only-section .debug_discardable %t.in.exe %t.out.exe
RUN: llvm-objdump --section-headers -t %t.out.exe | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-DEBUG,SYMBOLS,SYMBOLS-DEBUG
-# RUN: yaml2obj %s > %t.in.exe
+# RUN: yaml2obj %s -o %t.in.exe
# RUN: llvm-objdump -s %t.in.exe | FileCheck %s --check-prefixes=CONTENTS,CONTENTS-PRE
# RUN: llvm-readobj --sections %t.in.exe | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-PRE
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
#
# RUN: llvm-objdump -section-headers %t.in.o | FileCheck %s --check-prefixes=SECTIONS-PRE
# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS-PRE
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
#
# RUN: llvm-objdump --section-headers %t.in.o | FileCheck %s --check-prefixes=SECTIONS,SECTIONS-PRE
# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.o
+RUN: yaml2obj %p/Inputs/strip-symbols.yaml -o %t.o
RUN: not llvm-objcopy -N foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
RUN: not llvm-objcopy --strip-symbol foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR
-RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/strip-symbols.yaml -o %t.in.o
RUN: llvm-readobj -r %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE
RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-RUN: yaml2obj %p/Inputs/discard-locals.yaml > %t.in.o
+RUN: yaml2obj %p/Inputs/discard-locals.yaml -o %t.in.o
RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-# RUN: yaml2obj %s > %t.in.o
+# RUN: yaml2obj %s -o %t.in.o
# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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: echo -e -n "\x08\x09\x0a\x0b" >> %t-note.bin
# RUN: echo -e -n "\x0c\x0d\x0e\x0f" >> %t-note.bin
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-objcopy --add-section=.note.gnu.build-id=%t-note.bin %t.o %t-with-note.o
# RUN: llvm-readobj --notes %t-with-note.o | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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
# By default, sections are SHT_PROGBITS, but .note sections (excluding
# .note.GNU-stack) are SHT_NOTE sections.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-objcopy --add-section=.foo=/dev/null %t.o %t-foo.o
# RUN: llvm-objcopy --add-section=.note.foo=/dev/null %t.o %t-regular-note.o
# RUN: llvm-objcopy --add-section=.note.GNU-stack=/dev/null %t.o %t-gnu-stack.o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --remove-section=.text.bar %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s
# CHECK: build ID is smaller than two bytes
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: not llvm-objcopy -O xyz %t.o %t.2.o 2>&1 \
# RUN: | FileCheck %s --check-prefix=BAD-OUTPUT-FORMAT
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: rm -f %t.a
# RUN: llvm-ar crs %t.a %t
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --relocations %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: mkdir -p %t-dir
# RUN: llvm-objcopy --build-id-link-dir=%t-dir %t %t2
# REQUIRES: system-windows
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: rm -f %t2.o
# RUN: cp %t.o %t2.o
# RUN: attrib +r %t2.o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers %t2 | FileCheck %s
# and DWO output.
# Note that we don't actually need any DWARF to produce the DWO file.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Without --output-format, the format should match the input.
# RUN: llvm-objcopy %t.o %t.default.o --split-dwo=%t.default.dwo
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Preserve input to verify it is not modified.
# RUN: cp %t.o %t-copy.o
# RUN: llvm-objcopy %t.o -O elf64-x86-64 %t.2.o
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Create an archive, specifying U so that timestamps/etc. are preserved.
# We only test timestamps as a proxy for full deterministic writing; i.e. we
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy --discard-all %t %t2
# Verify that llvm-objcopy has not modified the input.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --discard-locals %t %t2 2>&1 | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy --discard-locals %t %t2
# Verify that llvm-objcopy has not modified the input.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Establish baseline objects for further checks. --discard-locals only discards
# compiler-generated local symbols (starting with .L), --discard-all discards
# all regular local symbols.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary -j .text %t %t2
# RUN: llvm-objcopy -O binary --only-section .text %t %t3
# RUN: llvm-objcopy --dump-section .text=%t4 %t %t5
## Check that llvm-objcopy can handle an object
## containing dynamic relocations properly.
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
# RUN: llvm-objcopy %t1 %t2
# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t\r
+# RUN: yaml2obj %s -o %t\r
# RUN: llvm-objcopy -R .got.plt %t %t2\r
\r
## .rela.plt is a dynamic relocation section that has a connection\r
-# RUN: yaml2obj %s > %t\r
+# RUN: yaml2obj %s -o %t\r
\r
## Check we cannot remove the .dynsym symbol table because dynamic\r
## relocation section .rela.dyn still references it via sh_link field.\r
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R=.test --keep-section=.test %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R=.test --only-section=.test %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy %t no/such/dir 2>&1 | FileCheck %s
# Don't check "No such file" which is OS dependent.
# CHECK: 'no/such/dir':
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --globalize-symbol Global \
# RUN: --globalize-symbol Local \
# RUN: --globalize-symbol Weak \
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy %t %t2 2>&1 | FileCheck %s
# CHECK: error: invalid alignment 1 of group section '.group'
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --remove-section=.text.bar %t %t2
# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-objcopy %t.o %t.2.o
# RUN: llvm-readelf --elf-section-groups --sections %t.o | FileCheck %s --check-prefix=IN
# RUN: llvm-readelf --elf-section-groups --sections %t.2.o | FileCheck %s --check-prefix=OUT
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --remove-section=.text.bar %t %t2
# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --remove-section=.text.bar %t %t2
# RUN: llvm-readobj --elf-section-groups %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy %t %t2 2>&1 >/dev/null | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-all --keep-file-symbols %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIPALL
# RUN: llvm-objcopy --keep-file-symbols --strip-symbol foo %t %t2
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Tests --keep-global-symbol when used in combination with --globalize-symbol on
# a different symbol.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Tests that only global symbols (via -G/--keep-global-symbols) are kept via
# the several different variants of -G/--keep-global-symbol(s).
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-non-alloc --keep-section=.test --keep-section=.test3 %t %t2
# RUN: llvm-objcopy --strip-non-alloc --regex --keep-section='^.test[0-9]+$' %t %t3
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --remove-section .text --keep-symbol foo %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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-objcopy --discard-all --regex -K '^ba.*' %t %t4
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --localize-hidden %t %t2
# RUN: llvm-readobj --relocations --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy \
# RUN: --localize-symbol Global \
# RUN: -L GlobalUndef \
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s
# CHECK: could not find build ID
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --build-id-link-dir=%t-dir --build-id-link-input=.debug %t 2>&1 >/dev/null | FileCheck %s -DINPUT=%t
# CHECK: error: '[[INPUT]]': could not find build ID
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-objcopy %t1 %t2
# RUN: llvm-readobj --relocations %t2 | FileCheck %s
## Check we produce a valid output when stripping unneeded symbols from an object that
## has a symbol table and a relocation with a symbol index of 0.
-# RUN: yaml2obj --docnum=2 %s > %t3
+# RUN: yaml2obj --docnum=2 %s -o %t3
# RUN: llvm-objcopy --strip-unneeded %t3 %t4
# RUN: llvm-readobj --relocations --sections --symbols %t4 | FileCheck %s --check-prefix=STRIP
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -j .test1 -j .test2 %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-non-alloc --only-section=.test %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
## Check that llvm-objcopy can correctly add a prefix to
## a dynamic relocation section and its target section.
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
# RUN: llvm-objcopy --prefix-alloc-sections=.prefix %t1 %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --prefix-alloc-sections=.prefix %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --prefix-symbols prefix %t %t2
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --redefine-sym foo=oof --redefine-sym empty= %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
# RUN: echo " bar rab #rename bar " > %t.rename1.txt
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# No symbol matches, because pattern is implicitly enveloped in '^$'
# RUN: llvm-objcopy --discard-all --regex -K 'ba' %t %t2
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy -R .symtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
# RUN: cp %t %t3
# RUN: not llvm-strip --no-strip-all -R .symtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3
# $ llvm-strip /tmp/a -o /tmp/b
# llvm-strip: error: Link field value 0 in section .rela.plt is invalid.
-# RUN: yaml2obj %s > %t.original
+# RUN: yaml2obj %s -o %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
# This test ensures an object without a program header will retain zero values
# for offset and header size when copied with llvm-objcopy.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R .test2 -R .test3 -R .test5 %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R .test %t %t2
# RUN: llvm-readobj --file-headers --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy -R .test2 %t %t2
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy -R .shstrtab %t %t2 2>&1 >/dev/null | FileCheck %s -DINPUT=%t
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R .symtab %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --rename-section=.text=.text2 --rename-section=.data=.data2 --prefix-alloc-sections=.prefix %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
# ===== x86_64 =====
-# RUN: yaml2obj --docnum 1 %s > %t-x86_64.o
+# RUN: yaml2obj --docnum=1 %s -o %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
# ===== hex =====
-# RUN: yaml2obj --docnum 2 %s > %t-hex.o
+# RUN: yaml2obj --docnum=2 %s -o %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
# ===== mips =====
-# RUN: yaml2obj --docnum 3 %s > %t-mips.o
+# RUN: yaml2obj --docnum=3 %s -o %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
# ===== arm =====
-# RUN: yaml2obj --docnum 4 %s > %t-arm.o
+# RUN: yaml2obj --docnum=4 %s -o %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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Single flags on a section with all flags:
# RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Single flags on a section with no flags:
# RUN: llvm-objcopy --rename-section=.foo=.bar,alloc \
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --rename-section=.foo=.bar %t %t2
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy %t %t2 2>&1 >/dev/null | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --rename-section=.foo=.bar --set-section-flags=.foo=alloc %t %t.2 2>&1 | FileCheck %s --check-prefix=SET-FOO
# RUN: not llvm-objcopy --rename-section=.foo=.bar --set-section-flags=.bar=alloc %t %t.2 2>&1 | FileCheck %s --check-prefix=SET-BAR
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --set-section-flags=.foo=alloc --set-section-flags=.bar=code %t %t.2
# RUN: llvm-readobj --sections %t.2 | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# Single flags on a section with no flags:
# RUN: llvm-objcopy --set-section-flags=.foo=alloc \
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy --strip-all --keep-symbol foo %t %t2
# RUN: llvm-readobj --sections --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-strip --remove-section=.text.bar %t
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t3
# RUN: llvm-objcopy --strip-all %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-strip --strip-debug --remove-section=.text.bar %t
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t3
# RUN: llvm-objcopy --strip-debug %t %t2
# RUN: llvm-readobj --file-headers --sections --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy -N foo %t %t2 2>&1 | FileCheck %s
--- !ELF
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# Run llvm-strip normally. This will create a stripped object file for later
# tests so we only have to run FileCheck on it once.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-non-alloc %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
## .ARM.attributes sections in ELF files. This is needed to maintain
## compatibility for Ubuntu/Debian distributions on ARM.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-all %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
# RUN: llvm-objcopy --strip-all-gnu %t %t3
# UNSUPPORTED: system-netbsd
# Preserve dates when stripping to an output file.
-# RUN: yaml2obj %s > %t.1.o
+# RUN: yaml2obj %s -o %t.1.o
# RUN: touch -a -t 199505050555.55 %t.1.o
# RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
# RUN: ls -lu %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
# RUN: llvm-readobj %t-preserved.1.o
# Preserve dates available via objcopy interface as well.
-# RUN: yaml2obj %s > %t.2.o
+# RUN: yaml2obj %s -o %t.2.o
# RUN: touch -a -t 199505050555.55 %t.2.o
# RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
# RUN: ls -lu %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
# RUN: llvm-readobj %t-preserved.2.o
# Preserve dates when stripping in place.
-# RUN: yaml2obj %s > %t.3.o
+# RUN: yaml2obj %s -o %t.3.o
# RUN: touch -a -t 199505050555.55 %t.3.o
# RUN: llvm-strip -p %t.3.o
# RUN: ls -lu %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
# RUN: llvm-readobj %t.3.o
# Without -p set, don't preserve dates.
-# RUN: yaml2obj %s > %t.4.o
+# RUN: yaml2obj %s -o %t.4.o
# RUN: touch -a -t 199505050555.55 %t.4.o
# RUN: llvm-strip %t.4.o
# RUN: ls -lu %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-ATIME
# RUN: llvm-readobj %t.4.o
# Preserve dates in archives.
-# RUN: yaml2obj %s > %t.5.o
+# RUN: yaml2obj %s -o %t.5.o
# RUN: rm -f %t.a
# RUN: llvm-ar cr %t.a %t.5.o
# RUN: touch -a -t 199505050555.55 %t.a
# Note: ls -l prints the modified timestamp
# Preserve dates when stripping to an output file.
-# RUN: yaml2obj %s > %t.1.o
+# RUN: yaml2obj %s -o %t.1.o
# RUN: touch -m -t 199705050555.55 %t.1.o
# RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
# RUN: ls -l %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
# RUN: llvm-readobj %t-preserved.1.o
# Preserve dates available via objcopy interface as well.
-# RUN: yaml2obj %s > %t.2.o
+# RUN: yaml2obj %s -o %t.2.o
# RUN: touch -m -t 199705050555.55 %t.2.o
# RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
# RUN: ls -l %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
# RUN: llvm-readobj %t-preserved.2.o
# Preserve dates when stripping in place.
-# RUN: yaml2obj %s > %t.3.o
+# RUN: yaml2obj %s -o %t.3.o
# RUN: touch -m -t 199705050555.55 %t.3.o
# RUN: llvm-strip -p %t.3.o
# RUN: ls -l %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
# RUN: llvm-readobj %t.3.o
# Without -p set, don't preserve dates.
-# RUN: yaml2obj %s > %t.4.o
+# RUN: yaml2obj %s -o %t.4.o
# RUN: touch -m -t 199705050555.55 %t.4.o
# RUN: llvm-strip %t.4.o
# RUN: ls -l %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-MTIME
# RUN: llvm-readobj %t.4.o
# Preserve dates in archives.
-# RUN: yaml2obj %s > %t.5.o
+# RUN: yaml2obj %s -o %t.5.o
# RUN: rm -f %t.a
# RUN: llvm-ar cr %t.a %t.5.o
# RUN: touch -m -t 199705050555.55 %t.a
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy -N foo %t %t2 2>&1 | FileCheck %s
!ELF
## Check we cannot remove a section containing symbols
## referenced by relocations contained in the object.
-# RUN: yaml2obj %s > %t1
+# RUN: yaml2obj %s -o %t1
# RUN: not llvm-objcopy -R .data %t1 2>&1 | FileCheck %s -DINPUT=%t1
# CHECK: error: '[[INPUT]]': section '.data' cannot be removed: (.text+0x1) has relocation against symbol 'foo'
## Check the behavior when we also remove the relocation section.
## We have no reference in this case and hence no error should be emitted.
-# RUN: yaml2obj %s > %t2
+# RUN: yaml2obj %s -o %t2
# RUN: llvm-objcopy -R .data -R .rela.text %t2 %t3
# RUN: llvm-objdump --section-headers %t3 | FileCheck %s --check-prefix=NOSEC
# NOSEC-NOT: .data
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-sections --keep-section=.shstrtab %t %t2
# RUN: od -Ax -t c %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# 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: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-sections %t %t2
# RUN: llvm-readobj --file-headers --program-headers %t2 | FileCheck %s
# RUN: od -t x1 -j 4096 -N 12 %t2 | FileCheck %s --ignore-case --check-prefix=DATA
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Check we are able to strip all symbols and relocatable information at the same time.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --strip-symbol baz -N bar %t %t2
# RUN: llvm-readobj --symbols --sections %t2 | FileCheck %s
# RUN: llvm-strip --strip-symbol baz -N bar %t -o %t3
## eliminate the static symbol table, because it's not used
## by the dynamic loader.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy --strip-unneeded %t %t2
# RUN: llvm-readobj --section-headers %t2 | FileCheck %s
## Verifies that running with --strip-unneeded removes debugging sections but
## retains the .gnu_debuglink section.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: touch %t.debug
# RUN: llvm-objcopy --add-gnu-debuglink=%t.debug %t.o %t.2.o
# RUN: llvm-strip --strip-unneeded %t.2.o -o %t.3.o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: cp %t %t1
# RUN: llvm-objcopy --strip-unneeded %t %t2
# Verify that llvm-objcopy has not modified the input.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2 --add-symbol='foo=1' --add-symbol='foofoo=2'
# RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy -R .strtab %t %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t
# RUN: cp %t %t3
# RUN: not llvm-strip --no-strip-all -R .strtab %t3 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t3
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --sections %t2 | FileCheck %s
# RUN: cp %t %t3
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --weaken %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --weaken-symbol Global -W Local -W Weak %t %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
# RUN: llvm-objcopy --regex --weaken-symbol='.*' %t %t3
## are configured correctly.
## For more detailed syntax tests, see wildcard-syntax.test.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
## Check that --regex and --wildcard cannot be used together.
# RUN: not llvm-objcopy --regex --wildcard %t.o %t.err.o 2>&1 \
## This test checks that llvm-objcopy accepts glob (or "shell wildcard") syntax
## for the --wildcard (-w) flag correctly.
-# RUN: yaml2obj --docnum=1 %s > %t.o
+# RUN: yaml2obj --docnum=1 %s -o %t.o
## * matches all characters.
# RUN: llvm-objcopy --remove-section='.f*' %t.o %t.glob.o
## Use a separate test file with special characters for the following tests.
-# RUN: yaml2obj --docnum=2 %s > %t.special.o
+# RUN: yaml2obj --docnum=2 %s -o %t.special.o
## \ escapes wildcard characters.
# RUN: llvm-objcopy --remove-section='\*' %t.special.o %t.escape.1.o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: cmp %t %t2
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: cmp %t %t2
## uses llvm-readobj instead of cmp because some parts of the object
## (e.g., the string table) are not identical; the output file is correct but
## some offsets differ from the input file.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: cmp %t %t2
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy %t %t2
# RUN: cmp %t %t2
## This test checks adding a new LC_RPATH load command to a MachO binary.
-# RUN: yaml2obj %p/Inputs/i386.yaml > %t.i386
+# RUN: yaml2obj %p/Inputs/i386.yaml -o %t.i386
# RUN: llvm-install-name-tool -add_rpath @executable_path/. %t.i386
# RUN: llvm-objdump -p %t.i386 | FileCheck --check-prefix=NEW-RPATH %s
-# RUN: yaml2obj %p/Inputs/x86_64.yaml > %t.x86_64
+# RUN: yaml2obj %p/Inputs/x86_64.yaml -o %t.x86_64
# RUN: llvm-install-name-tool -add_rpath @executable_path/. %t.x86_64
# RUN: llvm-objdump -p %t.x86_64 | FileCheck --check-prefix=NEW-RPATH %s
## load command of this type (LC_VERSION_MIN_IPHONEOS, LC_VERSION_MIN_MACOSX,
## LC_VERSION_MIN_TVOS, LC_VERSION_MIN_WATCHOS).
-# RUN: yaml2obj %p/Inputs/min_iphoneos_version_lc.yaml > %t.iphoneos
+# RUN: yaml2obj %p/Inputs/min_iphoneos_version_lc.yaml -o %t.iphoneos
# RUN: llvm-objcopy %t.iphoneos %t.iphoneos.copy
# RUN: cmp %t.iphoneos %t.iphoneos.copy
-# RUN: yaml2obj %p/Inputs/min_macos_version_lc.yaml > %t.macos
+# RUN: yaml2obj %p/Inputs/min_macos_version_lc.yaml -o %t.macos
# RUN: llvm-objcopy %t.macos %t.macos.copy
# RUN: cmp %t.macos %t.macos.copy
-# RUN: yaml2obj %p/Inputs/min_tvos_version_lc.yaml > %t.tvos
+# RUN: yaml2obj %p/Inputs/min_tvos_version_lc.yaml -o %t.tvos
# RUN: llvm-objcopy %t.tvos %t.tvos.copy
# RUN: cmp %t.tvos %t.tvos.copy
-# RUN: yaml2obj %p/Inputs/min_watchos_version_lc.yaml > %t.watchos
+# RUN: yaml2obj %p/Inputs/min_watchos_version_lc.yaml -o %t.watchos
# RUN: llvm-objcopy %t.watchos %t.watchos.copy
# RUN: cmp %t.watchos %t.watchos.copy
## Show that if --only-section is given, llvm-objcopy removes all sections
## except ones specified in the option.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Specify all sections. The output file should be the same as the input.
# RUN: llvm-objcopy -j __TEXT,__text -j __DATA,__data -j __TEXT,__const %t %t2
## Show that if --remove-section is given, llvm-objcopy removes sections
## specified by the option.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Remove only __TEXT,__text section.
# RUN: llvm-objcopy --remove-section __TEXT,__text %t %t2
## Show that llvm-objcopy/llvm-strip removes all symbols and debug sections.
-# RUN: yaml2obj %p/Inputs/strip-all.yaml > %t.exec
-# RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml > %t.dwarf
+# RUN: yaml2obj %p/Inputs/strip-all.yaml -o %t.exec
+# RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml -o %t.dwarf
## Check that the symbol list satisfies the order: local / defined external /
## undefined external, otherwise llvm-objcopy will fail.
## Test common parsing errors general to all supported binary formats.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: not llvm-objcopy --redefine-sym bar %t /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
# BAD-FORMAT: bad format for --redefine-sym
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump --all-headers -D -z %t | FileCheck %s --check-prefixes=COMMON,NOADJUST
# RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x0 %t | FileCheck %s --check-prefixes=COMMON,NOADJUST
# RUN: llvm-objdump --all-headers -D -z --adjust-vma=0x123000 %t | FileCheck %s --check-prefixes=COMMON,ADJUST
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -d -C %t | FileCheck --check-prefix=DEMANGLE %s
# RUN: llvm-objdump -d --demangle %t | FileCheck --check-prefix=DEMANGLE %s
# RUN: llvm-objdump -d %t | FileCheck --check-prefix=NO-DEMANGLE %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Check we do not skip zeroes blocks if have relocations pointed to these places.
# RUN: llvm-objdump -D --reloc %t
## Check that when BSS is larger than the file llvm-objdump doesn't
## assert with an unexpected end of file error.
-# RUN: yaml2obj --docnum=1 %s > %t
-# RUN: yaml2obj --docnum=2 %s > %t.2
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: yaml2obj --docnum=2 %s -o %t.2
# RUN: llvm-objdump -D %t | FileCheck %s
# RUN: llvm-objdump -D %t.2 | FileCheck %s
Relocations: []
## Check ranges of addends being displayed in a dump of relocations mixed with disassembly.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-objdump -d -r %t3 | FileCheck %s --check-prefix=ADDENDS
# ADDENDS: Disassembly of section .text:
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-objdump --file-headers --private-headers --section-headers --syms \
# RUN: --full-contents --dwarf=frames \
# RUN: --reloc %t.o | FileCheck %s --check-prefixes=CHECK,RELOC
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## Check we print both VMA and LMA correctly when dumping section headers.
# RUN: llvm-objdump --section-headers %t | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
## If there are no sections with different LMA to VMA,
## we do not display LMA column.
Sections:
- Section: .dynamic
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-objdump -p %t2 | FileCheck %s --strict-whitespace --match-full-lines --check-prefix=ELF32
# ELF32:Dynamic Section:
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -f %t | FileCheck %s -DFILE=%t
# RUN: llvm-objdump -file-headers %t | FileCheck %s -DFILE=%t
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-objdump -f %t | FileCheck %s -DFILE=%t -check-prefix ELF64
# RUN: llvm-objdump -file-headers %t | FileCheck %s -DFILE=%t -check-prefix ELF64
# ELF64: architecture: x86_64
# ELF64: start address: 0x00123456789abcde
-# RUN: yaml2obj --docnum=2 %s > %t-i386
+# RUN: yaml2obj --docnum=2 %s -o %t-i386
# RUN: llvm-objdump -f %t-i386 | FileCheck -DFILE=%t-i386 %s -check-prefix ELF32
# RUN: llvm-objdump -file-headers %t-i386 | FileCheck %s -DFILE=%t-i386 -check-prefix ELF32
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -f %t | FileCheck %s
# RUN: llvm-objdump -file-headers %t | FileCheck %s
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump --full-contents %t > %t.out1
# RUN: llvm-objdump -s %t > %t.out2
# RUN: cmp %t.out1 %t.out2
-#RUN: yaml2obj %s > %t1.dylib
+#RUN: yaml2obj %s -o %t1.dylib
#RUN: not llvm-objdump -d %t1.dylib 2>&1 | FileCheck %s
--- !mach-o
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -a %t | FileCheck %s
# If this test has not crashed, then this test passed.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -p %t | FileCheck %s
!ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -p %t | FileCheck %s
!ELF
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-objdump --reloc %t > %t1
# RUN: llvm-objdump -r %t > %t2
# RUN: cmp %t1 %t2
## Check we report an error if the relocated section identified by the
## sh_info field of a relocation section is invalid.
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: not llvm-objdump --reloc %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERR
# ERR: error: '[[FILE]]': section (1): unable to get a relocation target: invalid section index: 255
Type: R_X86_64_NONE
## Check ranges of addends being displayed in a dump of relocations.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-objdump -r %t3 | FileCheck %s --check-prefix=ADDENDS
# ADDENDS: RELOCATION RECORDS FOR [.text]:
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump --syms %t > %t1
# RUN: llvm-objdump -t %t > %t2
# RUN: cmp %t1 %t2
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -p %t | FileCheck --strict-whitespace %s
# CHECK: Version definitions:
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -p %t | FileCheck %s
# CHECK: Version References:
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -p %t 2>&1 | FileCheck %s
# We have a SHT_GNU_verneed section with a broken sh_info field
## do not intersect with address ranges of sections that have the SHF_ALLOC
## flag.
-# RUN: yaml2obj --docnum=1 %s > %t
-# RUN: yaml2obj --docnum=2 %s > %t.2
-# RUN: yaml2obj --docnum=3 %s > %t.o
-# RUN: yaml2obj --docnum=4 %s > %t.3
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: yaml2obj --docnum=2 %s -o %t.2
+# RUN: yaml2obj --docnum=3 %s -o %t.o
+# RUN: yaml2obj --docnum=4 %s -o %t.3
## Warn if no section covers any part of the specified range.
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
# RUN: llvm-readobj --unwind %t.exe | FileCheck %s
# CHECK: RuntimeFunction {
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
# RUN: llvm-readobj --unwind %t.exe | FileCheck %s
# CHECK: RuntimeFunction {
## Show that llvm-readelf + llvm-readobj demangle symbol names in symbol tables
## (including dynamic symbols), relocations (including dynamic relocations), and groups.
-# RUN: yaml2obj %s > %t.so
+# RUN: yaml2obj %s -o %t.so
## Check LLVM output style.
# RUN: llvm-readobj --symbols --relocations --dyn-symbols --dyn-relocations \
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readelf --notes %t | FileCheck %s --check-prefix=GNU
# RUN: llvm-readobj --elf-output-style LLVM --notes %t | FileCheck %s --check-prefix=LLVM
## Test tools are able to dump different types of notes.
-# RUN: yaml2obj --docnum=1 %s > %t1.so
+# RUN: yaml2obj --docnum=1 %s -o %t1.so
# RUN: llvm-readelf --notes %t1.so | FileCheck %s --check-prefix=GNU --strict-whitespace --match-full-lines
# RUN: llvm-readobj --notes %t1.so | FileCheck %s --check-prefix=LLVM
# RUN: llvm-objcopy --strip-sections %t1.so %t1.stripped.so
## Test tools report an error if a note section has an invalid offset
## that goes past the end of file.
-# RUN: yaml2obj --docnum=2 %s > %t2.so
+# RUN: yaml2obj --docnum=2 %s -o %t2.so
# RUN: not llvm-readelf --notes %t2.so 2>&1 | FileCheck -DFILE=%t2.so %s --check-prefix=ERR1
# RUN: not llvm-readobj --notes %t2.so 2>&1 | FileCheck -DFILE=%t2.so %s --check-prefix=ERR1
## Test tools report an error if a note section has invalid size
## that goes past the end of file.
-# RUN: yaml2obj --docnum=3 %s > %t3.so
+# RUN: yaml2obj --docnum=3 %s -o %t3.so
# RUN: not llvm-readelf --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s --check-prefix=ERR2
# RUN: not llvm-readobj --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s --check-prefix=ERR2
## Test tools report an error if a note program header has an invalid offset that
## goes past the end of file.
-# RUN: yaml2obj --docnum=4 %s > %t4.so
+# RUN: yaml2obj --docnum=4 %s -o %t4.so
# RUN: not llvm-readelf --notes %t4.so 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefix=ERR3
# RUN: not llvm-readobj --notes %t4.so 2>&1 | FileCheck -DFILE=%t4.so %s --check-prefix=ERR3
## Test tools report an error if a note program header has an invalid size that
## goes past the end of file.
-# RUN: yaml2obj --docnum=5 %s > %t5.so
+# RUN: yaml2obj --docnum=5 %s -o %t5.so
# RUN: not llvm-readelf --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so %s --check-prefix=ERR4
# RUN: not llvm-readobj --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so %s --check-prefix=ERR4
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
## Test that NT_FILE sections in core files are interpreted correctly.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
# RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
## Test that note values are interpreted correctly for core files.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
# RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj --demangle -r %t.o | FileCheck %s --check-prefix LLVM
# RUN: llvm-readelf --demangle -r %t.o | FileCheck %s --check-prefix GNU
## Check that we correctly display the contents of the .stack_sizes section
## in a relocatable object file.
-# RUN: yaml2obj --docnum=1 %s > %t01
+# RUN: yaml2obj --docnum=1 %s -o %t01
# RUN: llvm-readelf --stack-sizes %t01 \
# RUN: | FileCheck %s --check-prefix=RELOC-GNU --strict-whitespace --match-full-lines
# RUN: llvm-readobj --stack-sizes %t01 | FileCheck %s --check-prefix=RELOC-LLVM
## Check that we correctly report the stack sizes in an executable (non-relocatable)
## object file.
-# RUN: yaml2obj --docnum=2 %s > %t02
+# RUN: yaml2obj --docnum=2 %s -o %t02
# RUN: llvm-readelf --stack-sizes %t02 \
# RUN: | FileCheck %s --check-prefix=EXEC-GNU --strict-whitespace --match-full-lines
# RUN: llvm-readobj --stack-sizes %t02 | FileCheck %s --check-prefix=EXEC-LLVM
## Check that we report an error when we find relocations whose offsets point outside
## of the .stack_sizes section.
-# RUN: yaml2obj --docnum=3 %s > %t03
+# RUN: yaml2obj --docnum=3 %s -o %t03
# RUN: not llvm-readelf --stack-sizes %t03 2>&1 | FileCheck %s --check-prefix=SHORT -DFILE=%t03
# RUN: not llvm-readobj --stack-sizes %t03 2>&1 | FileCheck %s --check-prefix=SHORT -DFILE=%t03
## Check that we warn about a function symbol that is not in the section
## that is referenced by the stack sizes section's sh_link.
-# RUN: yaml2obj --docnum=4 %s > %t04
+# RUN: yaml2obj --docnum=4 %s -o %t04
# RUN: llvm-readelf --stack-sizes %t04 2> %t04-gnu.err | FileCheck %s --check-prefix=WRONGSECTION-GNU
# RUN: FileCheck %s < %t04-gnu.err --check-prefix=WRONGSECTION-ERR -DFILE=%t04
# RUN: llvm-readobj --stack-sizes %t04 2> %t04-llvm.err | FileCheck %s --check-prefix=WRONGSECTION-LLVM
## Check that we report an error when a stack sizes section ends with an incomplete stack size entry.
-# RUN: yaml2obj --docnum=5 %s > %t05
+# RUN: yaml2obj --docnum=5 %s -o %t05
# RUN: not llvm-readelf --stack-sizes %t05 2>&1 | \
# RUN: FileCheck %s --check-prefix=SUDDENEND -DFILE=%t05
# RUN: not llvm-readobj --stack-sizes %t05 2>&1 | \
## Check that we report an invalid stack size, which is represented by a ULEB that
## ends in a byte with the high bit set.
-# RUN: yaml2obj --docnum=6 %s > %t06
+# RUN: yaml2obj --docnum=6 %s -o %t06
# RUN: not llvm-readelf --stack-sizes %t06 2>&1 | FileCheck %s --check-prefix=BADSIZE -DFILE=%t06
# RUN: not llvm-readobj --stack-sizes %t06 2>&1 | FileCheck %s --check-prefix=BADSIZE -DFILE=%t06
## valid section. We expect a stack size entry with an unknown symbol in the
## output.
-# RUN: yaml2obj --docnum=7 %s > %t07
+# RUN: yaml2obj --docnum=7 %s -o %t07
# RUN: llvm-readelf --stack-sizes %t07 2> %t07-gnu.err | FileCheck %s --check-prefix=BADSECTION-OUT-GNU
# RUN: FileCheck %s < %t07-gnu.err --check-prefix=BADSECTION-ERR -DFILE=%t07
# RUN: llvm-readobj --stack-sizes %t07 2> %t07-llvm.err | FileCheck %s --check-prefix=BADSECTION-OUT-LLVM
## Check that we report a warning when a stack sizes section does not come with
## a corresponding relocation section.
-# RUN: yaml2obj --docnum=8 %s > %t08
+# RUN: yaml2obj --docnum=8 %s -o %t08
# RUN: llvm-readelf --stack-sizes %t08 2> %t08-gnu.err | FileCheck %s --check-prefix=NORELOCSECTION-OUT-GNU
# RUN: FileCheck %s < %t08-gnu.err --check-prefix=NORELOCSECTION-ERR -DFILE=%t08
# RUN: llvm-readobj --stack-sizes %t08 2> %t08-llvm.err | FileCheck %s --check-prefix=NORELOCSECTION-OUT-LLVM
## Check that we do not consider symbols that are not function symbols, even though
## a relocation references them.
-# RUN: yaml2obj --docnum=9 %s > %t14
+# RUN: yaml2obj --docnum=9 %s -o %t14
# RUN: llvm-readelf --stack-sizes %t14 2> %t14-gnu.err | FileCheck %s --check-prefix=NONFUNCTIONSYM-GNU
# RUN: FileCheck %s < %t14-gnu.err --check-prefix=NONFUNCTIONSYM-ERR -DFILE=%t14
# RUN: llvm-readobj --stack-sizes %t14 2> %t14-llvm.err | FileCheck %s --check-prefix=NONFUNCTIONSYM-LLVM
## Check that we report an error when we find an unsupported relocation
## in the section that contains the stack size entries' relocations.
-# RUN: yaml2obj --docnum=10 %s > %t15
+# RUN: yaml2obj --docnum=10 %s -o %t15
# RUN: not llvm-readelf --stack-sizes %t15 2>&1 | FileCheck %s --check-prefix=UNSUPPRELOC -DFILE=%t15
# RUN: not llvm-readobj --stack-sizes %t15 2>&1 | FileCheck %s --check-prefix=UNSUPPRELOC -DFILE=%t15
## Check that we demangle function names when requested.
-# RUN: yaml2obj --docnum=11 %s > %t16
+# RUN: yaml2obj --docnum=11 %s -o %t16
# RUN: llvm-readelf --stack-sizes --demangle %t16 | FileCheck %s --check-prefix=DEMANGLE-GNU
# RUN: llvm-readobj --stack-sizes --demangle %t16 | FileCheck %s --check-prefix=DEMANGLE-LLVM
## Check that we report an error when we are unable to resolve a relocation for a given ELF architecture.
## Here we have a 64-bit relocation used in a 32-bit object.
-# RUN: yaml2obj --docnum=12 %s > %t17
+# RUN: yaml2obj --docnum=12 %s -o %t17
# RUN: not llvm-readelf --stack-sizes %t17 2>&1 | FileCheck %s -DFILE=%t17 --check-prefix=UNSUPPRELOC2
# RUN: not llvm-readobj --stack-sizes %t17 2>&1 | FileCheck %s -DFILE=%t17 --check-prefix=UNSUPPRELOC2
## identified by the sh_info field is invalid. Here the sh_info value is larger than
## the number of sections.
-# RUN: yaml2obj --docnum=13 %s > %t18
+# RUN: yaml2obj --docnum=13 %s -o %t18
# RUN: not llvm-readelf --stack-sizes %t18 2>&1 | FileCheck %s -DFILE=%t18 --check-prefix=INVALID-TARGET
# RUN: not llvm-readobj --stack-sizes %t18 2>&1 | FileCheck %s -DFILE=%t18 --check-prefix=INVALID-TARGET
# Check the dumping of a section as strings.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --string-dump=.strings \
# RUN: --string-dump=.not_null_terminated %t > %t.readobj.out
# Show that both GNU and LLVM styles can properly print symbol values and sizes
# that do not fit in 32-bit integers.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --symbols %t | FileCheck %s --check-prefix=GNU
# Show that llvm-readobj can print symbol bindings correctly for both LLVM and
# GNU styles, including for symbol bindings that are not recognised.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --symbols --dyn-symbols %t | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --symbols --dyn-symbols %t | FileCheck %s --check-prefix=GNU
## section), reserved values and processor/os-specific index values, for both GNU
## and LLVM styles.
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readobj --symbols %t1 | FileCheck %s --check-prefix=LLVM1
# RUN: llvm-readelf --symbols %t1 | FileCheck %s --check-prefix=GNU1
## In this case, the index does not correspond to a real section. Check that GNU
## style just prints the section index as normal and LLVM style prints a warning
## (but only once for each warning).
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-readobj --symbols %t2 2> %t2.llvm.err | FileCheck %s --check-prefix=LLVM2
# RUN: FileCheck %s --input-file=%t2.llvm.err --check-prefix=BAD-SHNDX --implicit-check-not=warning
# RUN: llvm-readelf --symbols %t2 2> %t2.gnu.err | FileCheck %s --check-prefix=GNU2
## In this case, the symtab shndx section is missing, so symbols with section
## indexes of SHN_XINDEX print as Reserved symbols.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-readobj --symbols %t3 2> %t3.llvm.err | FileCheck %s --check-prefix=LLVM3
# RUN: FileCheck %s --input-file=%t3.llvm.err --check-prefix=NO-SYMTAB-SHNDX --implicit-check-not=warning
# RUN: llvm-readelf --symbols %t3 2> %t3.gnu.err | FileCheck %s --check-prefix=GNU3
# and also for unknown types, both in the os/processor specific ranges and not,
# for both GNU and LLVM styles.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --symbols %t | FileCheck %s --check-prefix=GNU
## Check how we dump symbols when they have only STV_* bits set for st_other.
## (This is the most common case).
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
# RUN: llvm-readobj --symbols %t1.o | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --symbols %t1.o | FileCheck %s --strict-whitespace --check-prefix=GNU
## Check the output when we have non-visibility bits set for at least one of the symbols.
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
# RUN: llvm-readobj --symbols %t2.o | FileCheck %s --check-prefixes=LLVM,LLVM-OTHER
# RUN: llvm-readelf --symbols %t2.o | FileCheck %s --strict-whitespace --check-prefix=GNU-OTHER
-# RUN: yaml2obj %s > %t.exe
+# RUN: yaml2obj %s -o %t.exe
# RUN: llvm-readobj --unwind %t.exe | FileCheck %s
# CHECK: EHFrameHeader {
## Check how we print sections.
## Show that llvm-readobj prints MachO all section types properly.
-# RUN: yaml2obj --docnum=1 %s > %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: llvm-readobj --sections %t1 | FileCheck %s
# CHECK: Type: Regular (0x0)
## format. It also shows that the formatting is correct (including using tabs as
## field separators).
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-size -B %t.o \
# RUN: | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
## FIXME: The rules demonstrated by this test are not quite what GNU size
## follows. See https://bugs.llvm.org/show_bug.cgi?id=42934.
-# RUN: yaml2obj %s > %t.o
+# RUN: yaml2obj %s -o %t.o
# RUN: llvm-size --format=sysv %t.o \
# RUN: | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
# RUN: llvm-size -A %t.o \
## Checks that the tool is able to read section groups from ELF.
-# RUN: yaml2obj --docnum=1 %s > %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
# RUN: llvm-readobj --elf-section-groups %t1.o | FileCheck %s -check-prefix=OBJ
# RUN: obj2yaml %t1.o | FileCheck %s --check-prefix YAML
## Check obj2yaml report an error when sh_info field of
## group section contains invalid (too large) signature symbol index.
-# RUN: yaml2obj --docnum=2 %s > %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
# RUN: not obj2yaml %t2.o 2>&1 | FileCheck %s --check-prefix ERR
--- !ELF
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
## Test checks that we are able to handle symbols with special/reserved indices.
-# RUN: yaml2obj %s > %t
+# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Symbols:
-# RUN: yaml2obj %s > %t1.o
-# RUN: yaml2obj %s > %t2.o
+# RUN: yaml2obj %s -o %t1.o
+# RUN: yaml2obj %s -o %t2.o
# RUN: printf "\x04" > %t.stats
## Check we are able to use integers as both
## symbol name indices (st_name values) and symbol names.
-# RUN: yaml2obj --docnum=1 %s > %t
+# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-readobj --symbols %t | FileCheck %s
# CHECK: Name: test (1)
## Test that STO_* can be used with their correct machine type.
## We use the same YAML as above, but with a change of machine type.
-# RUN: yaml2obj --docnum=2 %s > %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=USE-OTHER
# USE-OTHER: Name: foo
## Test that we can mix named and unnamed constants and set
## st_other to any arbitrary value.
-# RUN: yaml2obj --docnum=3 %s > %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=VALUE
# VALUE: Name: foo