Re: Cannot mount linprocfs by unresolving sysvs?m symbols

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Fri, 6 Apr 2007 14:43:13 -0400
On Friday 06 April 2007 02:11 pm, Roman Divacky wrote:
> > > is there a way to do this nicely?
> >
> > Probably we can improve kernel linker to do better job. ;-)  I
> > mean, load all dependencies before look up symbols.
>
> thats not what I mean.. what I want is something like
>
> if (function_present(foo))
>    x = foo();
> else
>    x = SAFE_VALUE;
>
> use x somehow;
>
> so we don't have to have all modules loaded etc. the same could be
> done for some syscalls, imagine
>
> linux_foo(params)
> {
>    if (function_present(foo))
>       return foo(params);
>   else
>       return ENOSYS;
> }
>
> I like this better then loading all possible modules.

I know what you meant but it is more heavier than what we have now.  
If you insist, you can do something like linux_ipc.c.  Check out 
linux_msgctl() and linux_semctl().  Module presence check is easy.

Jung-uk Kim
Received on Fri Apr 06 2007 - 16:43:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:07 UTC