|
1
|
// tvos_chkstk.s — stub for ___chkstk_darwin on tvOS |
|
2
|
// |
|
3
|
// On macOS and iOS, ___chkstk_darwin is provided by libSystem as a stack |
|
4
|
// probing function. On arm64 Apple platforms the kernel grows the stack |
|
5
|
// automatically via guard pages, so the probe is effectively a no-op that |
|
6
|
// just returns. tvOS does NOT export this symbol, but aws-lc-sys assembly |
|
7
|
// references it unconditionally. |
|
8
|
// |
|
9
|
// This file provides the missing symbol so the linker succeeds. |
|
10
|
// It is only compiled for tvOS targets (see build.rs). |
|
11
|
// |
|
12
|
// Symbol naming: |
|
13
|
// Mach-O adds one leading underscore to C symbols automatically. |
|
14
|
// The linker error says: Undefined symbol "___chkstk_darwin" |
|
15
|
// That means the C-level name is "__chkstk_darwin" (two underscores). |
|
16
|
// In assembly we write the raw Mach-O symbol = "___chkstk_darwin" (three underscores). |
|
17
|
|
|
18
|
.text |
|
19
|
.globl ___chkstk_darwin |
|
20
|
.p2align 2 |
|
21
|
|
|
22
|
___chkstk_darwin: |
|
23
|
ret |