Skip to content

Commit b83e585

Browse files
ehussRalfJung
andcommitted
Apply suggestions from RalfJung
Co-authored-by: Ralf Jung <[email protected]>
1 parent 15e83c8 commit b83e585

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/linkage.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ r[link.unwinding]
279279
### Prohibited linkage and unwinding
280280

281281
r[link.unwinding.intro]
282-
Panic unwinding must be supported consistently across the binary per the following rules.
282+
Panic unwinding can only be used if the binary is built consistently according to the following rules.
283283

284284
r[link.unwinding.potential]
285285
A Rust artifact is called *potentially unwinding* if any of the following conditions is met:
@@ -296,8 +296,10 @@ A Rust artifact is called *potentially unwinding* if any of the following condit
296296
297297
r[link.unwinding.prohibited]
298298
If a Rust artifact is potentially unwinding, then all its crates must be built with the `unwind` [panic strategy].
299+
Otherwise, unwinding can cause undefined behavior.
299300

300301
> [!NOTE]
302+
> If you are using `rustc` to link, these rules are enforced automatically.
301303
> If you are *not* using `rustc` to link, you must take care to ensure that unwinding is handled consistently across the entire binary. Linking without `rustc` includes using `dlopen` or similar facilities where linking is done by the system runtime without `rustc` being involved.
302304
>
303305
> This can only happen when mixing code with different [`-C panic`] flags, so most users do not have to be concerned about this.

0 commit comments

Comments
 (0)