1 ## Test how the Machine YAML field can be used to set the e_machine ELF header field.
3 ## Test we can use an arbitrary value.
5 # RUN: yaml2obj -D MACHINE=0x1234 %s -o %t1
6 # RUN: llvm-readelf %t1 --file-headers | FileCheck %s --check-prefix=UNKNOWN
8 # UNKNOWN: Machine: 1234
17 ## Test we can't use a number that doesn't fit into 2 bytes.
19 # RUN: not yaml2obj -D MACHINE=0x12345 %s 2>&1 | FileCheck %s --check-prefix=ERR
21 # ERR: error: out of range hex16 number
23 ## Test we can use a known named constant.
25 # RUN: yaml2obj -D MACHINE=EM_NONE %s -o %t3
26 # RUN: llvm-readelf %t3 --file-headers | FileCheck %s --check-prefix=NONE
30 ## Test we can't use an unknown string constant.
32 # RUN: not yaml2obj -D MACHINE=EM_UNKNOWN_FOO %s 2>&1 | FileCheck %s --check-prefix=ERR2
34 # ERR2: error: invalid hex16 number