Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all, Currently we are facing a problem while calling kernel module functions from base kernel. In other words I’m trying to call/invoke a function compiled as module from the ...
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    5

    Base kernel compilation error - undefined refence to kernel function

    Hi all,

    Currently we are facing a problem while calling kernel module functions from base kernel.

    In other words I’m trying to call/invoke a function compiled as module from the kernel. So when we want to call function from kernel we need to compile the kernel because we are changing the kernel source, and the function which you are calling is compiled as a kernel module.

    So when you build your kernel linker will throw the error saying that the undefined reference to the function.

    Here kernel module function is one which is used to take core dump of the kerenel.

    Any help and guidance with this regard will be appreciated.

    Thanks in advance,
    Devaraj.

  2. #2
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    what is the name of this function , it's a new implemented one while you are trying to use it on an old suse , if you have a manually compiled new kernel wish contains more features then in the kernel source tree do this :
    Code:
    make headers_install
    Linux is not only an operating system, it's a philosophy.
    Archost.

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    5
    hello aliov,
    here the function name is void display(void);which i am calling in asmlinkage int printk() function of printk.c file.The declaration for the display() function is included in linux/kernel.h header file as well as in printk.c file also.EXPORT_SYMBOL(display) ; is declared in my kernel module program.
    these are my few questions.
    1.is it required to call display() function in module_name_init() of my kernel module ? i have tried the options of calling inside module_name_init() function and not calling also.for both the result will be same.
    2.can you suggest me the place where can i put my function so that it shuould be called or invoked while compiling the kernel.
    Thanks in advance

  4. #4
    Linux Engineer aliov's Avatar
    Join Date
    Dec 2006
    Location
    Geneva,Beirut
    Posts
    1,078
    I can't answer these questions since i don't know what you aim by you new module !

    for the display function , i didn't find it declared in the linux/kernel.h header file , probably it's a deprecated function that doesn't have a reference anymore .
    Linux is not only an operating system, it's a philosophy.
    Archost.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...