<div dir="ltr">Hi all,<br><div><br></div><div>While working on alias support for the LLVM-ML project, I ran into a feature implemented back in 2010: default-null weak externals in COFF, a GNU extension.</div><div><a href="https://reviews.llvm.org/rG17990d56907b">https://reviews.llvm.org/rG17990d56907b</a><br></div><div><div></div><div>I'd like to disable this feature when targeting MSVC compatibility. Does anyone have more context on this, and why it'd be a terrible idea?<br></div></div><div><br></div><div>For context: This seems to be designed to let LLVM implement a GNU extension in COFF libraries. However, it leads to very different behavior than we see for cl.exe (and ml.exe) on Windows; for already-defined aliasees, it injects an alternate placeholder ".weak.<alias>.default.<uniquifier>" symbol which resolves back to the current location. I admit, I'm not quite sure how this helps. If anyone can explain the purpose, I'd really appreciate it!</div><div><br></div><div>In Windows PE/COFF files, aliases typically just resolve to their target symbol. For an example, seeĀ <a href="https://reviews.llvm.org/D87403#inline-811289">https://reviews.llvm.org/D87403#inline-811289</a>.</div><div><br></div><div>Thanks,</div><div>- Eric</div><div><br></div><div><br></div></div>