diff options
author | Preston Gurd <preston.gurd@intel.com> | 2012-04-12 20:13:57 +0000 |
---|---|---|
committer | Preston Gurd <preston.gurd@intel.com> | 2012-04-12 20:13:57 +0000 |
commit | 2138ef6d3d68e0e844f901732749ac57eb3c503f (patch) | |
tree | 7d79b1864caaf3a18eb03f723ed6cf06c64fa772 /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 49a7ef5c2331e77d6a2b9e53b469ab93dd075fff (diff) | |
download | bcm5719-llvm-2138ef6d3d68e0e844f901732749ac57eb3c503f.tar.gz bcm5719-llvm-2138ef6d3d68e0e844f901732749ac57eb3c503f.zip |
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!
llvm-svn: 154610
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 53b15d07ea4..bd27a56e73b 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -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 { |