xref: /llvm-project/llvm/test/tools/llvm-readobj/MachO/flags.yaml (revision c00fc180ecdac4b13caddd1ba506ffa3f6e7e206)
1## Verify that llvm-readobj can dump the various symbol flags correctly.
2# RUN: yaml2obj %s -o %t
3# RUN: llvm-readobj --syms %t | FileCheck %s
4
5# CHECK:      Symbols [
6# CHECK-NEXT:   Symbol {
7# CHECK-NEXT:     Name: _foo (1)
8# CHECK-NEXT:     Extern
9# CHECK-NEXT:     Type: Section (0xE)
10# CHECK-NEXT:     Section: __text (0x1)
11# CHECK-NEXT:     RefType: UndefinedNonLazy (0x0)
12# CHECK-NEXT:     Flags [ (0x128)
13# CHECK-NEXT:       NoDeadStrip (0x20)
14# CHECK-NEXT:       SymbolResolver (0x100)
15# CHECK-NEXT:       ThumbDef (0x8)
16# CHECK-NEXT:     ]
17# CHECK-NEXT:     Value: 0x0
18# CHECK-NEXT:   }
19# CHECK-NEXT: ]
20
21--- !mach-o
22FileHeader:
23  magic:           0xFEEDFACE
24  cputype:         0xC
25  cpusubtype:      0x9
26  filetype:        0x1
27  ncmds:           2
28  sizeofcmds:      228
29  flags:           0x0
30LoadCommands:
31  - cmd:             LC_SEGMENT
32    cmdsize:         124
33    segname:         ''
34    vmaddr:          0
35    vmsize:          0
36    fileoff:         256
37    filesize:        0
38    maxprot:         7
39    initprot:        7
40    nsects:          1
41    flags:           0
42    Sections:
43      - sectname:        __text
44        segname:         __TEXT
45        addr:            0x0
46        size:            0
47        offset:          0x100
48        align:           2
49        reloff:          0x0
50        nreloc:          0
51        flags:           0x80000000
52        reserved1:       0x0
53        reserved2:       0x0
54        reserved3:       0x0
55        content:         ''
56  - cmd:             LC_SYMTAB
57    cmdsize:         24
58    symoff:          256
59    nsyms:           1
60    stroff:          268
61    strsize:         8
62LinkEditData:
63  NameList:
64    - n_strx:          1
65      n_type:          0xF
66      n_sect:          1
67      n_desc:          296
68      n_value:         0
69  StringTable:
70    - ''
71    - _foo
72    - ''
73    - ''
74...
75