IA64 is as weird as Alpha wrt r/o relocs :)
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 29 Mar 2009 17:14:35 +0000 (17:14 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 29 Mar 2009 17:14:35 +0000 (17:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68007 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/IA64/IA64TargetAsmInfo.cpp
lib/Target/IA64/IA64TargetAsmInfo.h

index 5766e138a3c79c16f859c38e473f745fb5db6bf8..2ae8beb9148ed4b33e3f70f939eb640ef5629bad 100644 (file)
@@ -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.
index 6c87777f63f8f804cdb9f93eeb7158cdb81eb43e..130822e887f4daecdaaef54b0c581ab3730728bb 100644 (file)
@@ -24,6 +24,7 @@ namespace llvm {
 
   struct IA64TargetAsmInfo : public ELFTargetAsmInfo {
     explicit IA64TargetAsmInfo(const TargetMachine &TM);
+    virtual unsigned RelocBehaviour() const;
   };