/// getJumpTableRelocationTy - Returns the machine relocation type used
/// to reference a jumptable.
- virtual unsigned getJumpTableMachineRelocationTy() const = 0;
+ virtual unsigned getAbsoluteLabelMachineRelTy() const = 0;
};
} // end llvm namespace
// Each MBB entry in the Jump table section has a relocation entry
// against the current text section.
for (unsigned mi = 0, me = MBBs.size(); mi != me; ++mi) {
- unsigned MachineRelTy = TEW->getJumpTableMachineRelocationTy();
+ unsigned MachineRelTy = TEW->getAbsoluteLabelMachineRelTy();
MachineRelocation MR =
MachineRelocation::getBB(JTSection.size(),
MachineRelTy,
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;
}
/// getJumpTableRelocationTy - Returns the machine relocation type used
/// to reference a jumptable.
- virtual unsigned getJumpTableMachineRelocationTy() const;
+ virtual unsigned getAbsoluteLabelMachineRelTy() const;
};
} // end llvm namespace