2016-08-12 02:08:59 +08:00
|
|
|
# RUN: lld -flavor darwin -arch x86_64 -dylib %s -o %t %p/Inputs/x86_64/libSystem.yaml
|
2014-10-25 06:19:22 +08:00
|
|
|
# RUN: llvm-nm %t | FileCheck %s
|
|
|
|
#
|
|
|
|
# Test that a data-only dylib can be built.
|
|
|
|
#
|
|
|
|
|
|
|
|
--- !mach-o
|
|
|
|
arch: x86_64
|
|
|
|
file-type: MH_OBJECT
|
|
|
|
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
|
|
|
|
sections:
|
|
|
|
- segment: __DATA
|
|
|
|
section: __data
|
|
|
|
type: S_REGULAR
|
|
|
|
attributes: [ ]
|
|
|
|
alignment: 2
|
|
|
|
address: 0x0000000000000000
|
|
|
|
content: [ 0x00, 0x00, 0x00, 0x00 ]
|
2015-04-28 01:18:04 +08:00
|
|
|
global-symbols:
|
2014-10-25 06:19:22 +08:00
|
|
|
- name: _myData
|
|
|
|
type: N_SECT
|
|
|
|
scope: [ N_EXT ]
|
|
|
|
sect: 1
|
|
|
|
value: 0x0000000000000000
|
|
|
|
...
|
|
|
|
|
|
|
|
# CHECK: _myData
|