From: Anton Korobeynikov Date: Sun, 29 Mar 2009 17:14:35 +0000 (+0000) Subject: IA64 is as weird as Alpha wrt r/o relocs :) X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=721c2c647e6f3e3b966c8c68f558a52c7dacab06;p=oota-llvm.git 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 --- diff --git a/lib/Target/IA64/IA64TargetAsmInfo.cpp b/lib/Target/IA64/IA64TargetAsmInfo.cpp index 5766e138a3c..2ae8beb9148 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 6c87777f63f..130822e887f 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; };