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
//! PE/COFF backend (Windows).
//!
//! Roadmap M7. Scope is in `docs/formats.md`: COFF objects, import
//! libraries (short and long), `.def` files, EXE and DLL output, base
//! relocations, SEH, MinGW auto-import, and resources.
//!
//! | Module | Role |
//! | --- | --- |
//! | [`read`] | Zero-copy readers for objects, import libraries, PE images, `.drectve` and `.def` (workstream W14) |
//! | [`options`] | The PE options [`LinkOptions`](crate::args::LinkOptions) does not carry yet |
//! | [`machine`] | What differs between x86-64, i386 and ARM64 images, and i386 symbol decoration |
//! | [`inputs`] | Search paths, objects and archives, and the resolution file list |
//! | [`object`] | A parsed object: sections, COMDAT groups and a flat symbol list |
//! | [`resolve`] | COFF symbol precedence and COMDAT selection |
//! | [`directives`] | `.drectve` directives the link acts on |
//! | [`edata`] | The export directory |
//! | [`implib`] | `--out-implib` and `--output-def` |
//! | [`imports`] | Short import libraries and directly linked DLLs |
//! | [`layout`] | Output sections, grouped-section ordering, RVAs |
//! | [`defined`] | The symbols MinGW's C runtime expects the linker to define |
//! | [`reloc`] | Symbol addresses, relocation application, base relocations |
//! | [`arm64`] | ARM64 relocations and range-extension thunks |
//! | [`safeseh`] | The i386 SafeSEH handler table |
//! | [`symtab`] | The image's COFF symbol table |
//! | [`write`](mod@write) | Headers, section contents and the image checksum |
//! | [`link`](mod@link) | The driver |
//!
//! Machines: x86-64 and ARM64 (PE32+) and i386 (PE32), the emulations
//! `i386pep`, `arm64pe` and `i386pe`; [`machine`] lists what differs.
//! ARM64EC, ARM64X and 32-bit ARM are refused.
//!
//! Not implemented yet: `-r`, `--gc-sections`, and local symbols in the
//! output symbol table.
pub use ;
pub use PeOptions;
use crateArchitecture;
use ;
/// The COFF `Machine` value for an architecture, if PE has one.