rust/compiler/rustc_codegen_gcc/src
Manish Goregaokar 38bbc39895
Rollup merge of #105452 - rcvalle:rust-cfi-3, r=bjorn3
Add cross-language LLVM CFI support to the Rust compiler

This PR adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395).

It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue #89653.

Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto).

Thank you again, ``@bjorn3,`` ``@nikic,`` ``@samitolvanen,`` and the Rust community for all the help!
2023-05-03 16:42:48 -07:00
..
back Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
intrinsic Add cross-language LLVM CFI support to the Rust compiler 2023-05-03 22:41:29 +00:00
abi.rs Merge apply_attrs_callsite into call and invoke 2022-10-01 17:01:31 +00:00
allocator.rs Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
asm.rs Rollup merge of #105452 - rcvalle:rust-cfi-3, r=bjorn3 2023-05-03 16:42:48 -07:00
attributes.rs Fix for diagnostics 2023-03-05 12:31:16 -05:00
base.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
builder.rs Add cross-language LLVM CFI support to the Rust compiler 2023-05-03 22:41:29 +00:00
callee.rs rename needs_infer to has_infer 2023-04-27 08:35:19 +01:00
common.rs Use poison instead of undef 2023-03-16 15:07:04 +01:00
consts.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
context.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
coverageinfo.rs Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegen 2021-08-15 08:29:07 -04:00
debuginfo.rs Introduce composite debuginfo. 2022-11-15 17:53:50 +00:00
declare.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
errors.rs Fix for diagnostics 2023-03-05 12:31:16 -05:00
int.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00
lib.rs Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
mono_item.rs rename needs_infer to has_infer 2023-04-27 08:35:19 +01:00
type_.rs Add cross-language LLVM CFI support to the Rust compiler 2023-05-03 22:41:29 +00:00
type_of.rs Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04 2023-03-05 12:03:19 -05:00