<div dir="ltr">This is the stdcall mangling, which lots of win32 APIs use.  The function pops the number of bytes it receives as arguments, and that's 12 in this case.  There's an implementation in llvm/lib/Target/Mangler.cpp.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 11:14 PM, 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">
Author: ruiu<br>
Date: Fri Dec 27 01:14:34 2013<br>
New Revision: 198072<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198072&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198072&view=rev</a><br>
Log:<br>
[PECOFF] Change the DLL entry symbol.<br>
<br>
I'm not 100% sure but it looks like DLL entry symbol (DLL initializer function<br>
name) should be _DllMainCRTStartup@12. The reason why I'm not very sure is<br>
because I have no idea what "@12" suffix is, but without it the symbol won't<br>
be resolved...<br>
<br>
Modified:<br>
    lld/trunk/lib/Driver/WinLinkDriver.cpp<br>
<br>
Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=198072&r1=198071&r2=198072&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=198072&r1=198071&r2=198072&view=diff</a><br>

==============================================================================<br>
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)<br>
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Dec 27 01:14:34 2013<br>
@@ -572,7 +572,7 @@ void processLibEnv(PECOFFLinkingContext<br>
 // subsystem. These default names are MS CRT compliant.<br>
 StringRef getDefaultEntrySymbolName(PECOFFLinkingContext &context) {<br>
   if (context.getImageType() == PECOFFLinkingContext::ImageType::IMAGE_DLL)<br>
-    return "_DllMainCRTStartup";<br>
+    return "_DllMainCRTStartup@12";<br>
   llvm::COFF::WindowsSubsystem subsystem = context.getSubsystem();<br>
   if (subsystem == llvm::COFF::WindowsSubsystem::IMAGE_SUBSYSTEM_WINDOWS_GUI)<br>
     return "WinMainCRTStartup";<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>