mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-16 14:26:17 +00:00
This patch adds new functions to the SectionRef and ObjectFile interfaces to determine whether or not a section is meant to be read-only. These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch.
Patch by Ashok Thirumurthi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165586 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -612,6 +612,17 @@ error_code MachOObjectFile::isSectionZeroInit(DataRefImpl DRI,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code MachOObjectFile::isSectionReadOnlyData(DataRefImpl Sec,
|
||||
bool &Result) const {
|
||||
// Consider using the code from isSectionText to look for __const sections.
|
||||
// Alternately, emit S_ATTR_PURE_INSTRUCTIONS and/or S_ATTR_SOME_INSTRUCTIONS
|
||||
// to use section attributes to distinguish code from data.
|
||||
|
||||
// FIXME: Unimplemented.
|
||||
Result = false;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec,
|
||||
DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
|
Reference in New Issue
Block a user