1 ## Test how yaml2obj sets the value of a symbol's st_other fields.
3 ## Show that yaml2obj reports an error when using an STO_* flag that belongs
4 ## to a different machine type to what is specified by the YAML.
6 # RUN: not yaml2obj --docnum=1 2>&1 %s | FileCheck %s --check-prefix=ERR
7 # ERR: error: an unknown value is used for symbol's 'Other' field: STO_MIPS_OPTIONAL
17 Other: [ STO_MIPS_OPTIONAL ]
19 ## Test that STO_* can be used with their correct machine type.
20 ## We use the same YAML as above, but with a change of machine type.
22 # RUN: yaml2obj --docnum=2 %s -o %t2
23 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=USE-OTHER
25 # USE-OTHER: Name: foo
26 # USE-OTHER: Other [ (0x4)
27 # USE-OTHER-NEXT: STO_MIPS_OPTIONAL (0x4)
38 Other: [ STO_MIPS_OPTIONAL ]
40 ## Test that we can mix named and unnamed constants and set
41 ## st_other to any arbitrary value.
43 # RUN: yaml2obj --docnum=3 %s -o %t3
44 # RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=VALUE
68 Other: [ STV_PROTECTED, 4 ]
70 Other: [ STV_PROTECTED, STO_MIPS_OPTIONAL, 0xf8 ]