Fix CLRDataCreateInstance export. This was breaking SOS.
Added the right cmake magic so the function is exported properly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e0c2cc567cb7b5072eb71b0ff788da2ffde63a7d
extern VOID STDMETHODCALLTYPE TLS_FreeMasterSlotIndex();
-#if FEATURE_PAL
+#ifdef FEATURE_PAL
DLLEXPORT // For Win32 PAL LoadLibrary emulation
#endif
EXTERN_C BOOL WINAPI DllMain(HANDLE instance, DWORD reason, LPVOID reserved)
// This is the legacy entrypoint to DAC, used by dbgeng/dbghelp (windbg, SOS, watson, etc).
//
//----------------------------------------------------------------------------
+DLLEXPORT
STDAPI
CLRDataCreateInstance(REFIID iid,
ICLRDataTarget * pLegacyTarget,
// Must call Destroy to on interface to free its resources.
//
//---------------------------------------------------------------------------------------
+DLLEXPORT
STDAPI
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
#ifndef _DACDBI_IMPL_H_
#define _DACDBI_IMPL_H_
-// Prototype for creation function
+// Prototype for creation functions
+
+DLLEXPORT
+STDAPI
+CLRDataCreateInstance(REFIID iid,
+ ICLRDataTarget * pLegacyTarget,
+ void ** iface);
+
+DLLEXPORT
STDAPI
-DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
${START_LIBRARY_GROUP} # Start group of libraries that have circular references
cee_dac
cordbee_dac
+ ${START_WHOLE_ARCHIVE} # force all exports to be available
corguids
daccess
+ ${END_WHOLE_ARCHIVE}
dbgutil
mdcompiler_dac
mdhotdata_dac
mscorrc_debug
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
- ${END_WHOLE_ARCHIVE}
palrt
+ ${END_WHOLE_ARCHIVE}
)
endif(WIN32)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-
-#ifdef FEATURE_PAL
-
-#include <clrdata.h>
-
-//
-// This dummy reference to CLRDataCreateInstance prevents the LLVM toolchain from optimizing this important export out.
-//
-#ifdef __GNUC__
-__attribute__((used))
-#endif // __GNUC__
-void
-DummyReferenceToExportedAPI()
-{
- CLRDataCreateInstance(IID_ICLRDataTarget, NULL, NULL);
-}
-
-#endif // FEATURE_PAL