Blob Blame History Raw
From 04c252cc93fe5905a625773cd174ed6ca7651463 Mon Sep 17 00:00:00 2001
From: Will Schmidt <>
Date: Mon, 24 Mar 2014 16:04:15 +0000
Subject: [PATCH] [PPC64LE] ELFv2 ABI updates for the .opd section

[PPC64LE] ELFv2 ABI updates for the .opd section
The PPC64 Little Endian (PPC64LE) target supports the ELFv2 ABI, and as
such, does not have a ".opd" section.  This is keyed off a _CALL_ELF=2
macro check.

The CALL_ELF check is not clearly documented at this time.  The basis
for usage in this patch is from the gcc thread here:

> Adding comment from Uli:
Looks good to me.  I think the old-style JIT doesn't really work
anyway for 64-bit, but at least with this patch LLVM will compile
and link again on a ppc64le host ...

git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
 lib/Target/PowerPC/PPCJITInfo.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp
index 5e3a48d..227919c 100644
--- a/lib/Target/PowerPC/PPCJITInfo.cpp
+++ b/lib/Target/PowerPC/PPCJITInfo.cpp
@@ -214,6 +214,10 @@ asm(
     ".align 2\n"
     ".globl PPC64CompilationCallback\n"
+#if _CALL_ELF == 2
+    ".type PPC64CompilationCallback,@function\n"
     ".section \".opd\",\"aw\",@progbits\n"
     ".align 3\n"
@@ -223,6 +227,7 @@ asm(
     ".align 4\n"
     ".type PPC64CompilationCallback,@function\n"
 #  else