提交 83c4e437 编写于 作者: A Al Viro 提交者: David S. Miller

[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: NAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a3f99858
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册