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
//! Mach-O backend (Apple platforms).
//!
//! Roadmap M8. Scope is in `docs/formats.md`: objects and dylibs, `.tbd`
//! stubs, subsection atomization, chained fixups, compact unwind, ad-hoc code
//! signing, and universal (fat) binaries.
//!
//! - [`read`]: the input side (workstream W15). Universal binaries, `MH_OBJECT`
//! files with atomization for dead stripping, compact unwind and
//! `__eh_frame` records, dylibs with their export tries and chained-fixup
//! imports, and text-based stubs (`.tbd` v3–v5).
//! - The linker (workstream W25), driven by [`link()`](fn@link):
//!
//! | Module | Role |
//! | --- | --- |
//! | [`config`] | Per-architecture settings derived from the options |
//! | [`inputs`] | Search paths, objects, archives, dylibs, `.tbd` stubs |
//! | [`object`] | Objects with their atoms and global symbols |
//! | [`resolve`] | Symbol precedence and duplicate reports |
//! | [`state`] | Resolved symbols, atom numbering, coalescing, dead stripping |
//! | [`scan`] | Stubs, `__got`, `__thread_ptrs`, imports, dylib ordinals |
//! | [`layout`] | Output sections, segments, addresses |
//! | [`reloc`] | Relocation decoding and application (arm64, x86_64) |
//! | [`relocatable`] | `-r`: relocatable `MH_OBJECT` output |
//! | [`thunks`] | arm64 range-extension thunks |
//! | [`addr`] | Final addresses of symbols and synthetic entries |
//! | [`sections`] | Section contents |
//! | [`unwind`], [`eh_frame`] | `__unwind_info` and `__eh_frame` |
//! | [`objc`] | Relative method lists and category merging |
//! | [`objc_stubs`] | `_objc_msgSend$selector` stubs and selector references, generated as an object |
//! | [`lto`] | Bitcode inputs compiled through libLTO |
//! | [`fixups`] | Chained fixups and rebase/bind opcodes |
//! | [`trie`] | The export trie |
//! | [`symtab`], [`stabs`] | Symbol tables and the STABS debug map |
//! | [`write`](mod@write) | Header, load commands, `__LINKEDIT` |
//! | [`codesign`] | Ad-hoc code signature (SHA-256 from [`crate::output::hash`]) |
//! | [`fat`] | Universal binaries |
//! | [`buf`] | Byte helpers |
pub use ;