public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* uml: sigprocmask fix
@ 2009-01-20  1:18 Shane Hathaway
  2009-01-22 16:20 ` Américo Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Shane Hathaway @ 2009-01-20  1:18 UTC (permalink / raw)
  To: linux-kernel

I just ran into the same issue described here:

http://lkml.org/lkml/2009/1/15/194

Like Americo Wang, my user mode linux compile failed when attempting to
link ".tmp_vmlinux".  However, his patch is probably wrong.  The problem
is that the name "sigprocmask" is getting renamed to
"kernel_sigprocmask" by a compiler directive in arch/um/Makefile, then
that name gets mangled into "sys_kernel_sigprocmask" by the
SYSCALL_DEFINE3(sigprocmask, ...) macro in kernel/signal.c.

So I added the following line to arch/um/sys-i386/sys_call_table.S:

#define sys_sigprocmask sys_kernel_sigprocmask

This made it compile and link correctly.  Look at the symbols generated
by the compile of signal.c to see what I mean:

# nm kernel/signal.o | grep sigprocmask
0000008f r __kstrtab_kernel_sigprocmask
00000040 r __ksymtab_kernel_sigprocmask
00001ea6 T kernel_sigprocmask
00002d67 T sys_kernel_sigprocmask
00001faf T sys_rt_sigprocmask

Unfortunately, it's a mystery to me that others haven't run into this
before.

Shane


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: uml: sigprocmask fix
  2009-01-20  1:18 uml: sigprocmask fix Shane Hathaway
@ 2009-01-22 16:20 ` Américo Wang
  2009-01-22 20:15   ` Shane Hathaway
  0 siblings, 1 reply; 3+ messages in thread
From: Américo Wang @ 2009-01-22 16:20 UTC (permalink / raw)
  To: Shane Hathaway; +Cc: linux-kernel

On Mon, Jan 19, 2009 at 06:18:01PM -0700, Shane Hathaway wrote:
>I just ran into the same issue described here:
>
>http://lkml.org/lkml/2009/1/15/194
>
>Like Americo Wang, my user mode linux compile failed when attempting to
>link ".tmp_vmlinux".  However, his patch is probably wrong.  The problem
>is that the name "sigprocmask" is getting renamed to
>"kernel_sigprocmask" by a compiler directive in arch/um/Makefile, then
>that name gets mangled into "sys_kernel_sigprocmask" by the
>SYSCALL_DEFINE3(sigprocmask, ...) macro in kernel/signal.c.


Hmmm, I found this, but note that replacing sigprocmask with
kernel_sigprocmask is done by strip, that should be after compiling.
But macros are processed before compiling.

Am I missing something?

Thanks.

-- 
"Against stupidity, the gods themselves, contend in vain."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: uml: sigprocmask fix
  2009-01-22 16:20 ` Américo Wang
@ 2009-01-22 20:15   ` Shane Hathaway
  0 siblings, 0 replies; 3+ messages in thread
From: Shane Hathaway @ 2009-01-22 20:15 UTC (permalink / raw)
  To: Américo Wang; +Cc: linux-kernel

Américo Wang wrote:
> On Mon, Jan 19, 2009 at 06:18:01PM -0700, Shane Hathaway wrote:
>> I just ran into the same issue described here:
>>
>> http://lkml.org/lkml/2009/1/15/194
>>
>> Like Americo Wang, my user mode linux compile failed when attempting to
>> link ".tmp_vmlinux".  However, his patch is probably wrong.  The problem
>> is that the name "sigprocmask" is getting renamed to
>> "kernel_sigprocmask" by a compiler directive in arch/um/Makefile, then
>> that name gets mangled into "sys_kernel_sigprocmask" by the
>> SYSCALL_DEFINE3(sigprocmask, ...) macro in kernel/signal.c.
> 
> 
> Hmmm, I found this, but note that replacing sigprocmask with
> kernel_sigprocmask is done by strip, that should be after compiling.
> But macros are processed before compiling.
> 
> Am I missing something?

Probably not, but have you made progress in figuring out why others can 
apparently successfully compile UML without patching sys_call_table.S at 
all?  That's the real mystery.

Shane

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-22 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20  1:18 uml: sigprocmask fix Shane Hathaway
2009-01-22 16:20 ` Américo Wang
2009-01-22 20:15   ` Shane Hathaway

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox