Welcome! Log In Create A New Profile

Advanced

insmod: error Unknown symbol in module

Posted by 1 Infinite Loop 
Hi everyone

I have my variable declared in kernel and i exported it by EXPORT_SYMBOL, also i declared it extern in a .h file and included that .h file in my loadable module.
When i insmoded my module it gave following error

"insmod: error inserting 'hello.ko': -1 Unknown symbol in module"

What is the error and how should i correct it?
Re: insmod: error Unknown symbol in module
March 14, 2008 05:52AM
type dmesg -c and check what is the symbol that is not linking to kernel. For e.g if u wrote printk as printf ,it will compile successfully. But during insertion of module it can't link since printf is not available in the kernel
usually happens when linking module with incorrect kernel version. Even though symbol may be present....incorrect version creates a problem. You can however forcefully add the module...if you know symbol is present in SYMBOL Table...

use modprobe to force it.....if something went awefully wrong it will max crash ur system winking smiley
Hi,

I am facing one problem in linux kernel 2.6.22 while implementing a simple char driver.
I am using Ubuntu 7.10 with kernel version - 2.6.22-14-generic

I have split my char driver code into 2 C files.
mychar.c , test1.c

mychar.c is the main file where my init function is present. And test1.c contains just one test1() function with one printk statement.
I am using the Makefile for compilation.
I have some printk statements in my __init function.
The module compiled and installed successfully without any errors. I could see my module in "lsmod" output.
Basically when I do "insmod <my-module.ko" I should see the printk statement (present in init) printed in /var/log/messages.
But I didnt find any output in /var/log/messages after the insmod.

Again,
If I use only one C file to do everything(that is only mychar.c) then everything works fine.
All the printk is getting printed in /var/log/messages.

Can anyone tell me what is the problem?


Thanks, Regards
Pintu
Email - pintu_agarwal@yahoo.com
Re: insmod: error Unknown symbol in module
June 10, 2011 12:55AM
The choice, never the best, but the better

Consider this a one suit wonder. Versatile and timeless.
Re: insmod: error Unknown symbol in module
November 10, 2011 02:32AM
asdfasdasdzcx
Re: insmod: error Unknown symbol in module
February 05, 2012 10:09PM
Even if there may be a symbol .... version is not correct, creates a problem. However, you can effectively add modules ... if you know the symbol is the symbol table.

Party Dresses
I am getting the same error when inserting the ixgbe.ko in netmap
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 4 plus 7?
Message: