summaryrefslogtreecommitdiff
path: root/gbl/efi/arch/x86/deps.S
AgeCommit message (Collapse)Author
2024-04-26Fix build error due to chkstk/alloca on x86Yecheng Zhao
The `avb_cert_validate_vbmeta_public_key` API uses more than 8KB of stack memory and triggers the compiler to insert calls to function __chkstk() and __alloca() on x86/x86_64 platforms. Although rust libcompiler_builtins does provide the implementations, there are two issues: 1. LLVM mangles the symbol and add an additional underscore to the symbol name, causing link to fail to find the correct one. 2. The implementation is not enabled for x86 uefi build. x86_64 had the same issue but was fixed. But it wasn't ported to x86. As a workaround, for #1 we define mangled symbols that simply jump to the correct one. For #2 we apply the same fix from x86_64 for x86 at build time to and rebuild std from source, until upstream is fixed. Bug: 337114254 Change-Id: Id7bce71a7d5ca08fc79180733e40fc1ec083da57