[lld] r198072 - [PECOFF] Change the DLL entry symbol.

Rui Ueyama ruiu at google.com
Thu Dec 26 23:14:34 PST 2013


Author: ruiu
Date: Fri Dec 27 01:14:34 2013
New Revision: 198072

URL: http://llvm.org/viewvc/llvm-project?rev=198072&view=rev
Log:
[PECOFF] Change the DLL entry symbol.

I'm not 100% sure but it looks like DLL entry symbol (DLL initializer function
name) should be _DllMainCRTStartup at 12. The reason why I'm not very sure is
because I have no idea what "@12" suffix is, but without it the symbol won't
be resolved...

Modified:
    lld/trunk/lib/Driver/WinLinkDriver.cpp

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=198072&r1=198071&r2=198072&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Fri Dec 27 01:14:34 2013
@@ -572,7 +572,7 @@ void processLibEnv(PECOFFLinkingContext
 // subsystem. These default names are MS CRT compliant.
 StringRef getDefaultEntrySymbolName(PECOFFLinkingContext &context) {
   if (context.getImageType() == PECOFFLinkingContext::ImageType::IMAGE_DLL)
-    return "_DllMainCRTStartup";
+    return "_DllMainCRTStartup at 12";
   llvm::COFF::WindowsSubsystem subsystem = context.getSubsystem();
   if (subsystem == llvm::COFF::WindowsSubsystem::IMAGE_SUBSYSTEM_WINDOWS_GUI)
     return "WinMainCRTStartup";





More information about the llvm-commits mailing list