- Revert a revert - KVM is broken

svn path=/trunk/; revision=54622
This commit is contained in:
Rafal Harabien 2011-12-08 23:14:54 +00:00
parent fac5897ff1
commit c3ae29cc85

View file

@ -431,34 +431,6 @@ FindSectionForRVA(DWORD RVA, unsigned NumberOfSections, PIMAGE_SECTION_HEADER Se
return NULL;
}
static int
IncludeRelocationsForSection(PIMAGE_SECTION_HEADER SectionHeader)
{
static char *BlacklistedSections[] =
{
".edata",
".reloc"
};
char SectionName[IMAGE_SIZEOF_SHORT_NAME];
unsigned i;
if (0 != (SectionHeader->Characteristics & IMAGE_SCN_LNK_REMOVE))
{
return 0;
}
for (i = 0; i < sizeof(BlacklistedSections) / sizeof(BlacklistedSections[0]); i++)
{
strncpy(SectionName, BlacklistedSections[i], IMAGE_SIZEOF_SHORT_NAME);
if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME))
{
return 0;
}
}
return 1;
}
static int
ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs,
void *RawData, PIMAGE_OPTIONAL_HEADER OptHeader,
@ -504,7 +476,7 @@ ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs,
{
TargetSectionHeader = FindSectionForRVA(BaseReloc->VirtualAddress, NumberOfSections,
SectionHeaders);
if (NULL != TargetSectionHeader && IncludeRelocationsForSection(TargetSectionHeader))
if (NULL != TargetSectionHeader)
{
AcceptedRelocs = *ProcessedRelocs;
Found = 0;