aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:14 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-03-29 17:14:14 +0000
commit01209bc12a6e94dd6ea69ede06ea8091f5a509a0 (patch)
tree9cf7a519d6c67a0c63761414197f048c2a7d5eed /lib/Target/Alpha
parentdb2323148b959ffcaf7a3498f94de5fa6d3e6eb7 (diff)
downloadexternal_llvm-01209bc12a6e94dd6ea69ede06ea8091f5a509a0.zip
external_llvm-01209bc12a6e94dd6ea69ede06ea8091f5a509a0.tar.gz
external_llvm-01209bc12a6e94dd6ea69ede06ea8091f5a509a0.tar.bz2
Alpha always requires global relocations to be r/w regardless of PIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha')
-rw-r--r--lib/Target/Alpha/AlphaTargetAsmInfo.cpp7
-rw-r--r--lib/Target/Alpha/AlphaTargetAsmInfo.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
index 61fcf83..6092ab6 100644
--- a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
+++ b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
@@ -16,7 +16,7 @@
using namespace llvm;
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
: TargetAsmInfo(TM) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
@@ -24,3 +24,8 @@ AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
JumpTableDataSection = "\t.section .rodata\n";
WeakRefDirective = "\t.weak\t";
}
+
+unsigned AlphaTargetAsmInfo::RelocBehaviour() const {
+ return (TM.getRelocationModel() != Reloc::Static ?
+ Reloc::LocalOrGlobal : Reloc::Global);
+}
diff --git a/lib/Target/Alpha/AlphaTargetAsmInfo.h b/lib/Target/Alpha/AlphaTargetAsmInfo.h
index 0b50de8..7675b26 100644
--- a/lib/Target/Alpha/AlphaTargetAsmInfo.h
+++ b/lib/Target/Alpha/AlphaTargetAsmInfo.h
@@ -23,6 +23,8 @@ namespace llvm {
struct AlphaTargetAsmInfo : public TargetAsmInfo {
explicit AlphaTargetAsmInfo(const AlphaTargetMachine &TM);
+
+ virtual unsigned RelocBehaviour() const;
};
} // namespace llvm