diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-03-29 17:13:49 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-03-29 17:13:49 +0000 |
commit | db2323148b959ffcaf7a3498f94de5fa6d3e6eb7 (patch) | |
tree | 534a5c5db1a56f71f766689222713f4368689253 /include/llvm | |
parent | ab267a28239f628e65bef34578695d80ba6d0a9e (diff) | |
download | llvm-db2323148b959ffcaf7a3498f94de5fa6d3e6eb7.tar.gz llvm-db2323148b959ffcaf7a3498f94de5fa6d3e6eb7.tar.bz2 llvm-db2323148b959ffcaf7a3498f94de5fa6d3e6eb7.tar.xz |
Honour relocation behaviour stuff for ro objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Constant.h | 1 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index bb1b9101c7..6025a70a88 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -20,6 +20,7 @@ namespace llvm { template<typename T> class SmallVectorImpl; namespace Reloc { + const unsigned None = 0; const unsigned Local = 1 << 0; ///< Local relocations are required const unsigned Global = 1 << 1; ///< Global relocations are required const unsigned LocalOrGlobal = Local | Global; diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index b73cdb9c45..73f4374af2 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -577,6 +577,12 @@ namespace llvm { virtual SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; + /// RelocBehaviour - Describes how relocations should be treated when + /// selecting sections. Reloc::Global bit should be set if global + /// relocations should force object to be placed in read-write + /// sections. Reloc::Local bit should be set if local relocations should + /// force object to be placed in read-write sections. + virtual unsigned RelocBehaviour() const; /// SectionFlagsForGlobal - This hook allows the target to select proper /// section flags either for given global or for section. |