Rollup merge of #129316 - dingxiangfei2009:riscv64-imac-scs, r=nnethercote
riscv64imac: allow shadow call stack sanitizer cc `@Darksonn` for shadow call stack sanitizer support on RV64IMAC and RV64GC
This commit is contained in:
commit
a65404aba4
4 changed files with 52 additions and 9 deletions
17
tests/codegen/sanitizer/riscv64-shadow-call-stack.rs
Normal file
17
tests/codegen/sanitizer/riscv64-shadow-call-stack.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
//@ compile-flags: --target riscv64imac-unknown-none-elf -Zsanitizer=shadow-call-stack
|
||||
//@ needs-llvm-components: riscv
|
||||
|
||||
#![allow(internal_features)]
|
||||
#![crate_type = "rlib"]
|
||||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
|
||||
// CHECK: ; Function Attrs:{{.*}}shadowcallstack
|
||||
// CHECK: define dso_local void @foo() unnamed_addr #0
|
||||
#[no_mangle]
|
||||
pub fn foo() {}
|
||||
|
||||
// CHECK: attributes #0 = {{.*}}shadowcallstack{{.*}}
|
Loading…
Add table
Add a link
Reference in a new issue