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
This commit is contained in:
Anton Korobeynikov 2009-03-29 17:14:14 +00:00
parent db2323148b
commit 01209bc12a
2 changed files with 8 additions and 1 deletions

View File

@ -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);
}

View File

@ -23,6 +23,8 @@ namespace llvm {
struct AlphaTargetAsmInfo : public TargetAsmInfo {
explicit AlphaTargetAsmInfo(const AlphaTargetMachine &TM);
virtual unsigned RelocBehaviour() const;
};
} // namespace llvm