lkml.org 
[lkml]   [1998]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unresolved symbol open

I think the right way to find out what you can use is to do
cat /proc/ksyms (if you are writing a module).
If the functions you want to use aren't there you won't be able to call
them. Note that some functions are actually defined as macros in include
files and so do not need to mentioned in /proc/ksyms. Also for these
functions you will want to define KERNEL and MODULE in your driver so that
the right portions of include files be processed. Otherwise gcc will just
skip those macros.

If there is some function in kernel includes that you want and it's not
mentioned in /proc/ksyms you can go to linux/kernel/ksyms.c and add a line
for that function.

Also if there is a variable you want to access you can (as a quick hack)
create a function return_variable() and put it in ksyms.c.
(as a side note - can I actually put pointers to global variables in
proc/ksyms.c - I think yes but I haven't tried..)

Vladimir Dergachev



On Thu, 3 Sep 1998, Vasili Goutas wrote:

> I'm writing a device driver how needs to read a file during initialize.
> I tried to use the functions open() read() seek() and close() and
> included the asm/unistd.h, but I get unresolved symbols.
> Then I tried to use the sys_* functions, and get also a lot of
> unresolved symbols, only the sys_close() function was known.
> A look at the symbol table of my 2.0.34 kernel by 'cat /proc/ksyms'
> shows me that they realy are missing.
> Why are the other functions missing?
> Is there another way to access files from a driver?
>
> TIA
> Vasili
>
> please CC to vgo@ratio.de
> --
>
> **********************************************************************
> * Vasili Goutas RATIO Entwicklungen GmbH *
> * P:+49-(0)40-369007-37 Admiralitätstr. 59 *
> * F:+49-(0)40-369007-25 D-20459 Hamburg *
> * Email: mailto:vgo@ratio.de *
> **********************************************************************
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2011 Jasper Spaans