2018-02-17 05:16:57 +08:00
|
|
|
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
|
|
|
|
# RUN: ld64.lld -arch x86_64 -r -print_atoms %t -o %t2 | FileCheck %s
|
2016-02-02 03:10:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
--- !mach-o
|
|
|
|
arch: x86_64
|
|
|
|
file-type: MH_OBJECT
|
|
|
|
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
|
|
|
|
compat-version: 0.0
|
|
|
|
current-version: 0.0
|
|
|
|
has-UUID: false
|
|
|
|
OS: unknown
|
|
|
|
sections:
|
|
|
|
- segment: __DATA
|
|
|
|
section: __objc_catlist
|
|
|
|
type: S_REGULAR
|
|
|
|
attributes: [ S_ATTR_NO_DEAD_STRIP ]
|
|
|
|
alignment: 8
|
|
|
|
address: 0x00000000000003F8
|
2016-10-06 04:09:50 +08:00
|
|
|
content: [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2016-02-02 03:10:10 +08:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
|
2016-10-06 04:09:50 +08:00
|
|
|
relocations:
|
2016-02-02 03:10:10 +08:00
|
|
|
- offset: 0x00000008
|
|
|
|
type: X86_64_RELOC_UNSIGNED
|
|
|
|
length: 3
|
|
|
|
pc-rel: false
|
|
|
|
extern: true
|
|
|
|
symbol: 0
|
|
|
|
- offset: 0x00000000
|
|
|
|
type: X86_64_RELOC_UNSIGNED
|
|
|
|
length: 3
|
|
|
|
pc-rel: false
|
|
|
|
extern: true
|
|
|
|
symbol: 1
|
2016-10-06 04:09:50 +08:00
|
|
|
undefined-symbols:
|
2016-02-02 03:10:10 +08:00
|
|
|
- name: __category1
|
|
|
|
type: N_UNDF
|
|
|
|
scope: [ N_EXT ]
|
|
|
|
value: 0x0000000000000000
|
|
|
|
- name: __category2
|
|
|
|
type: N_UNDF
|
|
|
|
scope: [ N_EXT ]
|
|
|
|
value: 0x0000000000000000
|
|
|
|
page-size: 0x00000000
|
|
|
|
...
|
|
|
|
|
|
|
|
# Make sure we atomize the category list section by pointer sized atoms.
|
|
|
|
|
|
|
|
# CHECK: path: '<linker-internal>'
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK: defined-atoms:
|
2016-02-02 03:10:10 +08:00
|
|
|
# CHECK: - type: objc-category-list
|
|
|
|
# CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
|
|
|
|
# CHECK: merge: by-content
|
|
|
|
# CHECK: alignment: 8
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK: references:
|
2016-02-02 03:10:10 +08:00
|
|
|
# CHECK: - kind: pointer64
|
|
|
|
# CHECK: offset: 0
|
|
|
|
# CHECK: target: __category2
|
|
|
|
# CHECK: - type: objc-category-list
|
|
|
|
# CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
|
|
|
|
# CHECK: merge: by-content
|
|
|
|
# CHECK: alignment: 8
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK: references:
|
2016-02-02 03:10:10 +08:00
|
|
|
# CHECK: - kind: pointer64
|
|
|
|
# CHECK: offset: 0
|
|
|
|
# CHECK: target: __category1
|
2016-10-06 04:09:50 +08:00
|
|
|
# CHECK: undefined-atoms:
|
2016-02-02 03:10:10 +08:00
|
|
|
# CHECK: - name: __category1
|
|
|
|
# CHECK: - name: __category2
|
|
|
|
# CHECK: ...
|