<div dir="ltr">Hey Peter,<br><br>Currently I still use the custom frontend I have for using lld so it wouldn't be much use to do that.<br>I'm looking to get all the other components merged before I submit an in process shim like Rui suggested.<br><br>I think the best way to approach this would be from MSVC terms.<br><br>Before <span style="font-size:12.8px">rL289280 we had some sort of priority for deciding on which symbol to link.</span><br><span style="font-size:12.8px"><br>MSVC Link.exe defines a flag called /FORCE <a href="https://msdn.microsoft.com/en-us/library/70abkas3.aspx">https://msdn.microsoft.com/en-us/library/70abkas3.aspx</a> </span><br>We currently implement /FORCE:UNRESOLVED from what I see in the driver.<br>I would need /FORCE:MULTIPLE to have this functionality back.<br><br>I'm not sure how we would go about implementing that since that commit brings us further away from that.<br>Feedback on what we should do for /FORCE:MULTIPLE would be a good place to start.<br><br>Best,<br>Martell<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 11, 2017 at 6:41 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Would it be possible to share a repro.tar file created with /linkrepro so that we can reproduce the problem?</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, May 11, 2017 at 3:00 AM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There are a few things running in parallel and thanks for taking the time to review and help me get this in tree.<div>I wanted to follow up with a question on the linker side of things.<div><br></div><div>Since rL289280 I can no longer link programs with the mingw-crt because of dup function errors of the main function.</div><div><br></div><div>In mingw-w64-crt/crt/crtexe.c a main function is called from __tmainCRTStartup</div><div>mingw-w64-crt/crt/crt0_c.c defines this main and calls WinMain in the case where main does not exist.</div><div>What used to happen before was the crt0_c.c main would be ignored at link time because of priority on the users main function but now I just get a dup symbol error as there is no checking on priority anymore.</div><div><br></div></div></div><div class="m_-8209548303983919132HOEnZb"><div class="m_-8209548303983919132h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 27, 2017 at 7:00 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Just to follow up here I found some time to progress.<br>Anyone who wants to follow along can see here.<br><a href="https://reviews.llvm.org/D29892" target="_blank">https://reviews.llvm.org/D2989<wbr>2</a><br><br>Kind Regards<span class="m_-8209548303983919132m_-1683425470177692784HOEnZb"><font color="#888888"><br>Martell</font></span></div><div class="m_-8209548303983919132m_-1683425470177692784HOEnZb"><div class="m_-8209548303983919132m_-1683425470177692784h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 14, 2017 at 2:21 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-8209548303983919132m_-1683425470177692784m_-6892423382837528502HOEnZb"><div class="m_-8209548303983919132m_-1683425470177692784m_-6892423382837528502h5"><div dir="ltr"><div><div>The code in LLD is somewhat tightly coupled with the rest of the linker. Probably it is better to create a new library rather than trying to split LLD into two. I believe this would result in a better API. Of course you can reuse code, but what we need is a clean interface.</div><div><br></div><div>The library shouldn't be complicated. In fact, it would export only one function.</div><div><br></div><div>  std::vector<uint8_t> createImportLibrary(std::vecto<wbr>r<ExportSymbol>)</div><div><br></div><div>I.e. it takes a list of DLLExported symbols and returns a .lib file. ExportSymbol type contains information about DLLExported symbols.</div></div></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-8209548303983919132gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</font></span></div>
</blockquote></div><br></div>