summaryrefslogtreecommitdiff
path: root/src/dlls
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/dlls
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/dlls')
-rw-r--r--src/dlls/dbgshim/dbgshim.cpp2
-rw-r--r--src/dlls/mscordac/CMakeLists.txt8
-rw-r--r--src/dlls/mscordac/mscordac_unixexports.src16
-rw-r--r--src/dlls/mscoree/coreclr/coreclr.nativeproj6
-rw-r--r--src/dlls/mscoree/mscoree.cpp2
-rw-r--r--src/dlls/mscoree/mscorwks_unixexports.src1
-rw-r--r--src/dlls/mscoree/unixinterface.cpp26
-rw-r--r--src/dlls/mscorpe/ceefilegenwriter.cpp19
8 files changed, 52 insertions, 28 deletions
diff --git a/src/dlls/dbgshim/dbgshim.cpp b/src/dlls/dbgshim/dbgshim.cpp
index 4d6dc5a6e3..aeee778543 100644
--- a/src/dlls/dbgshim/dbgshim.cpp
+++ b/src/dlls/dbgshim/dbgshim.cpp
@@ -433,7 +433,7 @@ public:
DWORD arrayLength = 0;
// Wake up runtime(s)
- HRESULT hr = InternalEnumerateCLRs(&handleArray, &stringArray, &arrayLength);
+ HRESULT hr = EnumerateCLRs(m_processId, &handleArray, &stringArray, &arrayLength);
if (SUCCEEDED(hr))
{
WakeRuntimes(handleArray, arrayLength);
diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt
index 02bba4a058..8780db904d 100644
--- a/src/dlls/mscordac/CMakeLists.txt
+++ b/src/dlls/mscordac/CMakeLists.txt
@@ -45,6 +45,10 @@ if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD OR CLR_CMAKE_PLATFORM_
set(START_LIBRARY_GROUP -Wl,--start-group)
set(END_LIBRARY_GROUP -Wl,--end-group)
+ # These options are used to force every object to be included even if it's unused.
+ set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
+ set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive)
+
# Add linker exports file option
set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE})
endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD OR CLR_CMAKE_PLATFORM_NETBSD)
@@ -112,7 +116,9 @@ if(WIN32)
else(WIN32)
list(APPEND COREDAC_LIBRARIES
mscorrc_debug
+ ${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
+ ${END_WHOLE_ARCHIVE}
palrt
)
endif(WIN32)
@@ -120,4 +126,4 @@ endif(WIN32)
target_link_libraries(mscordaccore PRIVATE ${COREDAC_LIBRARIES})
# add the install targets
-install_clr(mscordaccore) \ No newline at end of file
+install_clr(mscordaccore)
diff --git a/src/dlls/mscordac/mscordac_unixexports.src b/src/dlls/mscordac/mscordac_unixexports.src
index 466a1bf1f5..7d60c1ed4b 100644
--- a/src/dlls/mscordac/mscordac_unixexports.src
+++ b/src/dlls/mscordac/mscordac_unixexports.src
@@ -26,6 +26,7 @@ PAL_GetSymbolModuleBase
PAL_GetTransportPipeName
PAL_InitializeDLL
PAL_IsDebuggerPresent
+PAL_ProbeMemory
PAL_iswspace
PAL_memcpy
PAL_malloc
@@ -49,12 +50,15 @@ PAL_wcsstr
_wcsicmp
_stricmp
-_snprintf
-_snwprintf
-_vsnwprintf
-_itow
-_i64tow
+sprintf_s
+swprintf_s
+_snwprintf_s
+_vsnprintf_s
+_vsnwprintf_s
+_itow_s
+_i64tow_s
memcpy_s
+sscanf_s
CoCreateGuid
CopyFileW
@@ -171,4 +175,4 @@ _ZN25NativeExceptionHolderBase4PushEv
_ZN25NativeExceptionHolderBaseC2Ev
_ZN25NativeExceptionHolderBaseD2Ev
_ZN28CatchHardwareExceptionHolderC1Ev
-_ZN28CatchHardwareExceptionHolderD1Ev \ No newline at end of file
+_ZN28CatchHardwareExceptionHolderD1Ev
diff --git a/src/dlls/mscoree/coreclr/coreclr.nativeproj b/src/dlls/mscoree/coreclr/coreclr.nativeproj
index d9350bcf4c..484790ee6f 100644
--- a/src/dlls/mscoree/coreclr/coreclr.nativeproj
+++ b/src/dlls/mscoree/coreclr/coreclr.nativeproj
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="dogfood">
+ <PropertyGroup>
+ <!-- Work around problems with loading System.Private.CoreLib.dll, -->
+ <!-- caused by inconsistent setting of UseLegacyCompiler and FeatureSpanOfT -->
+ <!-- between System.Private.CoreLib.dll and the runtime. -->
+ <UseLegacyCompiler>true</UseLegacyCompiler>
+ </PropertyGroup>
<Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\clr.props" />
<Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\src\dlls\mscoree\mscoree.settings.targets" />
<PropertyGroup Label="Globals">
diff --git a/src/dlls/mscoree/mscoree.cpp b/src/dlls/mscoree/mscoree.cpp
index 3d33337c62..4c613fff6a 100644
--- a/src/dlls/mscoree/mscoree.cpp
+++ b/src/dlls/mscoree/mscoree.cpp
@@ -75,8 +75,6 @@ HINSTANCE g_hThisInst; // This library.
#include <process.h> // for __security_init_cookie()
-void* __stdcall GetCLRFunction(LPCSTR FunctionName);
-
extern "C" IExecutionEngine* __stdcall IEE();
#ifdef NO_CRT_INIT
diff --git a/src/dlls/mscoree/mscorwks_unixexports.src b/src/dlls/mscoree/mscorwks_unixexports.src
index 9c151a942c..f7862d3afe 100644
--- a/src/dlls/mscoree/mscorwks_unixexports.src
+++ b/src/dlls/mscoree/mscorwks_unixexports.src
@@ -98,6 +98,7 @@ UnlockFile
UnmapViewOfFile
VirtualAlloc
VirtualFree
+GlobalMemoryStatusEx
VirtualQuery
WideCharToMultiByte
WriteFile
diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp
index 8d75ff2721..edd361c0c2 100644
--- a/src/dlls/mscoree/unixinterface.cpp
+++ b/src/dlls/mscoree/unixinterface.cpp
@@ -247,21 +247,23 @@ int coreclr_initialize(
host.SuppressRelease();
*hostHandle = host;
#ifdef FEATURE_GDBJIT
-
- hr = coreclr_create_delegate(*hostHandle,
- *domainId,
- "SOS.NETCore",
- "SOS.SymbolReader",
- "GetInfoForMethod",
- (void**)&getInfoForMethodDelegate);
-
- if (!SUCCEEDED(hr))
+ HRESULT createDelegateResult;
+ createDelegateResult = coreclr_create_delegate(*hostHandle,
+ *domainId,
+ "SOS.NETCore",
+ "SOS.SymbolReader",
+ "GetInfoForMethod",
+ (void**)&getInfoForMethodDelegate);
+
+#if defined(_DEBUG)
+ if (!SUCCEEDED(createDelegateResult))
{
fprintf(stderr,
- "Can't create delegate for 'System.Diagnostics.Debug.SymbolReader.SymbolReader.GetInfoForMethod' "
- "method - status: 0x%08x\n", hr);
+ "Can't create delegate for 'SOS.SymbolReader.GetInfoForMethod' "
+ "method - status: 0x%08x\n", createDelegateResult);
}
- hr = S_OK; // We don't need to fail if we can't create delegate
+#endif // _DEBUG
+
#endif
}
return hr;
diff --git a/src/dlls/mscorpe/ceefilegenwriter.cpp b/src/dlls/mscorpe/ceefilegenwriter.cpp
index cfd1ebb644..04bacd7a07 100644
--- a/src/dlls/mscorpe/ceefilegenwriter.cpp
+++ b/src/dlls/mscorpe/ceefilegenwriter.cpp
@@ -973,7 +973,7 @@ BOOL RunProcess(LPCWSTR tempResObj, LPCWSTR pszFilename, DWORD* pdwExitCode, PEW
if (FAILED(GetClrSystemDirectory(wszSystemDir)))
return FALSE;
- WCHAR* wzMachine;
+ const WCHAR* wzMachine;
if(pewriter.isIA64())
wzMachine = L"IA64";
else if(pewriter.isAMD64())
@@ -1167,6 +1167,13 @@ HRESULT CeeFileGenWriter::emitResourceSection()
const BYTE *pbStartOfMappedMem;
IMAGE_SECTION_HEADER *rsrc[2] = { NULL, NULL };
S_SIZE_T cbTotalSizeOfRawData;
+
+ char *data = NULL;
+ SIZE_T cReloc = 0;
+ IMAGE_RELOCATION *pReloc = NULL;
+ SIZE_T cSymbol = 0;
+ IMAGE_SYMBOL *pSymbolTable = NULL;
+
// create a mapped view of the .res file
pParam->hFile = WszCreateFile(pParam->szResFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (pParam->hFile == INVALID_HANDLE_VALUE)
@@ -1308,7 +1315,7 @@ HRESULT CeeFileGenWriter::emitResourceSection()
if (FAILED(pParam->hr)) goto lDone;
rsrcSection->directoryEntry(IMAGE_DIRECTORY_ENTRY_RESOURCE);
- char *data = rsrcSection->getBlock(static_cast<unsigned>(cbTotalSizeOfRawData.Value()), 8);
+ data = rsrcSection->getBlock(static_cast<unsigned>(cbTotalSizeOfRawData.Value()), 8);
if(data == NULL)
{
pParam->hr = E_OUTOFMEMORY;
@@ -1319,11 +1326,11 @@ HRESULT CeeFileGenWriter::emitResourceSection()
memcpy(data, (char *)pParam->hMod + VAL32(rsrc[0]->PointerToRawData), VAL32(rsrc[0]->SizeOfRawData));
// Map all the relocs in .rsrc$01 using the reloc and symbol tables in the COFF object.,
- SIZE_T cReloc = 0; // Total number of relocs
- IMAGE_RELOCATION *pReloc = NULL; // Reloc table start
+ cReloc = 0; // Total number of relocs
+ pReloc = NULL; // Reloc table start
- SIZE_T cSymbol = 0; // Total number of symbols
- IMAGE_SYMBOL *pSymbolTable = NULL; // Symbol table start
+ cSymbol = 0; // Total number of symbols
+ pSymbolTable = NULL; // Symbol table start
{
// Check that the relocations and symbols lie within the resource