aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/IA64
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:35 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:35 +0000
commit721c2c647e6f3e3b966c8c68f558a52c7dacab06 (patch)
tree427724e3bfa83cee39145c33aec46f61932868f3 /lib/Target/IA64
parent01209bc12a6e94dd6ea69ede06ea8091f5a509a0 (diff)
downloadexternal_llvm-721c2c647e6f3e3b966c8c68f558a52c7dacab06.zip
external_llvm-721c2c647e6f3e3b966c8c68f558a52c7dacab06.tar.gz
external_llvm-721c2c647e6f3e3b966c8c68f558a52c7dacab06.tar.bz2
IA64 is as weird as Alpha wrt r/o relocs :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/IA64')
-rw-r--r--lib/Target/IA64/IA64TargetAsmInfo.cpp7
-rw-r--r--lib/Target/IA64/IA64TargetAsmInfo.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/IA64/IA64TargetAsmInfo.cpp b/lib/Target/IA64/IA64TargetAsmInfo.cpp
index 5766e13..2ae8beb 100644
--- a/lib/Target/IA64/IA64TargetAsmInfo.cpp
+++ b/lib/Target/IA64/IA64TargetAsmInfo.cpp
@@ -12,6 +12,8 @@
//===----------------------------------------------------------------------===//
#include "IA64TargetAsmInfo.h"
+#include "llvm/Constants.h"
+#include "llvm/Target/TargetMachine.h"
using namespace llvm;
@@ -34,4 +36,9 @@ IA64TargetAsmInfo::IA64TargetAsmInfo(const TargetMachine &TM):
ConstantPoolSection = "\n\t.section .data, \"aw\", \"progbits\"\n";
}
+unsigned IA64TargetAsmInfo::RelocBehaviour() const {
+ return (TM.getRelocationModel() != Reloc::Static ?
+ Reloc::LocalOrGlobal : Reloc::Global);
+}
+
// FIXME: Support small data/bss/rodata sections someday.
diff --git a/lib/Target/IA64/IA64TargetAsmInfo.h b/lib/Target/IA64/IA64TargetAsmInfo.h
index 6c87777..130822e 100644
--- a/lib/Target/IA64/IA64TargetAsmInfo.h
+++ b/lib/Target/IA64/IA64TargetAsmInfo.h
@@ -24,6 +24,7 @@ namespace llvm {
struct IA64TargetAsmInfo : public ELFTargetAsmInfo {
explicit IA64TargetAsmInfo(const TargetMachine &TM);
+ virtual unsigned RelocBehaviour() const;
};