From: Anton Blanchard Date: Tue, 11 Mar 2014 01:15:27 +0000 (+1100) Subject: powerpc: Fix ABIv2 issue with dereference_function_descriptor X-Git-Tag: v3.16-rc1~51^2~40^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07de8377f7488f262f9694a1567ab93b4dda63bc;p=thirdparty%2Fkernel%2Flinux.git powerpc: Fix ABIv2 issue with dereference_function_descriptor Don't try and dereference a function descriptor on ABIv2. Signed-off-by: Anton Blanchard --- diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h index d0e784e0ff484..d1bb96d5a298b 100644 --- a/arch/powerpc/include/asm/sections.h +++ b/arch/powerpc/include/asm/sections.h @@ -39,6 +39,7 @@ static inline int overlaps_kernel_text(unsigned long start, unsigned long end) (unsigned long)_stext < end; } +#if !defined(_CALL_ELF) || _CALL_ELF != 2 #undef dereference_function_descriptor static inline void *dereference_function_descriptor(void *ptr) { @@ -49,6 +50,7 @@ static inline void *dereference_function_descriptor(void *ptr) ptr = p; return ptr; } +#endif #endif