[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / tools / llvm-objcopy / MachO / keep-undefined.test
blob070797adcbf40361d6962beea07892d3d16f1f50
1 ## This test verifies that llvm-objcopy and llvm-strip do not remove
2 ## undefined symbols if --keep-undefined is specified.
4 # RUN: yaml2obj %s -o %t
5 # RUN: llvm-objcopy --strip-all --keep-undefined %t %t.stripped
6 # RUN: llvm-readobj --symbols %t.stripped | FileCheck %s
8 # RUN: llvm-strip --keep-undefined %t -o %t.stripped.2
9 # RUN: cmp %t.stripped %t.stripped.2
11 # CHECK:       Symbols [
12 # CHECK-NEXT:    Symbol {
13 # CHECK-NEXT:      Name: _u (1)
14 # CHECK-NEXT:      Extern
15 # CHECK-NEXT:      Type: Undef (0x0)
16 # CHECK-NEXT:      Section:  (0x0)
17 # CHECK-NEXT:      RefType: UndefinedNonLazy (0x0)
18 # CHECK-NEXT:      Flags [ (0x220)
19 # CHECK-NEXT:        AltEntry (0x200)
20 # CHECK-NEXT:        NoDeadStrip (0x20)
21 # CHECK-NEXT:      ]
22 # CHECK-NEXT:      Value: 0x4
23 # CHECK-NEXT:    }
24 # CHECK-NEXT:  ]
26 --- !mach-o
27 FileHeader:
28   magic:           0xFEEDFACF
29   cputype:         0x1000007
30   cpusubtype:      0x3
31   filetype:        0x1
32   ncmds:           3
33   sizeofcmds:      256
34   flags:           0x2000
35   reserved:        0x0
36 LoadCommands:
37   - cmd:             LC_SEGMENT_64
38     cmdsize:         152
39     segname:         ''
40     vmaddr:          0
41     vmsize:          0
42     fileoff:         288
43     filesize:        0
44     maxprot:         7
45     initprot:        7
46     nsects:          1
47     flags:           0
48     Sections:
49       - sectname:        __text
50         segname:         __TEXT
51         addr:            0x0
52         size:            0
53         offset:          0x120
54         align:           0
55         reloff:          0x0
56         nreloc:          0
57         flags:           0x80000000
58         reserved1:       0x0
59         reserved2:       0x0
60         reserved3:       0x0
61         content:         ''
62   - cmd:             LC_SYMTAB
63     cmdsize:         24
64     symoff:          288
65     nsyms:           2
66     stroff:          320
67     strsize:         8
68   - cmd:             LC_DYSYMTAB
69     cmdsize:         80
70     ilocalsym:       0
71     nlocalsym:       1
72     iextdefsym:      1
73     nextdefsym:      0
74     iundefsym:       1
75     nundefsym:       1
76     tocoff:          0
77     ntoc:            0
78     modtaboff:       0
79     nmodtab:         0
80     extrefsymoff:    0
81     nextrefsyms:     0
82     indirectsymoff:  0
83     nindirectsyms:   0
84     extreloff:       0
85     nextrel:         0
86     locreloff:       0
87     nlocrel:         0
88 LinkEditData:
89   NameList:
90     - n_strx:          4
91       n_type:          0xE
92       n_sect:          1
93       n_desc:          32
94       n_value:         0
95     - n_strx:          1
96       n_type:          0x1
97       n_sect:          0
98       n_desc:          544
99       n_value:         4
100   StringTable:
101     - ''
102     - _u
103     - _d
104     - ''