From: Al Viro Date: Fri, 19 Aug 2005 22:56:37 +0000 (-0700) Subject: [SPARC]: Fix weak aliases X-Git-Tag: v2.6.13-rc7~59^2~9^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=83c4e43722a2c8a8438b8d165047720fd36aaea4;p=linux-2.6-omap-h63xx.git [SPARC]: Fix weak aliases sparc_ksyms.c used to declare weak alias to several gcc intrinsics. It doesn't work with gcc4 anymore - it wants a declaration for the thing we are aliasing to and that's not going to happen for something like .mul, etc. Replaced with direct injection of weak alias on the assembler level - .weak followed by = ; that works on all gcc versions. Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 1bd430d0ca0..8faa8dc4de4 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c @@ -98,8 +98,9 @@ extern void ___rw_write_enter(void); * The module references will be fixed up by module_frob_arch_sections. */ #define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ - extern __ret __x(__arg1, __arg2) \ - __attribute__((weak, alias("." # __x))); + extern __ret __x(__arg1, __arg2); \ + asm(".weak " #__x);\ + asm(#__x "=." #__x); DOT_ALIAS2(int, div, int, int) DOT_ALIAS2(int, mul, int, int)