tree c00a39d711f43853ac42ff5e93fe0826fa5388e5
parent a3f9985843b674cbcb58f39fab8416675e7ab842
author Al Viro <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:56:37 -0700
committer David S. Miller <[EMAIL PROTECTED]> Sat, 20 Aug 2005 05:56:37 -0700

[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 <alias> followed by <alias> = <aliased>; that works on all
gcc versions.

Signed-off-by: Al Viro <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 arch/sparc/kernel/sparc_ksyms.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
--- 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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to