summaryrefslogtreecommitdiff
path: root/src/dlls/mscorpe/ceefilegenwriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dlls/mscorpe/ceefilegenwriter.cpp')
-rw-r--r--src/dlls/mscorpe/ceefilegenwriter.cpp19
1 files changed, 13 insertions, 6 deletions
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