Re: [RFC] making HAVE_SYSCALL_WRAPPERS universal (Re: Issues with "x86, um: switch to generic fork/vfork/clone" commit)

From: Arnd Bergmann
Date: Tue Jan 22 2013 - 10:33:45 EST


On Monday 21 January 2013, Al Viro wrote:
> 1) alpha, mips
> .weak foo
> foo = sys_ni_syscall
> 2) itanic, ppc
> asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))
> 3) very common - most of the architectures
> .weak foo
> .set foo sys_ni_syscall
> 3a) blackfin, h8300 - same as (3), except that asm symbols get
> underscore prepended.
> .weak _foo
> .set _foo _sys_ni_syscall

One question here: Is there still a reason why we can't use method 2 on
all architectures now? The comment in a lot of architectures says

* What we want is __attribute__((weak,alias("sys_ni_syscall")))
* but it doesn't work on all toolchains, so we just do it by hand

and my guess is that all toolchains we support at this point actually
do allow it, and turn it into the appropriate assembler syntax.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/