diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-06-10 16:54:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 16:54:48 +0200 |
| commit | a55b610d7d0039e7c695cedb7bda0c77c888ad7c (patch) | |
| tree | 36dbcb8ee0b4ae67e0c7e014bc432ed6828f959f /compiler/rustc_codegen_llvm/src | |
| parent | b9a578ea27f698b2562c39aacdbe03a9704edcaa (diff) | |
| parent | b030442eb692cdbc30d13613db778aefe7397fa7 (diff) | |
| download | rust-a55b610d7d0039e7c695cedb7bda0c77c888ad7c.tar.gz rust-a55b610d7d0039e7c695cedb7bda0c77c888ad7c.zip | |
Rollup merge of #141992 - folkertdev:probestack-naked-function, r=tgross35
use `#[naked]` for `__rust_probestack` Let's see if this works now. Previously this change was in https://github.com/rust-lang/compiler-builtins/pull/897, but we decided to wait until `compiler-builtins` was a subtree (and also `cfg(bootstrap)` is gone now). r? ``@tgross35`` cc ``@bjorn3`` try-job: `dist-various*` try-job: `test-various*`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 443c2eace55..27fd09745ff 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -5,6 +5,7 @@ use rustc_hir::def_id::DefId; use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, PatchableFunctionEntry}; use rustc_middle::ty::{self, TyCtxt}; use rustc_session::config::{BranchProtection, FunctionReturn, OptLevel, PAuthKey, PacRet}; +use rustc_symbol_mangling::mangle_internal_symbol; use rustc_target::spec::{FramePointer, SanitizerSet, StackProbeType, StackProtector}; use smallvec::SmallVec; @@ -256,11 +257,11 @@ fn probestack_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attribute> { StackProbeType::Inline => "inline-asm", // Flag our internal `__rust_probestack` function as the stack probe symbol. // This is defined in the `compiler-builtins` crate for each architecture. - StackProbeType::Call => "__rust_probestack", + StackProbeType::Call => &mangle_internal_symbol(cx.tcx, "__rust_probestack"), // Pick from the two above based on the LLVM version. StackProbeType::InlineOrCall { min_llvm_version_for_inline } => { if llvm_util::get_version() < min_llvm_version_for_inline { - "__rust_probestack" + &mangle_internal_symbol(cx.tcx, "__rust_probestack") } else { "inline-asm" } |
