diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-04-07 23:00:38 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-04-07 23:00:38 +0000 |
| commit | 1a8030e73798920aee4868a1137a300b8bfd3ab3 (patch) | |
| tree | f0fae22bb49bfe87c28c78391009a16eed9b5d7b /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 349adbaccace178575426e1e54ccc6c090a9951e (diff) | |
| download | bcm5719-llvm-1a8030e73798920aee4868a1137a300b8bfd3ab3.tar.gz bcm5719-llvm-1a8030e73798920aee4868a1137a300b8bfd3ab3.zip | |
[cfi] Emit __cfi_check stub in the frontend.
Previously __cfi_check was created in LTO optimization pipeline, which
means LLD has no way of knowing about the existence of this symbol
without rescanning the LTO output object. As a result, LLD fails to
export __cfi_check, even when given --export-dynamic-symbol flag.
llvm-svn: 299806
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 479a390648a..6bc7d4f10e2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -406,8 +406,10 @@ void CodeGenModule::Release() { EmitDeferredUnusedCoverageMappings(); if (CoverageMapping) CoverageMapping->emit(); - if (CodeGenOpts.SanitizeCfiCrossDso) + if (CodeGenOpts.SanitizeCfiCrossDso) { CodeGenFunction(*this).EmitCfiCheckFail(); + CodeGenFunction(*this).EmitCfiCheckStub(); + } emitAtAvailableLinkGuard(); emitLLVMUsed(); if (SanStats) |

