cond_syscall() and new ABI.
Arnd Bergmann
arnd at arndb.de
Wed Oct 13 04:43:52 EST 2004
On Dinsdag 12 Oktober 2004 16:26, Christoph Hellwig wrote:
> > ===== include/asm-ppc64/unistd.h 1.34 vs edited =====
> > --- 1.34/include/asm-ppc64/unistd.h Tue Sep 14 01:23:12 2004
> > +++ edited/include/asm-ppc64/unistd.h Tue Oct 12 14:48:08 2004
> > @@ -468,7 +468,7 @@
> > * 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
> > */
> > -#define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall");
> > +#define cond_syscall(x) void x(void) __attribute__((weak,alias("sys_ni_syscall")));
>
>
> this one otoh makes lots of sense - it's what most architectures use.
It's also something that looks suboptimal to me. The syscalls should
already have a proper protoype in <linux/syscalls.h>, which typically is
not "void sys_foo(void)".
A better solution IMHO would be to include the right headers from sys.c
and have
#define cond_syscall(x) typeof(x) (x) __attribute__((weak,alias("sys_ni_syscall")));
Also, someone should try to find out which toolchains don't support this
and if anybody is still using those. One issue seems to be the one from
http://seclists.org/lists/linux-kernel/2004/Jan/2474.html, but I'm not
sure if that is the problem that the comment refers to.
Arnd <><
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041012/782ffcb7/attachment.pgp
More information about the Linuxppc64-dev
mailing list