diff options
author | John Chen (JOCHEN7) <jochen@microsoft.com> | 2015-04-28 13:20:01 -0700 |
---|---|---|
committer | John Chen (JOCHEN7) <jochen@microsoft.com> | 2015-04-28 23:15:22 -0700 |
commit | e0c80c5f5c7d395d79aa350a26f46101a78af95d (patch) | |
tree | ec611fcee20f99810a6704c26c2e790884d42976 /src/zap | |
parent | 1827eb2ae3201ccba95ca228d657041c8af3410c (diff) | |
download | coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.tar.gz coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.tar.bz2 coreclr-e0c80c5f5c7d395d79aa350a26f46101a78af95d.zip |
Build crossgen for Linux
- Crossgen is now built as part of coreclr
- Crossgen successfully compiles mscorlib.dll
- Resulting mscorlib.ni.dll not yet usable
Diffstat (limited to 'src/zap')
-rw-r--r-- | src/zap/nativeformatwriter.cpp | 2 | ||||
-rw-r--r-- | src/zap/zapheaders.cpp | 2 | ||||
-rw-r--r-- | src/zap/zapimage.cpp | 5 | ||||
-rw-r--r-- | src/zap/zapimport.cpp | 4 | ||||
-rw-r--r-- | src/zap/zapinfo.cpp | 2 | ||||
-rw-r--r-- | src/zap/zapper.cpp | 8 | ||||
-rw-r--r-- | src/zap/zaprelocs.cpp | 4 | ||||
-rw-r--r-- | src/zap/zapwriter.cpp | 4 |
8 files changed, 21 insertions, 10 deletions
diff --git a/src/zap/nativeformatwriter.cpp b/src/zap/nativeformatwriter.cpp index 1a5cf869f3..5462659eae 100644 --- a/src/zap/nativeformatwriter.cpp +++ b/src/zap/nativeformatwriter.cpp @@ -11,7 +11,7 @@ #include "common.h" -#include "NativeFormatWriter.h" +#include "nativeformatwriter.h" namespace NativeFormat { diff --git a/src/zap/zapheaders.cpp b/src/zap/zapheaders.cpp index 1d201184a2..7df102abf4 100644 --- a/src/zap/zapheaders.cpp +++ b/src/zap/zapheaders.cpp @@ -222,6 +222,7 @@ void ZapVersionResource::Save(ZapWriter * pZapWriter) void ZapImage::CopyWin32VersionResource() { +#ifndef FEATURE_PAL // Copy the version resource over so it is easy to see in the dumps where the ngened module came from COUNT_T cbResourceData; PVOID pResourceData = m_ModuleDecoder.GetWin32Resource(MAKEINTRESOURCE(1), RT_VERSION, &cbResourceData); @@ -237,6 +238,7 @@ void ZapImage::CopyWin32VersionResource() m_pWin32ResourceSection->Place(pVersionData); SetDirectoryEntry(IMAGE_DIRECTORY_ENTRY_RESOURCE, m_pWin32ResourceSection); +#endif } #undef MAKEINTRESOURCE diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp index 67bad6d1ee..3d673bf2bc 100644 --- a/src/zap/zapimage.cpp +++ b/src/zap/zapimage.cpp @@ -1863,6 +1863,9 @@ void ZapImage::OutputTables() // 512 byte alignment, since there is no plan to compress data partitions. SetFileAlignment(0x1000); } +#elif defined(FEATURE_PAL) + // PAL library requires native image sections to align to page bounaries. + SetFileAlignment(0x1000); #endif } @@ -4097,7 +4100,7 @@ HRESULT ZapImage::LocateProfileData() return S_FALSE; } -#if !defined(FEATURE_CORECLR) || defined(FEATURE_WINDOWSPHONE) +#if !defined(FEATURE_PAL) // // See if there's profile data in the resource section of the PE // diff --git a/src/zap/zapimport.cpp b/src/zap/zapimport.cpp index 4867fc687e..22675d8181 100644 --- a/src/zap/zapimport.cpp +++ b/src/zap/zapimport.cpp @@ -341,7 +341,7 @@ ZapGenericSignature * ZapImportTable::GetGenericSignature(PVOID signature, BOOL void * pMemory = new (m_pImage->GetHeap()) BYTE[cbAllocSize.Value()]; pGenericSignature = new (pMemory) ZapGenericSignature(cbSig); - memcpy(pGenericSignature + 1, pSig, cbSig); + memcpy((void *)(pGenericSignature + 1), pSig, cbSig); m_genericSignatures.Add(pGenericSignature); @@ -421,7 +421,7 @@ void ZapImportSectionsTable::Save(ZapWriter * pZapWriter) ZapImportSectionSignatures::ZapImportSectionSignatures(ZapImage * pImage, ZapVirtualSection * pImportSection, ZapVirtualSection * pGCSection) - : m_pImage(pImage), m_pImportSection(pImportSection) + : m_pImportSection(pImportSection), m_pImage(pImage) { if (pGCSection != NULL) { diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp index 6b030288ed..ca2a67b036 100644 --- a/src/zap/zapinfo.cpp +++ b/src/zap/zapinfo.cpp @@ -29,7 +29,9 @@ class MethodDesc; class MethodTable; #include "CompactLayoutWriter.h" #endif +#ifdef MDIL #include "TritonStress.h" +#endif ZapInfo::ZapInfo(ZapImage * pImage, mdMethodDef md, CORINFO_METHOD_HANDLE handle, CORINFO_MODULE_HANDLE module, unsigned methodProfilingDataFlags) : m_pImage(pImage), diff --git a/src/zap/zapper.cpp b/src/zap/zapper.cpp index 56835cac94..1985f83062 100644 --- a/src/zap/zapper.cpp +++ b/src/zap/zapper.cpp @@ -24,7 +24,9 @@ #endif #include "clr/fs/dir.h" +#ifdef FEATURE_FUSION #include "ngenparser.inl" +#endif /* --------------------------------------------------------------------------- * * Error Macros @@ -940,8 +942,8 @@ void Zapper::InitEE(BOOL fForceDebug, BOOL fForceProfile, BOOL fForceInstrument) { // Allow a second jit to be loaded into the system. // - LPWSTR altName; - hr = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_AltJitName, &altName); + LPCWSTR altName; + hr = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_AltJitName, (LPWSTR*)&altName); if (FAILED(hr)) { Error(W("Unable to load alternative Jit Compiler\r\n")); @@ -3504,6 +3506,7 @@ void Zapper::DefineOutputAssembly(SString& strAssemblyName, ULONG * pHashAlgId) ThrowHR(HRESULT_FROM_WIN32(ERROR_INVALID_NAME)); } +#ifndef PLATFORM_UNIX // // We always need a hash since our assembly module is separate from the manifest. // Use MD5 by default. @@ -3511,6 +3514,7 @@ void Zapper::DefineOutputAssembly(SString& strAssemblyName, ULONG * pHashAlgId) if (hashAlgId == 0) hashAlgId = CALG_MD5; +#endif mdAssembly tkEmitAssembly; IfFailThrow(m_pAssemblyEmit->DefineAssembly(pbPublicKey, cbPublicKey, hashAlgId, diff --git a/src/zap/zaprelocs.cpp b/src/zap/zaprelocs.cpp index bea40c3864..2d6859ed0c 100644 --- a/src/zap/zaprelocs.cpp +++ b/src/zap/zaprelocs.cpp @@ -352,7 +352,7 @@ ZapBlobWithRelocs * ZapBlobWithRelocs::NewBlob(ZapWriter * pWriter, PVOID pData, ZapBlobWithRelocs * pZapBlobWithRelocs = new (pMemory) ZapBlobWithRelocs(cbSize); if (pData != NULL) - memcpy(pZapBlobWithRelocs + 1, pData, cbSize); + memcpy((void*)(pZapBlobWithRelocs + 1), pData, cbSize); return pZapBlobWithRelocs; } @@ -383,7 +383,7 @@ public: ZapAlignedBlobWithRelocsConst<alignment> * pZapBlob = new (pMemory) ZapAlignedBlobWithRelocsConst<alignment>(cbSize); if (pData != NULL) - memcpy(pZapBlob + 1, pData, cbSize); + memcpy((void*)(pZapBlob + 1), pData, cbSize); return pZapBlob; } diff --git a/src/zap/zapwriter.cpp b/src/zap/zapwriter.cpp index 6ad554eb0a..09eb8bbc9c 100644 --- a/src/zap/zapwriter.cpp +++ b/src/zap/zapwriter.cpp @@ -628,7 +628,7 @@ ZapBlob * ZapBlob::NewBlob(ZapWriter * pWriter, PVOID pData, SIZE_T cbSize) ZapBlob * pZapBlob = new (pMemory) ZapBlob(cbSize); if (pData != NULL) - memcpy(pZapBlob + 1, pData, cbSize); + memcpy((void*)(pZapBlob + 1), pData, cbSize); return pZapBlob; } @@ -659,7 +659,7 @@ public: ZapAlignedBlobConst<alignment> * pZapBlob = new (pMemory) ZapAlignedBlobConst<alignment>(cbSize); if (pData != NULL) - memcpy(pZapBlob + 1, pData, cbSize); + memcpy((void *)(pZapBlob + 1), pData, cbSize); return pZapBlob; } |