forked from OSchip/llvm-project
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
# RUN: lld -flavor darwin -arch x86_64 %s -o %t -e start
|
|
# RUN: llvm-readobj -sections %t | FileCheck %s
|
|
|
|
# Make sure data gets put at offset
|
|
|
|
--- !native
|
|
defined-atoms:
|
|
- name: start
|
|
scope: global
|
|
content: [ 90 ]
|
|
|
|
- name: _s1
|
|
type: data
|
|
content: [ 31, 32, 33, 34 ]
|
|
|
|
- name: _s2
|
|
type: zero-fill
|
|
size: 8192
|
|
|
|
- name: _s3
|
|
type: zero-fill
|
|
size: 100
|
|
|
|
- name: _s4
|
|
type: data
|
|
content: [ 01 ]
|
|
|
|
--- !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: 0
|
|
|
|
# CHECK-LABEL: Section {
|
|
# CHECK: Name: __data
|
|
# CHECK: Segment: __DATA
|
|
# CHECK: Size: 0x5
|
|
# CHECK: Offset: 4096
|
|
|
|
# CHECK-LABEL: Section {
|
|
# CHECK: Name: ___bss
|
|
# CHECK: Segment: __DATA
|
|
# CHECK: Size: 0x0
|
|
# CHECK: Offset: 4101
|