This patch improves the MCJIT runtime dynamic loader by adding new handling

of zero-initialized sections, virtual sections and common symbols
and preventing the loading of sections which are not required for
execution such as debug information.

Patch by Andy Kaylor!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Preston Gurd
2012-04-12 20:13:57 +00:00
parent f0bcecc0d5
commit c68dda815e
28 changed files with 319 additions and 80 deletions

View File

@@ -356,6 +356,27 @@ error_code COFFObjectFile::isSectionBSS(DataRefImpl Sec,
return object_error::success;
}
error_code COFFObjectFile::isSectionRequiredForExecution(DataRefImpl Sec,
bool &Result) const {
// FIXME: Unimplemented
Result = true;
return object_error::success;
}
error_code COFFObjectFile::isSectionVirtual(DataRefImpl Sec,
bool &Result) const {
const coff_section *sec = toSec(Sec);
Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
return object_error::success;
}
error_code COFFObjectFile::isSectionZeroInit(DataRefImpl Sec,
bool &Result) const {
// FIXME: Unimplemented
Result = false;
return object_error::success;
}
error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec,
DataRefImpl Symb,
bool &Result) const {