From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg KH <gregkh@suse.de>, Shane Hathaway <shane@hathawaymix.org>,
Daolong Wang <ahlongxp@gmail.com>,
User-mode Linux Kernel Development
<user-mode-linux-devel@lists.sourceforge.net>,
Jeff Dike <jdike@addtoit.com>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Rob Landley <rob@landley.net>,
Am?rico Wang <xiyou.wangcong@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
stable@kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Subject: Re: [uml-devel] [Patch] uml: fix a link error
Date: Sun, 8 Feb 2009 17:07:10 +0800 [thread overview]
Message-ID: <20090208090642.GA383@hack.private> (raw)
In-Reply-To: <20090207125956.110591c9@osiris.boeblingen.de.ibm.com>
I am sorry for the delay.
On Sat, Feb 07, 2009 at 12:59:56PM +0100, Heiko Carstens wrote:
>On Wed, 4 Feb 2009 21:54:12 +0100 (CET)
>Geert Uytterhoeven <geert@linux-m68k.org> 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.
>
>
>Subject: [PATCH] syscall define: fix uml compile bug
>
>From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
>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.
Hmmm, thanks for analysis this.
I found my mistake, I thought the Makefile invokes the 'strip' command
to do replacement, but it is not, Makefile has a built-in command named
strip. Sorry for this.
Then the problem is fully from preprocessing.
>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.
>
Yes, indeed!
>Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Your patch should fix this problem. But... see below.
> } \
>- SYSCALL_ALIAS(sys_##name, SyS_##name); \
>- static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__))
>+ SYSCALL_ALIAS(sys##name, SyS##name); \
>+ static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))
So your final actual name for a syscall 'foo' will be 'sysfoo'
instead of 'sys_foo', right?
But we have lots of explicit calls to something like sys_foo,
won't your patch break them?
--
"Against stupidity, the gods themselves, contend in vain."
next prev parent reply other threads:[~2009-02-08 9:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 19:40 [Patch] uml: fix a link error Américo Wang
2009-01-16 20:41 ` Andrew Morton
2009-01-16 21:38 ` Jeff Dike
2009-01-17 9:28 ` [uml-devel] " Rob Landley
2009-01-18 6:23 ` Daolong Wang
2009-01-19 15:21 ` Jeff Dike
2009-01-20 1:46 ` Daolong Wang
2009-01-20 2:01 ` Shane Hathaway
2009-01-27 9:23 ` Al Viro
2009-02-04 17:26 ` Geert Uytterhoeven
2009-02-04 20:32 ` Geert Uytterhoeven
2009-02-04 20:40 ` Greg KH
2009-02-04 20:54 ` Geert Uytterhoeven
2009-02-07 11:59 ` Heiko Carstens
2009-02-08 9:07 ` Américo Wang [this message]
2009-02-08 9:12 ` Américo Wang
2009-02-12 14:40 ` Geert Uytterhoeven
2009-01-18 8:32 ` Américo Wang
2009-01-18 23:29 ` Rob Landley
2009-01-22 16:12 ` Américo Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090208090642.GA383@hack.private \
--to=xiyou.wangcong@gmail.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=ahlongxp@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@suse.de \
--cc=heiko.carstens@de.ibm.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=shane@hathawaymix.org \
--cc=stable@kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox