Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Unkown symbol in module, Linux Mint #41

Open
Xqua opened this issue Apr 28, 2014 · 2 comments
Open

Error Unkown symbol in module, Linux Mint #41

Xqua opened this issue Apr 28, 2014 · 2 comments

Comments

@Xqua
Copy link

Xqua commented Apr 28, 2014

Hi friends !

I've been messing arround since last night trying to figure that one out but my knowledge of the kernel are not good enough to debug it ! ^^

I compiled succefully, does not says anything but a warning :
WARNING: "mcount" [/home/xqua/Software/netcat-cpi-kernel-module/netcat.ko] undefined!

when I try to install the module with insmod I get this error :
Error: could not insert module netcat.ko: Unknown symbol in module

Any idea where to look for ??

Thanks

@wxl
Copy link
Contributor

wxl commented Apr 28, 2014

@Xqua first figure out the symbol. compile again and then do dmesg -c
to see what symbol is not linking. typically this is a problem when
trying to link the module with a different kernel version, so you may
want to consider updating your kernel version first. ultimately you want
to make sure the symbol is in your symbol table. to do so: grep '<symbol from dmesg -c>' /proc/kallsyms. you also should make sure that
you have the right kernel headers installed (not a version older than
your kernel) with ls /usr/src | grep $(uname -r). if you get nothing
back, you'll need to install linux-headers-$(uname -r). good luck.

btw thanks to the netcat folks for getting me into the deep end of the
linux pool ;)

@pah
Copy link
Contributor

pah commented Apr 28, 2014

Also, make sure to use the same compiler (version) as for building your kernel. The mcount symbol is related to the kernel function tracing, which uses different techniques, depending on the capabilities of the compiler in use.

See, e.g. http://lkml.org/lkml/2012/10/31/652 for a potentially related discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants