seg-protection-x86_64.yaml
1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# RUN: ld64.lld -arch x86_64 %s %p/Inputs/hello-world-x86_64.yaml -o %t && llvm-objdump --private-headers %t | FileCheck %s
--- !mach-o
arch: x86_64
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
content: [ 0x00, 0x00 ]
global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000000
- name: start
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000001
...
# CHECK: Load command 0
# CHECK: cmd LC_SEGMENT_64
# CHECK: cmdsize 72
# CHECK: segname __PAGEZERO
# CHECK: vmaddr
# CHECK: vmsize
# CHECK: fileoff
# CHECK: filesize
# CHECK: maxprot ---
# CHECK: initprot ---
# CHECK: nsects 0
# CHECK: flags (none)
# CHECK: Load command 1
# CHECK: cmd LC_SEGMENT_64
# CHECK: cmdsize 152
# CHECK: segname __TEXT
# CHECK: vmaddr
# CHECK: vmsize
# CHECK: fileoff
# CHECK: filesize
# CHECK: maxprot rwx
# CHECK: initprot r-x
# CHECK: nsects 1
# CHECK: flags (none)
# CHECK: Section
# CHECK: sectname __text
# CHECK: segname __TEXT
# CHECK: addr
# CHECK: size
# CHECK: offset
# CHECK: align 2^0 (1)
# CHECK: reloff 0
# CHECK: nreloc 0
# CHECK: type S_REGULAR
# CHECK: attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
# CHECK: reserved1 0
# CHECK: reserved2 0
# CHECK: Load command 2
# CHECK: cmd LC_SEGMENT_64
# CHECK: cmdsize 72
# CHECK: segname __LINKEDIT
# CHECK: vmaddr
# CHECK: vmsize
# CHECK: fileoff
# CHECK: filesize
# CHECK: maxprot rwx
# CHECK: initprot r--
# CHECK: nsects 0
# CHECK: flags (none)