diff options
-rw-r--r-- | lib/Target/IA64/IA64TargetAsmInfo.cpp | 7 | ||||
-rw-r--r-- | lib/Target/IA64/IA64TargetAsmInfo.h | 1 |
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; }; |