[lld] [LLD] [MinGW] Implement --dependent-load-flag option (PR #113814)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 13:59:19 PST 2024


mstorsjo wrote:

> > And as high level view of what it does - this sets one value in the `_load_config_used` struct, if such a symbol happens to be found at link time, right?
> 
> Yeah, that's how I understand it. Which means it has an effect only when using Control Flow Guard is enabled.

Hmm, but isn't `_load_config_used` linked in whenever it is found in any of the static libraries? https://github.com/llvm/llvm-project/blob/main/lld/COFF/Driver.cpp#L2582-L2584

So with that, `_load_config_used` should mostly always be linked in, and this option should always end up setting the right flags in the load config, or am I missing something? (CC @alvinhochun)

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


More information about the llvm-commits mailing list