diff options
author | David Majnemer <david.majnemer@gmail.com> | 2013-09-22 05:30:16 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2013-09-22 05:30:16 +0000 |
commit | 7d7db75a55319f1d21f0d8336744f90a81b87ac7 (patch) | |
tree | 6c0d396fd179febdf71ae5d9dc5154332f1ef771 /lib/Target/X86/MCTargetDesc | |
parent | ecd4965c133d16fc9e5a6ac393c5194b67cd53ab (diff) | |
download | external_llvm-7d7db75a55319f1d21f0d8336744f90a81b87ac7.zip external_llvm-7d7db75a55319f1d21f0d8336744f90a81b87ac7.tar.gz external_llvm-7d7db75a55319f1d21f0d8336744f90a81b87ac7.tar.bz2 |
X86: Use R_X86_64_TPOFF64 for FK_Data_8
Summary:
LLVM would crash when trying to come up with a relocation type for
assembly like:
movabsq $V@TPOFF, %rax
Instead, we say the relocation type is R_X86_64_TPOFF64.
Fixes PR17274.
Reviewers: dblaikie, nrieck, rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1717
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc')
-rw-r--r-- | lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp b/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp index b400b87..6a4bdeb 100644 --- a/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp +++ b/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp @@ -108,6 +108,9 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target, case MCSymbolRefExpr::VK_None: Type = ELF::R_X86_64_64; break; + case MCSymbolRefExpr::VK_TPOFF: + Type = ELF::R_X86_64_TPOFF64; + break; case MCSymbolRefExpr::VK_DTPOFF: Type = ELF::R_X86_64_DTPOFF64; break; |