Debian Codegraph @

debian/rust-vendor/link-section/CHANGELOG.md

raw
1 # Changelog
2
3 All notable changes to this project will be documented in this file.
4
5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8 ## [0.19.3] - 2026-08-09
9
10 ### Changed
11
12 - Bump `linktime-proc-macro` dependency to 0.2.3 (consistent 64-bit hash chunks
13 and cross-crate section-name fix).
14
15 ### Documentation
16
17 - Documented the `crate_path` override and surfaced the generated attribute
18 reference (including `crate_path`) in the crate docs and README.
19
20 ### Fixed
21
22 - Fix cross-crate section-name error on Rust versions 1.88-1.94 (https://github.com/mmastrac/linktime/pull/509)
23 - Fix undefined behavior on WASM when a `const` item is submitted to a `reference`
24 section: the item's cell lacked the fix-up slot the section-wide layout expects,
25 so materialisation read past the cell and could write through a garbage slot
26 pointer (https://github.com/mmastrac/linktime/pull/511).
27
28 ## [0.19.2] - 2026-07-29
29
30 ### Changed
31
32 - Bump `linktime-proc-macro` dependency to 0.2.1 (makes link-section names more stable).
33
34 ## [0.19.1] - 2026-07-15
35
36 ### Fixed
37
38 - Fix for semicolons accidentally inserted in WASM expression macro (generates a
39 warning on nightly).
40
41 ## [0.19.0] - 2026-07-06
42
43 ### Fixed
44
45 - WASM: item counts no longer collapse under fat LTO. Items are gathered through
46 address-significant intrusive list nodes that survive LTO. Fixes
47 [#488](https://github.com/mmastrac/linktime/issues/488).
48
49 ### Changed
50
51 - WASM: the `read_custom_section` host import is no longer required. Sections
52 are gathered in-module via `.init_array.0` submissions and an `.init_array.1`
53 finalizer; the `#[ctor]` priority contract is unchanged.
54 - WASM: each item now lives in a single intrusive `LinkCell<T>` static (value
55 plus trailing list metadata) instead of a separate value static and cell.
56
57 ### Removed
58
59 - `Ref::as_ptr` and `MovableRef::as_ptr` are now `pub(crate)`. They exposed raw
60 pointer plumbing that was never meant to be public API; use `Deref` (or
61 `offset_of` for section-membership checks) instead. This is a breaking change.
62
63 ## [0.18.3] - 2026-06-23
64
65 ### Fixed
66
67 - Windows/COFF: section start/end pointers are now opacified with `black_box`,
68 fixing a miscompile where an optimizing (LTO) build could prove a gathered
69 slice (e.g. `ScatteredSlice<&'static T>`) reads as all-zero and fold it to
70 null values, crashing on use (`0xC0000005`). Fixes
71 [#479](https://github.com/mmastrac/linktime/issues/479).
72
73 ## [0.18.2] - 2026-06-06
74
75 ### Changed
76
77 - Empty sections are now automatically supported on all platforms other than AIX.
78
79 ## [0.18.1] - 2026-05-30
80
81 ### Changed
82
83 - Fixed WASM import module for `read_custom_section` and `atexit`.
84
85 ## [0.18.0] - 2026-05-28
86
87 ### Changed
88
89 - `proc_macro` feature is now required for any non-`unsafe` section.
90 - Non-`unsafe` sections now generate a unique ID for the submission site which
91 allows multiple sections to share the same identifier.
92
93 ## [0.17.2] - 2026-05-18
94
95 ### Changed
96
97 - Fixed bug with submission of raw items to `aux` sections.
98
99 ## [0.17.1] - 2026-05-17
100
101 ### Added
102
103 - `MovableRef` and `Ref` implement `Debug` and `Display` if the referenced type does.
104
105 ### Changed
106
107 - Deprecated `reference` module in favor of `Ref` from the crate root.
108
109 ## [0.17.0] - 2026-05-16
110
111 ### Added
112
113 - `reference` sections support access both as a slice and as a reference at the
114 submission site on all platforms (including WASM).
115 - `movable` sections support reordering and back-reference updates during
116 startup initialization (allowing a "reference" to an item that may move during
117 initialization at the submission site).
118 - `typed` and `mutable` sections have been split: `typed` allows for `const` and
119 `static` items, while `mutable` allows for `const` items and `as_mut_slice`
120 access.
121
122 ### Changed
123
124 - Bumped MSRV to 1.85.0.
125 - Significant rewrite to link-section's internal implementation.
126 - Sections require a type: `#[section(typed)]`, `#[section(untyped)]`,
127 `#[section(mutable)]`, `#[section(movable)]`, or `#[section(reference)]`.
128 - When submitting a fn() with a body to a typed link section, the function's
129 body is not placed in any specific section. To restore the previous behavior,
130 manually split function pointers and bodies:
131
132 ```rust
133 #[section(untyped, aux(main = FN_ARRAY))]
134 pub static FN_BODIES: link_section::Section;
135
136 #[section(typed)]
137 pub static FN_ARRAY: link_section::TypedSection<fn()>;
138
139 #[in_section(FN_ARRAY)]
140 const _: fn() = linked_function;
141
142 #[in_section(FN_BODIES)]
143 pub fn linked_function() {
144 eprintln!("linked_function");
145 }
146 ```
147
148 ## [0.16.1] - 2026-05-11
149
150 ### Changed
151
152 - Repair MSRV breakage for WASM targets.
153
154 ## [0.16.0] - 2026-05-08
155
156 ### Added
157
158 - Support for AIX targets. Requires `-C link-arg=-bdbg:namedsects:ss` (or a
159 recent Rust version that sets this automatically).
160
161 ## [0.15.0] - 2026-05-06
162
163 ### Added
164
165 - Support for `const` items in link sections.
166 - WASM now requires `const` items, and uses `ctor`-like initialization to copy
167 data to a contiguous section. To access link-section slices in WASM in
168 constructor functions, make sure to use `priority = 1`.
169 - Zero-sized types are no longer used in `extern`s. Windows now uses a
170 non-zero-sized alignment marker to align the start and end of the section.
171 Other LLVM/GCC platforms use a `u8`.
172 - `link-section` is now `no_std`-compatible.
173
174 ## [0.14.0] - 2026-05-04
175
176 ### Changed
177
178 - WASM targets now use an extern `read_custom_section` function to read custom
179 sections.
180
181 ## [0.13.1] - 2026-05-02
182
183 ### Changed
184
185 - Documentation polish and typo fixes.
186
187 ## [0.13.0] - 2026-05-02
188
189 ### Changed
190
191 - `used_linker` feature moved to `--cfg linktime_used_linker` flag.
192 - On macOS, `fn` items are placed in a `__TEXT,__text,regular,pure_instructions`
193 section (fixes a linker warning in nightly).
194
195 ## [0.11.0] - 2026-04-28
196
197 ### Changed
198
199 - Macro attributes and crate features are auto-documented.
200
201 ## [0.2.1] - 2026-04-22
202
203 ### Added
204
205 - Included licenses in all files.
206 - Bumped proc-macro dependency versions.
207
208 ### Changed
209
210 - `link-section` crate no longer offers `const` section pointers.