Resubmit "Fix bug in PE/COFF plugin."
The original commit was actually 2 unrelated bug fixes, but it turns out the second bug fix wasn't quite correct, so the entire patch was reverted. Resubmitting this half of the patch by itself, then will follow up with a new patch which fixes the rest of the issue in a more appropriate way. llvm-svn: 346505
This commit is contained in:
@@ -710,7 +710,10 @@ void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) {
|
||||
llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA &&
|
||||
((const_sect_name == g_data_sect_name) ||
|
||||
(const_sect_name == g_DATA_sect_name))) {
|
||||
section_type = eSectionTypeData;
|
||||
if (m_sect_headers[idx].size == 0 && m_sect_headers[idx].offset == 0)
|
||||
section_type = eSectionTypeZeroFill;
|
||||
else
|
||||
section_type = eSectionTypeData;
|
||||
} else if (m_sect_headers[idx].flags &
|
||||
llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA &&
|
||||
((const_sect_name == g_bss_sect_name) ||
|
||||
@@ -1053,6 +1056,7 @@ ObjectFile::Type ObjectFilePECOFF::CalculateType() {
|
||||
}
|
||||
|
||||
ObjectFile::Strata ObjectFilePECOFF::CalculateStrata() { return eStrataUser; }
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// PluginInterface protocol
|
||||
//------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user