[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-08 Thread Alexandre Ganea via cfe-commits
aganea wrote: Thanks for the answer. Are these new flags `-fms-hotpatch-functions-file=` and `-fms-hotpatch-functions-list=` populated with data maintained manually by the Windows developpers? If I understand correctly, what you describe as "symbols that were hot-patched" means functions tha

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-08 Thread Alexandre Ganea via cfe-commits
aganea wrote: Oh so all this dance (`_ref_` and the additional metadata) is for code page integrity purposes? To keep them unmodified in memory? So how does then the kernel use the PE metadata if it doesn't patch the code memory pages of the initial (running) image? Is there an additional mech

[clang] [llvm] Add support for Windows hot-patching (PR #138972)

2025-05-08 Thread Alexandre Ganea via cfe-commits
@@ -0,0 +1,20 @@ +// This verifies that hotpatch function attributes are correctly propagated when compiling directly to OBJ. +// +// RUN: %clang_cl -c --target=x86_64-windows-msvc -O2 /Z7 -fms-hotpatch-functions-file=%S/ms-hotpatch-functions.txt /Fo%t.obj %s ag

<    1   2   3