summaryrefslogtreecommitdiff
path: root/src/zap
diff options
context:
space:
mode:
Diffstat (limited to 'src/zap')
-rw-r--r--src/zap/zapheaders.cpp2
-rw-r--r--src/zap/zapimage.cpp6
-rw-r--r--src/zap/zapinfo.cpp39
3 files changed, 7 insertions, 40 deletions
diff --git a/src/zap/zapheaders.cpp b/src/zap/zapheaders.cpp
index acec36bf2a..8960798981 100644
--- a/src/zap/zapheaders.cpp
+++ b/src/zap/zapheaders.cpp
@@ -325,7 +325,7 @@ ZapPEExports::ZapPEExports(LPCWSTR dllPath)
DWORD ZapPEExports::GetSize()
{
- return DWORD(sizeof(IMAGE_EXPORT_DIRECTORY) + wcslen(m_dllFileName) + 1);
+ return DWORD(sizeof(IMAGE_EXPORT_DIRECTORY) + wcslen(m_dllFileName) * sizeof(BYTE) + 1);
}
void ZapPEExports::Save(ZapWriter * pZapWriter)
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 27b46520be..61cf099898 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -2620,6 +2620,12 @@ HRESULT ZapImage::parseProfileData()
READ(entry,CORBBTPROF_SECTION_TABLE_ENTRY);
SectionFormat format = sectionHeader->Entries[i].FormatID;
+ _ASSERTE(format >= 0);
+ if (format < 0)
+ {
+ continue;
+ }
+
if (convertFromV1)
{
if (format < LastTokenFlagSection)
diff --git a/src/zap/zapinfo.cpp b/src/zap/zapinfo.cpp
index af0c41c4e4..40d14ae51c 100644
--- a/src/zap/zapinfo.cpp
+++ b/src/zap/zapinfo.cpp
@@ -2656,41 +2656,6 @@ void ZapInfo::getModuleNativeEntryPointRange(void** pStart, void** pEnd)
// Initialize outparams to default range of (0,0).
*pStart = 0;
*pEnd = 0;
-
- // If this is ILONLY, there are no native entry points.
- if (m_pImage->m_ModuleDecoder.IsILOnly())
- {
- return;
- }
-
- rvaStart = rvaEnd = 0;
-
- // Walk the section table looking for a section named .nep.
-
- IMAGE_SECTION_HEADER *section = m_pImage->m_ModuleDecoder.FindFirstSection();
- IMAGE_SECTION_HEADER *sectionEnd = section + m_pImage->m_ModuleDecoder.GetNumberOfSections();
- while (section < sectionEnd)
- {
- if (strncmp((const char *)(section->Name), ".nep", IMAGE_SIZEOF_SHORT_NAME) == 0)
- {
- rvaStart = VAL32(section->VirtualAddress);
- rvaEnd = rvaStart + VAL32(section->Misc.VirtualSize);
- if (rvaStart < rvaEnd)
- {
- // RVA will be fixed up to the actual address at runtime
- CORCOMPILE_EE_INFO_TABLE * pEEInfoTable = (CORCOMPILE_EE_INFO_TABLE *)m_pImage->m_pEEInfoTable->GetData();
- pEEInfoTable->nativeEntryPointStart = (BYTE*)((ULONG_PTR)rvaStart);
- pEEInfoTable->nativeEntryPointEnd = (BYTE*)((ULONG_PTR)rvaEnd);
-
- *pStart = m_pImage->GetInnerPtr(m_pImage->m_pEEInfoTable,
- offsetof(CORCOMPILE_EE_INFO_TABLE, nativeEntryPointStart));
- *pEnd = m_pImage->GetInnerPtr(m_pImage->m_pEEInfoTable,
- offsetof(CORCOMPILE_EE_INFO_TABLE, nativeEntryPointEnd));
- }
- break;
- }
- section++;
- }
}
DWORD ZapInfo::getExpectedTargetArchitecture()
@@ -3195,10 +3160,6 @@ void * ZapInfo::getArrayInitializationData(CORINFO_FIELD_HANDLE field, DWORD siz
if (m_pEEJitInfo->getClassModule(m_pEEJitInfo->getFieldClass(field)) != m_pImage->m_hModule)
return NULL;
- // FieldDesc::SaveContents() does not save the RVA blob for IJW modules.
- if (!m_pImage->m_ModuleDecoder.IsILOnly())
- return NULL;
-
void * arrayData = m_pEEJitInfo->getArrayInitializationData(field, size);
if (!arrayData)
return NULL;