llvm-project/llvm/test
Arlo Siemsen 080866470d Add ehcont section support
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.

This change allows llvm to generate the section that contains the appropriate symbol references in the form expected by the msvc linker.

This feature is enabled through a new module flag, ehcontguard, which was modelled on the cfguard flag.

The change includes a test that when the module flag is enabled the section is correctly generated.

The set of exception continuation information includes returns from exceptional control flow (catchret in llvm).

In order to collect catchret we:
1) Includes an additional flag on machine basic blocks to indicate that the given block is the target of a catchret operation,
2) Introduces a new machine function pass to insert and collect symbols at the start of each block, and
3) Combines these targets with the other EHCont targets that were already being collected.

Change originally authored by Daniel Frampton <dframpto@microsoft.com>

For more details, see MSVC documentation for `/guard:ehcont`
  https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D94835
2021-02-15 14:27:12 +08:00
..
Analysis [BasicAA] Merge aliasGEP code paths 2021-02-14 19:35:36 +01:00
Assembler [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
Bindings LLVM-C: Allow LLVM{Get/Set}Alignment on an atomicrmw/cmpxchg instruction. 2021-02-12 18:31:18 -05:00
Bitcode [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
BugPoint
CodeGen Add ehcont section support 2021-02-15 14:27:12 +08:00
DebugInfo DebugInfo/Symbolize: Exclude ARM mapping symbols for .symtab symbolization after D95916 2021-02-12 11:04:20 -08:00
Demangle [Demangle] Support demangling Swift calling convention in MS demangler. 2021-01-27 13:24:54 -08:00
Examples [test][NewPM] Pin various tests to the legacy PM 2021-02-02 15:07:10 -08:00
ExecutionEngine Revert "[JITLink] Add missing symbols for ELF ehframe testcase, re-enable ...." 2021-02-01 13:32:11 +11:00
Feature [test][NewPM] Pin various tests to the legacy PM 2021-02-02 15:07:10 -08:00
FileCheck [FileCheck] Default --allow-unused-prefixes to false 2021-02-08 13:37:04 -08:00
Instrumentation Revert "[InstrProfiling] Use !associated metadata for counters, data and values" 2021-02-03 19:14:34 -05:00
Integer
JitListener
LTO ELFObjectWriter: Don't sort non-local symbols 2021-02-13 10:32:27 -08:00
Linker [llvm-link] Fix crash when materializing appending global 2021-01-25 18:08:07 -08:00
MC ELFObjectWriter: Don't sort non-local symbols 2021-02-13 10:32:27 -08:00
MachineVerifier [GlobalISel] Simpler verification of G_SEXT_INREG and G_ASSERT_ZEXT 2021-02-12 21:33:27 +00:00
Object [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
ObjectYAML [yaml2obj][wasm] Support numeric relocation type 2021-02-02 18:28:37 -08:00
Other [opt][NewPM] Add a --print-passes flag to print all available passes 2021-02-10 11:22:12 -08:00
Reduce [FileCheck] Default --allow-unused-prefixes to false 2021-02-08 13:37:04 -08:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen][GlobalISel] Allow duplicate RendererFns 2021-02-12 15:05:32 +00:00
ThinLTO/X86 [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
Transforms [ARM] Move PhaseOrdering test to the correct place. NFC 2021-02-14 18:43:39 +00:00
Unit Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00
Verifier [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-02-12 09:51:57 -08:00
YAMLParser
tools [gold] Add case being tested by equivalent lld test 2021-02-13 17:09:56 -08:00
.clang-format
CMakeLists.txt Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00
TestRunner.sh
lit.cfg.py [FileCheck] Default --allow-unused-prefixes to false 2021-02-08 13:37:04 -08:00
lit.site.cfg.py.in Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00