summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ELF.h
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-03-26 10:56:47 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-03-26 10:56:47 +0000
commit65e90c036472380bba160c349412f37128608e1c (patch)
tree94fa1f6faa24c8a4c191daacf7be05b12d65f769 /include/llvm/Support/ELF.h
parent7d35d3f432cb59d3d1c0884af3023de9b5cb10b1 (diff)
downloadllvm-65e90c036472380bba160c349412f37128608e1c.tar.gz
llvm-65e90c036472380bba160c349412f37128608e1c.tar.bz2
llvm-65e90c036472380bba160c349412f37128608e1c.tar.xz
PowerPC: Simplify handling of fixups.
MCTargetDesc/PPCMCCodeEmitter.cpp current has code like: if (isSVR4ABI() && is64BitMode()) Fixups.push_back(MCFixup::Create(0, MO.getExpr(), (MCFixupKind)PPC::fixup_ppc_toc16)); else Fixups.push_back(MCFixup::Create(0, MO.getExpr(), (MCFixupKind)PPC::fixup_ppc_lo16)); This is a problem for the asm parser, since it requires knowledge of the ABI / 64-bit mode to be set up. However, more fundamentally, at this point we shouldn't make such distinctions anyway; in an assembler file, it always ought to be possible to e.g. generate TOC relocations even when the main ABI is one that doesn't use TOC. Fortunately, this is actually completely unnecessary; that code was added to decide whether to generate TOC relocations, but that information is in fact already encoded in the VariantKind of the underlying symbol. This commit therefore merges those fixup types into one, and then decides which relocation to use based on the VariantKind. No changes in generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ELF.h')
-rw-r--r--include/llvm/Support/ELF.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Support/ELF.h b/include/llvm/Support/ELF.h
index cc9151ef50..ea597fc1a2 100644
--- a/include/llvm/Support/ELF.h
+++ b/include/llvm/Support/ELF.h
@@ -480,6 +480,8 @@ enum {
R_PPC64_TOC16_LO = 48,
R_PPC64_TOC16_HA = 50,
R_PPC64_TOC = 51,
+ R_PPC64_ADDR16_DS = 56,
+ R_PPC64_ADDR16_LO_DS = 57,
R_PPC64_TOC16_DS = 63,
R_PPC64_TOC16_LO_DS = 64,
R_PPC64_TLS = 67,