Skip to content

Commit

Permalink
asm-generic/unistd.h: handle symbol prefixes in cond_syscall
Browse files Browse the repository at this point in the history
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: James Hogan <james.hogan@imgtec.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
James Hogan committed Mar 2, 2013
1 parent c93d031 commit 4dd3c95
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/asm-generic/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,12 @@
* but it doesn't work on all toolchains, so we just do it by hand
*/
#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

0 comments on commit 4dd3c95

Please sign in to comment.