1# RUN: ld64.lld.darwinold -ios_simulator_version_min 5.0 -arch x86_64 -r %s -o %t
2# RUN: llvm-readobj --file-headers %t | FileCheck %s
3
4# Make sure that we have an objc image info in the output.  It should have
5# been generated by the objc pass.
6
7--- !mach-o
8arch:            x86_64
9file-type:       MH_OBJECT
10flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
11compat-version:  0.0
12current-version: 0.0
13has-UUID:        false
14OS:              unknown
15sections:
16  - segment:         __DATA
17    section:         __objc_imageinfo
18    type:            S_REGULAR
19    attributes:      [ S_ATTR_NO_DEAD_STRIP ]
20    address:         0x0000000000000100
21    content:         [ 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00 ]
22...
23
24# The ObjC pass creates a new image info in a new MachoFile internal to the pass.
25# Make sure that we still have MH_SUBSECTIONS_VIA_SYMBOLS in the output file, even
26# though that file in the ObjCPass didn't get it set from being parsed.
27
28# CHECK: MH_SUBSECTIONS_VIA_SYMBOLS