# REQUIRES: zlib, x86
-# RUN: yaml2obj -docnum=1 %s -o %t.o
+# RUN: yaml2obj --docnum=1 %s -o %t.o
# RUN: ld.lld %t.o %t.o -o %t2
# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
-# RUN: yaml2obj -docnum=2 %s -o %t.o
+# RUN: yaml2obj --docnum=2 %s -o %t.o
# RUN: ld.lld %t.o %t.o -o %t2
# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
-# RUN: yaml2obj -docnum=1 %s -o %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
# RUN: not ld.lld %t1.o -o %t1 2>&1 | FileCheck %s
# CHECK: error: {{.*}}.o: unsupported relocation reference
- Name: foo
Binding: STB_GLOBAL
-# RUN: yaml2obj -docnum=2 %s -o %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
# RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR2
# ERR2: error: {{.*}}.o: invalid relocated section index: 99
## Relocation refers to a symbol with index larger than
## symbol table size. Check we report it.
-# RUN: yaml2obj -docnum=3 %s -o %t2.o
+# RUN: yaml2obj --docnum=3 %s -o %t2.o
# RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR3
# ERR3: error: {{.*}}.o: invalid symbol index
## If an object contains a common symbol with zero alignment,
## check we report it.
-# RUN: yaml2obj -docnum=1 %s -o %t1.o
+# RUN: yaml2obj --docnum=1 %s -o %t1.o
# RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s
# CHECK: common symbol 'bar' has invalid alignment: 0
## If an object contains a common symbol with alignment greater
## than UINT32_MAX, check we report it.
-# RUN: yaml2obj -docnum=2 %s -o %t2.o
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
# RUN: not ld.lld %t2.o -o %t 2>&1 | FileCheck %s --check-prefix=BIG
# BIG: common symbol 'bar' has invalid alignment: 271644049215
## .dynamic section has invalid sh_entsize, check we report it.
-# RUN: yaml2obj -docnum=1 %s -o %t.so
+# RUN: yaml2obj --docnum=1 %s -o %t.so
# RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1
# ERR1: error: {{.*}}.so: section [index 1] has an invalid sh_entsize: 291
## The .dynamic section has invalid sh_size, which is too short and
## even less than entry size. Check we report it.
-# RUN: yaml2obj -docnum=2 %s -o %t.so
+# RUN: yaml2obj --docnum=2 %s -o %t.so
# RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2
# ERR2: error: {{.*}}.so: section [index 1] has an invalid sh_size (1) which is not a multiple of its sh_entsize (16)
## .symtab's sh_info contains zero value. First entry in a .symtab is a
## zero entry that must exist in a valid object, so sh_info can't be null.
## Check we report a proper error for that case.
-# RUN: yaml2obj -docnum=1 %s -o %t.o
+# RUN: yaml2obj --docnum=1 %s -o %t.o
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR1
# ERR1: invalid sh_info in symbol table
## sh_info has value 2 what says that non-local symbol `foo` is local.
## Check we report this case.
-# RUN: yaml2obj -docnum=2 %s -o %t.o
+# RUN: yaml2obj --docnum=2 %s -o %t.o
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR2 %s
# ERR2: broken object: getLocalSymbols returns a non-local symbol
## sh_info has value 0xff what is larger than number of symbols in a .symtab.
## Check we report this case.
-# RUN: yaml2obj -docnum=3 %s -o %t.o
+# RUN: yaml2obj --docnum=3 %s -o %t.o
# RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR1 %s
--- !ELF
# Check warning and errors in case of input
# files with incompatible ELF header flags.
-# RUN: yaml2obj -docnum 1 %s -o %t-n64.o
-# RUN: yaml2obj -docnum 2 %s -o %t-o64.o
-# RUN: yaml2obj -docnum 3 %s -o %t-n32.o
-# RUN: yaml2obj -docnum 4 %s -o %t-o32.o
-# RUN: yaml2obj -docnum 5 %s -o %t-eabi64.o
-# RUN: yaml2obj -docnum 6 %s -o %t-eabi32.o
+# RUN: yaml2obj --docnum=1 %s -o %t-n64.o
+# RUN: yaml2obj --docnum=2 %s -o %t-o64.o
+# RUN: yaml2obj --docnum=3 %s -o %t-n32.o
+# RUN: yaml2obj --docnum=4 %s -o %t-o32.o
+# RUN: yaml2obj --docnum=5 %s -o %t-eabi64.o
+# RUN: yaml2obj --docnum=6 %s -o %t-eabi32.o
# RUN: not ld.lld %t-n64.o %t-eabi64.o -shared -o /dev/null 2>&1 \
# RUN: | FileCheck -check-prefixes=MM64,N64EABI64 %s
# Check warning and errors in case of input
# files with incompatible floating point ABI flags.
-# RUN: yaml2obj -docnum 1 %s -o %t-dbl.o
-# RUN: yaml2obj -docnum 2 %s -o %t-sgl.o
-# RUN: yaml2obj -docnum 3 %s -o %t-soft.o
-# RUN: yaml2obj -docnum 4 %s -o %t-fp64.o
-# RUN: yaml2obj -docnum 5 %s -o %t-fp64old.o
-# RUN: yaml2obj -docnum 6 %s -o %t-fp64a.o
-# RUN: yaml2obj -docnum 7 %s -o %t-fpxx.o
+# RUN: yaml2obj --docnum=1 %s -o %t-dbl.o
+# RUN: yaml2obj --docnum=2 %s -o %t-sgl.o
+# RUN: yaml2obj --docnum=3 %s -o %t-soft.o
+# RUN: yaml2obj --docnum=4 %s -o %t-fp64.o
+# RUN: yaml2obj --docnum=5 %s -o %t-fp64old.o
+# RUN: yaml2obj --docnum=6 %s -o %t-fp64a.o
+# RUN: yaml2obj --docnum=7 %s -o %t-fpxx.o
# RUN: not ld.lld %t-dbl.o %t-fp64.o -shared -o /dev/null 2>&1 \
# RUN: | FileCheck -check-prefixes=DBLFP64 %s
# RUN: rm -rf %t
# RUN: mkdir %t
# RUN: cd %t
-# RUN: yaml2obj -docnum=1 %s > test.wasm
-# RUN: yaml2obj -docnum=2 %s > test_sym.wasm
+# RUN: yaml2obj --docnum=1 %s > test.wasm
+# RUN: yaml2obj --docnum=2 %s > test_sym.wasm
# RUN: lldb-test object-file test.wasm | FileCheck %s
# This test checks that SymbolVendorWasm correctly loads DWARF debug sections