[lld] [LLD][COFF] Set __guard_flags to CF_INSTRUMENTED if any object is instrumented (PR #115374)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 13:46:31 PST 2024


cjacek wrote:

I noticed this issue while examining load config differences between LLD and MSVC for ARM64EC. After some experimentation, I found that this behavior isn’t unique to ARM64EC: `__guard_flags` is marked as `CF_INSTRUMENTED` if any input object is built with `/guard:cf`. On ARM64EC, the load config from `msvcrt` pulls in additional code, which is enough to trigger this flag.

Since LLD has functioned well without this behavior so far, it’s unlikely to matter in practice. However, implementing it for compatibility seems straightforward enough.

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


More information about the llvm-commits mailing list