Click to See Complete Forum and Search --> : kernel symbols and...stuff
dogn00dles
09-16-2002, 10:44 PM
Hey there....I was reading some documentation on modules, and it was extremely easy until it started referring to symbols and crap, mainly cause- i had no idea what they are...a link or laymans explanation would be greatly appreciated.
----_____THANK YOU FOR YOUR PATRONAGE____-----
truls
09-17-2002, 03:32 AM
As always Linux Device Drivers (http://www.xml.com/ldd/chapter/book/) , it is decidedly short on crap though :p
As a general rule though, you usually use '#define SOMETHING', because one of the header files you include has '#ifdef SOMETHING ...' in it. Thus, if you do not define SOMETHING the parts between '#ifdef SOMETHING' and '#endif' (or #else) will not be included.
bwkaz
09-17-2002, 08:32 AM
Kernel symbols are merely the address (in the running kernel) of different public functions and pieces of public data that you can either call or reference.
If the kernel sets up a public function called int foo() that, I don't know, whatever, say returns 42 all the time, then foo will show up in the kernel symbol list, and will be "bound" to the address in the running kernel of the start of the foo() function, so that other code (modules; normal userland code doesn't have the proper access rights to do this) can call the function.
dogn00dles
09-18-2002, 10:53 PM
thanks a lot guys, i have finally reached the holy grail of a char device that doesn't do anything!