1 ## Verify that llvm-readobj can dump files containing stabs symbols,
2 ## particularly symbols of type N_OSO which have repurposed the n_sect field
3 ## to store a non-section-index value.
5 # RUN: yaml2obj %s -o %t
6 # RUN: llvm-readobj --syms %t | FileCheck %s
10 # CHECK-NEXT: Name: /Volumes/Sandbox/ (2)
11 # CHECK-NEXT: Type: SymDebugTable (0x64)
12 # CHECK-NEXT: Section: (0x0)
13 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
14 # CHECK-NEXT: Flags [ (0x0)
16 # CHECK-NEXT: Value: 0x0
18 # CHECK-NEXT: Symbol {
19 # CHECK-NEXT: Name: /Volumes/Sandbox/test.o (20)
20 # CHECK-NEXT: Type: SymDebugTable (0x66)
21 # CHECK-NEXT: Section: (0x3)
22 # CHECK-NEXT: RefType: ReferenceFlagUndefinedLazy (0x1)
23 # CHECK-NEXT: Flags [ (0x0)
25 # CHECK-NEXT: Value: 0x5F72D5E2
27 # CHECK-NEXT: Symbol {
28 # CHECK-NEXT: Name: (1)
29 # CHECK-NEXT: Type: SymDebugTable (0x2E)
30 # CHECK-NEXT: Section: (0x1)
31 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
32 # CHECK-NEXT: Flags [ (0x0)
34 # CHECK-NEXT: Value: 0x100000FA0
36 # CHECK-NEXT: Symbol {
37 # CHECK-NEXT: Name: _foo (44)
38 # CHECK-NEXT: Type: SymDebugTable (0x24)
39 # CHECK-NEXT: Section: (0x1)
40 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
41 # CHECK-NEXT: Flags [ (0x0)
43 # CHECK-NEXT: Value: 0x100000FA0
45 # CHECK-NEXT: Symbol {
46 # CHECK-NEXT: Name: (1)
47 # CHECK-NEXT: Type: SymDebugTable (0x4E)
48 # CHECK-NEXT: Section: (0x1)
49 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
50 # CHECK-NEXT: Flags [ (0x0)
52 # CHECK-NEXT: Value: 0xF
60 cpusubtype: 0x00000003
105 n_type: 0x66 ## N_OSO
110 n_type: 0x2E ## N_BNSYM
115 n_type: 0x24 ## N_FUN
120 n_type: 0x4E ## N_ENSYM
126 - '/Volumes/Sandbox/'
127 - '/Volumes/Sandbox/test.o'