Make test more lenient for custom clang version strings
[llvm-project.git] / llvm / test / tools / llvm-objcopy / MachO / remove-section-dead-symbols.test
blob474369439ba6299c118dcb25e74e8f64eb455a06
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --remove-section __DATA,C %t %t.copy
4 # RUN: llvm-readobj --symbols %t.copy | FileCheck %s
6 # CHECK: Symbols [
7 # CHECK-NEXT:   Symbol {
8 # CHECK-NEXT:     Name: _A (1)
9 # CHECK-NEXT:     Extern
10 # CHECK-NEXT:     Type: Section (0xE)
11 # CHECK-NEXT:     Section: __data (0x2)
12 # CHECK-NEXT:     RefType: UndefinedNonLazy (0x0)
13 # CHECK-NEXT:     Flags [ (0x0)
14 # CHECK-NEXT:     ]
15 # CHECK-NEXT:     Value: 0x0
16 # CHECK-NEXT:   }
17 # CHECK-NEXT: ]
19 --- !mach-o
20 FileHeader:
21   magic:           0xFEEDFACF
22   cputype:         0x01000007
23   cpusubtype:      0x00000003
24   filetype:        0x00000001
25   ncmds:           4
26   sizeofcmds:      432
27   flags:           0x00002000
28   reserved:        0x00000000
29 LoadCommands:
30   - cmd:             LC_SEGMENT_64
31     cmdsize:         312
32     segname:         ''
33     vmaddr:          0
34     vmsize:          8
35     fileoff:         464
36     filesize:        8
37     maxprot:         7
38     initprot:        7
39     nsects:          3
40     flags:           0
41     Sections:
42       - sectname:        __text
43         segname:         __TEXT
44         addr:            0x0000000000000000
45         size:            0
46         offset:          0x000001D0
47         align:           0
48         reloff:          0x00000000
49         nreloc:          0
50         flags:           0x80000000
51         reserved1:       0x00000000
52         reserved2:       0x00000000
53         reserved3:       0x00000000
54         content:         ''
55       - sectname:        __data
56         segname:         __DATA
57         addr:            0x0000000000000000
58         size:            4
59         offset:          0x000001D0
60         align:           2
61         reloff:          0x00000000
62         nreloc:          0
63         flags:           0x00000000
64         reserved1:       0x00000000
65         reserved2:       0x00000000
66         reserved3:       0x00000000
67         content:         '01000000'
68       - sectname:        C
69         segname:         __DATA
70         addr:            0x0000000000000004
71         size:            4
72         offset:          0x000001D4
73         align:           2
74         reloff:          0x00000000
75         nreloc:          0
76         flags:           0x00000000
77         reserved1:       0x00000000
78         reserved2:       0x00000000
79         reserved3:       0x00000000
80         content:         '02000000'
81   - cmd:             LC_VERSION_MIN_MACOSX
82     cmdsize:         16
83     version:         658944
84     sdk:             0
85   - cmd:             LC_SYMTAB
86     cmdsize:         24
87     symoff:          472
88     nsyms:           2
89     stroff:          504
90     strsize:         8
91   - cmd:             LC_DYSYMTAB
92     cmdsize:         80
93     ilocalsym:       0
94     nlocalsym:       0
95     iextdefsym:      0
96     nextdefsym:      2
97     iundefsym:       2
98     nundefsym:       0
99     tocoff:          0
100     ntoc:            0
101     modtaboff:       0
102     nmodtab:         0
103     extrefsymoff:    0
104     nextrefsyms:     0
105     indirectsymoff:  0
106     nindirectsyms:   0
107     extreloff:       0
108     nextrel:         0
109     locreloff:       0
110     nlocrel:         0
111 LinkEditData:
112   NameList:
113     - n_strx:          4
114       n_type:          0x0F
115       n_sect:          2
116       n_desc:          0
117       n_value:         0
118     - n_strx:          1
119       n_type:          0x0F
120       n_sect:          3
121       n_desc:          0
122       n_value:         4
123   StringTable:
124     - ''
125     - _B
126     - _A
127     - ''