[PATCH] D150508: [LLD] Do not assume /guard:cf always set together with /guard:ehcont
    Reid Kleckner via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 15 12:58:57 PDT 2023
    
    
  
rnk added inline comments.
================
Comment at: lld/COFF/Writer.cpp:1735-1740
     // If the object was compiled with /guard:cf, the address taken symbols
     // are in .gfids$y sections, the longjmp targets are in .gljmp$y sections,
     // and ehcont targets are in .gehcont$y sections. If the object was not
     // compiled with /guard:cf, we assume there were no setjmp and ehcont
     // targets, and that all code symbols with relocations are possibly
     // address-taken.
----------------
Please update this comment to avoid discussing EH continuations.
My understanding is that if you compile with `/guard:ehcont-` and link with `/guard:ehcont`, then attempts to catch exceptions in the unprotected object files will crash the program with control flow violations, but correct me if I am wrong. There is no attempt to conservatively handle objects that catch exceptions but not `/guard:ehcont`, they must all be recompiled with EH continuations, correct?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150508/new/
https://reviews.llvm.org/D150508
    
    
More information about the llvm-commits
mailing list