Re: [uml-devel] [Patch] uml: fix a link error

From: Geert Uytterhoeven
Date: Thu Feb 12 2009 - 09:40:39 EST


On Sat, 7 Feb 2009, Heiko Carstens wrote:
> On Wed, 4 Feb 2009 21:54:12 +0100 (CET)
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > I verified that Shane's solution:
> >
> > #define sys_sigprocmask sys_kernel_sigprocmask
> >
> > works for me, but that's definitely not the cleanest way.
> >
> > Al Viro also had a suggestion to rework the SYSCALL_DEFINE* macros, but I
> > haven't tried it yet.
>
>
> Patch below should fix it.

Thanks! I only managed to try it a few minutes ago...

> Subject: [PATCH] syscall define: fix uml compile bug
>
> From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
>
> With the new system call defines we get this on uml:
>
> arch/um/sys-i386/built-in.o: In function `sys_call_table':
> (.rodata+0x308): undefined reference to `sys_sigprocmask'
>
> Reason for this is that uml passes the preprocessor option
> -Dsigprocmask=kernel_sigprocmask to gcc when compiling the kernel.
> This causes SYSCALL_DEFINE3(sigprocmask, ...) to be expanded to
> SYSCALL_DEFINEx(3, kernel_sigprocmask, ...) and finally to a system call
> named sys_kernel_sigprocmask. However sys_sigprocmask is missing because
> of this.
> To avoid macro expansion for the system call name just concatenate the
> name at first define instead of carrying it through severel levels.
> This was pointed out by Al Viro.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

For the record:

Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@xxxxxxxxxxx>

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@xxxxxxxxxxx
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
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/