Re: Linking with kernel code (Makefile)
From: Jean Fekry Rizk <hidden>
Date: 2000-12-12 01:05:46
The character device is a good idea!!! But how would the device's mmap be implemented? I know how the read and write work, but they copy the data from one space to another, which would be slow if there is much communication. Because this looses the benifits of shared memory About the kernel linking, I'm not making a module driver, I'm trying to recompile the kernel after adding my file (kshared.c) I guess I should be able to access all structures and functions in the kernel, if I succeed to link correctly with the files containing those functions and structures, but I'm not so good at make files.
--- "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:quoted
What I want to do: create a shared memory segment between user space and kernel spaceCreate a character device. Have the driver allocate memory. Let the user mmap() it.quoted
I can't link with the array or the function, this also happenswithquoted
all functions that are not defined in 'ksyms' Even though I declared 'newseg' and 'shm_segs' as 'extern' in myfile ...quoted
But while making bzImage, it gives the error unresolved external'newseg'quoted
So my question is how can I link to the kernel source code, or am Inotquoted
allowed to?You are not allowed to use interfaces that are not exported. This is partly to prevent you from depending on code that is very likely to change, and partly to prevent a Microsoft Linux or similar abuse of the GPL. If you really need it, make a non-module driver. Maybe after that gets accepted into the main kernel you could convince Linus to export the function you want for module use.
__________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/