[llvm] [llvm-objcopy][COFF] Update WinCFGuard section contents after stripping (PR #153322)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 09:16:03 PDT 2025


e-kud wrote:

> > It is still not a universal solution, as actually .symidx could be used in any section but WinCFGuard sections consist only of them.
> 
> Going through places where we use emitCOFFSymbolIndex() in LLVM, there's also `.gehcont$y` (for `/guard:ehcont`), `.impcall` (AArch64 import call optimization), and `.hybmp$x` (Arm64EC).

This is true. `ehcontguard` has the same structure as cfguards,  `.hybmp$x` has a structure of `<id, id, kind>`. `.impcall` is something the most hard to support. It has a format of `<size, sec number, [<0x13, sym offset, sym id>]>`. For the last, notice, it is not only about symbol index but also about section numbers. They are changing as well. This is completely ignored now

https://github.com/llvm/llvm-project/pull/153322


More information about the llvm-commits mailing list