When linking a DLL with /delayload, lld insert a thunk that will call __delayLoadHelper2 on first invocation of a function located in the delayloaded DLL.
Prior to the call to __delayLoadHelper2, registers are saved on the stack (and restored after) but it seems that, at least on x64, the __delayLoadHelper2 function writes into the top of the stack, overwritting the value of the saved registers.
This change makes the thunk allocate 32 more bytes on the stack but doesn't use them so that __delayLoadHelper2 won't overwrite anything.
Details
Details
- Reviewers
ruiu
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
clang-format: please reformat the code