rust/compiler/rustc_codegen_ssa/src/back
Michael Goulet 1fb2624205
Rollup merge of #118013 - sivadeilra:user/ardavis/ehcont, r=wesleywiser
Enable Rust to use the EHCont security feature of Windows

In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling.

The required support for EHCONT Guard has already been merged into LLVM, long ago. This change simply adds the Rust codegen option to enable it.

Relevant LLVM change: https://reviews.llvm.org/D40223

This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std.

We at Microsoft have been using this feature for a significant period of time; we are confident that the LLVM feature, when enabled, generates well-formed code.

We currently enable EHCONT using a codegen feature, but I'm certainly open to refactoring this to be a target feature instead, or to use any appropriate mechanism to enable it.
2023-11-22 09:28:50 -08:00
..
rpath Handle non-utf8 rpaths (fix FIXME) 2023-08-03 20:04:18 +02:00
archive.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
command.rs Reduce usage of Symbol in the linker code 2022-06-28 18:38:36 +00:00
link.rs Rollup merge of #118013 - sivadeilra:user/ardavis/ehcont, r=wesleywiser 2023-11-22 09:28:50 -08:00
linker.rs Rollup merge of #118013 - sivadeilra:user/ardavis/ehcont, r=wesleywiser 2023-11-22 09:28:50 -08:00
lto.rs Merge new_metadata into codegen_allocator 2022-04-30 21:20:08 +02:00
metadata.rs Add arm64e-apple-ios target 2023-11-15 14:55:18 +04:00
mod.rs Use the object crate for metadata reading 2021-05-07 18:48:58 +02:00
rpath.rs rustc_codegen_ssa: use try_canonicalize in rpath 2023-10-06 09:54:11 -04:00
symbol_export.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
write.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00