提交 4dd3c959 编写于 作者: J James Hogan

asm-generic/unistd.h: handle symbol prefixes in cond_syscall

Some architectures have symbol prefixes and set CONFIG_SYMBOL_PREFIX,
but this wasn't taken into account by the generic cond_syscall. It's
easy enough to fix in a generic fashion, so add the symbol prefix to
symbol names in cond_syscall when CONFIG_SYMBOL_PREFIX is set.
Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NMike Frysinger <vapier@gentoo.org>
上级 c93d0312
...@@ -20,5 +20,12 @@ ...@@ -20,5 +20,12 @@
* but it doesn't work on all toolchains, so we just do it by hand * but it doesn't work on all toolchains, so we just do it by hand
*/ */
#ifndef cond_syscall #ifndef cond_syscall
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #ifdef CONFIG_SYMBOL_PREFIX
#define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
#else
#define __SYMBOL_PREFIX
#endif
#define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \
".set\t" __SYMBOL_PREFIX #x "," \
__SYMBOL_PREFIX "sys_ni_syscall")
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册