release/1.3.1
s 21 lines 943 Bytes
Raw
1 // A no-op `___chkstk_darwin`.
2 //
3 // Rust emits calls to this stack-probe helper on Apple targets, and linking the
4 // staticlib for the embedded ones fails with an undefined symbol unless
5 // something defines it. Probing exists to fault deterministically when a frame
6 // runs off the end of the stack, so a stub changes nothing for code that stays
7 // within its stack and turns an overflow into corruption rather than a trap.
8 // That trade is why this is a workaround and not a design.
9 //
10 // build.rs compiles it for iOS, tvOS, visionOS, and watchOS. If a link ever
11 // fails here with a duplicate symbol rather than a missing one, that means the
12 // toolchain now provides the real thing for that target and it should come off
13 // the list in build.rs. Worth rechecking whenever Xcode or the pinned nightly
14 // moves, because the day every target defines it, this file can go.
15
16 .text
17 .globl ___chkstk_darwin
18 .p2align 2
19
20 ___chkstk_darwin:
21 ret