mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +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:
@ -163,6 +163,7 @@ public:
|
||||
error_code isRequiredForExecution(bool &Result) const;
|
||||
error_code isVirtual(bool &Result) const;
|
||||
error_code isZeroInit(bool &Result) const;
|
||||
error_code isReadOnlyData(bool &Result) const;
|
||||
|
||||
error_code containsSymbol(SymbolRef S, bool &Result) const;
|
||||
|
||||
@ -316,6 +317,7 @@ protected:
|
||||
// A section is 'virtual' if its contents aren't present in the object image.
|
||||
virtual error_code isSectionVirtual(DataRefImpl Sec, bool &Res) const = 0;
|
||||
virtual error_code isSectionZeroInit(DataRefImpl Sec, bool &Res) const = 0;
|
||||
virtual error_code isSectionReadOnlyData(DataRefImpl Sec, bool &Res) const = 0;
|
||||
virtual error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb,
|
||||
bool &Result) const = 0;
|
||||
virtual relocation_iterator getSectionRelBegin(DataRefImpl Sec) const = 0;
|
||||
@ -510,6 +512,10 @@ inline error_code SectionRef::isZeroInit(bool &Result) const {
|
||||
return OwningObject->isSectionZeroInit(SectionPimpl, Result);
|
||||
}
|
||||
|
||||
inline error_code SectionRef::isReadOnlyData(bool &Result) const {
|
||||
return OwningObject->isSectionReadOnlyData(SectionPimpl, Result);
|
||||
}
|
||||
|
||||
inline error_code SectionRef::containsSymbol(SymbolRef S, bool &Result) const {
|
||||
return OwningObject->sectionContainsSymbol(SectionPimpl, S.SymbolPimpl,
|
||||
Result);
|
||||
|
Reference in New Issue
Block a user