summaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetELFWriterInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Target/TargetELFWriterInfo.h')
-rw-r--r--include/llvm/Target/TargetELFWriterInfo.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetELFWriterInfo.h b/include/llvm/Target/TargetELFWriterInfo.h
index a5b30c4..7cb6931 100644
--- a/include/llvm/Target/TargetELFWriterInfo.h
+++ b/include/llvm/Target/TargetELFWriterInfo.h
@@ -97,9 +97,26 @@ namespace llvm {
/// ELF relocation entry.
virtual bool hasRelocationAddend() const = 0;
- /// getAddendForRelTy - Gets the addend value for an ELF relocation entry
- /// based on the target relocation type. If addend is not used returns 0.
- virtual long int getAddendForRelTy(unsigned RelTy) const = 0;
+ /// getDefaultAddendForRelTy - Gets the default addend value for a
+ /// relocation entry based on the target ELF relocation type.
+ virtual long int getDefaultAddendForRelTy(unsigned RelTy,
+ long int Modifier = 0) const = 0;
+
+ /// getRelTySize - Returns the size of relocatable field in bits
+ virtual unsigned getRelocationTySize(unsigned RelTy) const = 0;
+
+ /// isPCRelativeRel - True if the relocation type is pc relative
+ virtual bool isPCRelativeRel(unsigned RelTy) const = 0;
+
+ /// getJumpTableRelocationTy - Returns the machine relocation type used
+ /// to reference a jumptable.
+ virtual unsigned getAbsoluteLabelMachineRelTy() const = 0;
+
+ /// computeRelocation - Some relocatable fields could be relocated
+ /// directly, avoiding the relocation symbol emission, compute the
+ /// final relocation value for this symbol.
+ virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset,
+ unsigned RelTy) const = 0;
};
} // end llvm namespace
OpenPOWER on IntegriCloud