aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/X86/X86ELFWriterInfo.cpp5
-rw-r--r--lib/Target/X86/X86ELFWriterInfo.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/X86/X86ELFWriterInfo.cpp b/lib/Target/X86/X86ELFWriterInfo.cpp
index 4002e26530..4e4b6f1d91 100644
--- a/lib/Target/X86/X86ELFWriterInfo.cpp
+++ b/lib/Target/X86/X86ELFWriterInfo.cpp
@@ -102,7 +102,8 @@ unsigned X86ELFWriterInfo::getRelocationTySize(unsigned RelTy) const {
return 0;
}
-unsigned X86ELFWriterInfo::getJumpTableMachineRelocationTy() const {
- return X86::reloc_absolute_dword;
+unsigned X86ELFWriterInfo::getAbsoluteLabelMachineRelTy() const {
+ return is64Bit ?
+ X86::reloc_absolute_dword : X86::reloc_absolute_word;
}
diff --git a/lib/Target/X86/X86ELFWriterInfo.h b/lib/Target/X86/X86ELFWriterInfo.h
index f372658f70..7782a5b12f 100644
--- a/lib/Target/X86/X86ELFWriterInfo.h
+++ b/lib/Target/X86/X86ELFWriterInfo.h
@@ -58,7 +58,7 @@ namespace llvm {
/// getJumpTableRelocationTy - Returns the machine relocation type used
/// to reference a jumptable.
- virtual unsigned getJumpTableMachineRelocationTy() const;
+ virtual unsigned getAbsoluteLabelMachineRelTy() const;
};
} // end llvm namespace