[PATCH] D140363: Remove incorrectly implemented -mibt-seal

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 18:52:26 PST 2022


MaskRay created this revision.
MaskRay added reviewers: joaomoreira, kees, nickdesaulniers, pcc, samitolvanen, xiangzhangllvm.
Herald added subscribers: StephenFan, pengfei, hiraditya.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

The option does not work as intended and will not be needed when hidden
visibility is used. A function needs ENDBR if it may be reached
indirectly. If we make ThinLTO combine the address-taken property, then
the condition can be expressed with:

`AddressTaken || (!F.hasLocalLinkage() && (VisibleToRegularObj || !F.hasHiddenVisibility()))`

The current `F.hasAddressTaken()` condition does not take into acount of
address-significance in another bitcode file or ELF relocatable file.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140363

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/X86/x86-cf-protection.c
  llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
  llvm/test/CodeGen/X86/ibtseal-kernel.ll
  llvm/test/CodeGen/X86/ibtseal-large.ll
  llvm/test/CodeGen/X86/ibtseal-small.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140363.484152.patch
Type: text/x-patch
Size: 7972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221220/56dc3af3/attachment.bin>


More information about the cfe-commits mailing list