IA64 is as weird as Alpha wrt r/o relocs :)

llvm-svn: 68007
This commit is contained in:
Anton Korobeynikov 2009-03-29 17:14:35 +00:00
parent 014a86f216
commit bea241a5f5
2 changed files with 8 additions and 0 deletions

View 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.

View File

@ -24,6 +24,7 @@ namespace llvm {
struct IA64TargetAsmInfo : public ELFTargetAsmInfo {
explicit IA64TargetAsmInfo(const TargetMachine &TM);
virtual unsigned RelocBehaviour() const;
};