Re: [patch] arch-specific cond_syscall usage issues

From: Matt Mackall
Date: Fri Jan 09 2004 - 22:56:24 EST


On Fri, Jan 09, 2004 at 07:37:53PM -0800, Andrew Morton wrote:
> Matt Mackall <mpm@xxxxxxxxxxx> wrote:
> >
> > Experimenting with trying to use cond_syscall for a few arch-specific
> > syscalls, I discovered that it can't actually be used outside the file
> > in which sys_ni_syscall is declared because the assembler doesn't feel
> > obliged to output the symbol in that case:
> >
> > weak.c:
> >
> > #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
> > cond_syscall(sys_foo);
> >
> > $ nm weak.o
> > U sys_ni_syscall
> >
> > One arch (PPC) is apparently trying to use cond_syscall this way
> > anyway, though it's probably never been actually tested as the above
> > test was done on a PPC.
>
> So why does the PPC kernel successfully link?

Presumably because no one's tried it without CONFIG_PCI since this
change went in?

--
Matt Mackall : http://www.selenic.com : Linux development and consulting
-
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/