llvm-project/lld/test/mach-o/exe-segment-overlap.yaml

65 lines
1.6 KiB
YAML

# RUN: lld -flavor darwin -arch x86_64 %s -o %t
# RUN: llvm-readobj -sections -section-data %t | FileCheck %s
--- !native
defined-atoms:
- name: start
scope: global
content: [ 90 ]
- name: _s2
type: data
content: [ 31, 32, 33, 34 ]
- name: _kustom
scope: global
type: unknown
content: [ 01, 02, 03, 04, 05, 06, 07, 08 ]
section-choice: custom-required
section-name: __CUST/__custom
--- !mach-o
arch: x86_64
file-type: MH_DYLIB
flags: [ ]
install-name: /usr/lib/libSystem.B.dylib
sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
content: [ 0x55 ]
global-symbols:
- name: dyld_stub_binder
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000000
# CHECK-LABEL: Section {
# CHECK: Name: __text
# CHECK: Segment: __TEXT
# CHECK: Size: 0x1
# CHECK: Offset: 4095
# CHECK-LABEL: Section {
# CHECK: Name: __data
# CHECK: Segment: __DATA
# CHECK: Size: 0x4
# CHECK: Offset: 4096
# CHECK: SectionData (
# CHECK-NEXT: 0000: 31323334
# CHECK-NEXT: )
# CHECK-LABEL: Section {
# CHECK: Name: __custom{{ }}
# CHECK: Segment: __CUST{{ }}
# CHECK: Size: 0x8
# CHECK: Offset: 8192
# CHECK: SectionData (
# CHECK-NEXT: 0000: 01020304 05060708
# CHECK-NEXT: )