aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-12-10 20:46:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-12-10 20:46:55 +0000
commit0e77a94fd679004f9881372c2c71e0b952b20d3f (patch)
treec26de07e541a6d285e2a18f9efbdc7baa1d25246 /llvm/lib/Object/COFFObjectFile.cpp
parent87a559212bb345c81776eea4be9fb2adc10f24e3 (diff)
downloadllvm-0e77a94fd679004f9881372c2c71e0b952b20d3f.zip
llvm-0e77a94fd679004f9881372c2c71e0b952b20d3f.tar.gz
llvm-0e77a94fd679004f9881372c2c71e0b952b20d3f.tar.bz2
Move three methods only used by MCJIT to MCJIT.
These methods are only used by MCJIT and are very specific to it. In fact, they are also fairly specific to the fact that we have a dynamic linker of relocatable objects. llvm-svn: 223964
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 92f920d..cde6fdc 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -362,39 +362,11 @@ bool COFFObjectFile::isSectionBSS(DataRefImpl Ref) const {
return Sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
}
-bool COFFObjectFile::isSectionRequiredForExecution(DataRefImpl Ref) const {
- // Sections marked 'Info', 'Remove', or 'Discardable' aren't required for
- // execution.
- const coff_section *Sec = toSec(Ref);
- return !(Sec->Characteristics &
- (COFF::IMAGE_SCN_LNK_INFO | COFF::IMAGE_SCN_LNK_REMOVE |
- COFF::IMAGE_SCN_MEM_DISCARDABLE));
-}
-
bool COFFObjectFile::isSectionVirtual(DataRefImpl Ref) const {
const coff_section *Sec = toSec(Ref);
return Sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
}
-bool COFFObjectFile::isSectionZeroInit(DataRefImpl Ref) const {
- const coff_section *Sec = toSec(Ref);
- return Sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
-}
-
-bool COFFObjectFile::isSectionReadOnlyData(DataRefImpl Ref) const {
- const coff_section *Sec = toSec(Ref);
- // Check if it's any sort of data section.
- if (!(Sec->Characteristics & (COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA |
- COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)))
- return false;
- // If it's writable or executable or contains code, it isn't read-only data.
- if (Sec->Characteristics &
- (COFF::IMAGE_SCN_CNT_CODE | COFF::IMAGE_SCN_MEM_EXECUTE |
- COFF::IMAGE_SCN_MEM_WRITE))
- return false;
- return true;
-}
-
bool COFFObjectFile::sectionContainsSymbol(DataRefImpl SecRef,
DataRefImpl SymbRef) const {
const coff_section *Sec = toSec(SecRef);