Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-13-2004, 06:03 AM   #1
Registered: May 2004
Posts: 211

Rep: Reputation: 15
Unkown symbol Error

Who knows how to solve "unknown symbol" error when `insmod probe.ko`?
I enconter this problem when writing a simple module with a function named "kallsyms_lookup_name" inside.
The error when `insmod probe.ko` is as bleow:
===========insmod ERROR==========BEG
probe: Unknown symbol kallsyms_lookup_name
probe: Unknown symbol register_kprobe
insmod: error inserting `porbe.ko`: -1 Unknown symbol in module
===========insmod ERROR==========END
my module source code is separated to kernel source; where kernel source is locateed at $HOME/kernel/linux-`uname -r` and module source at $HOME/program/kernel/module/sample.

the compile command is : make -C $HOME/kernel/linux-`uname -r` SUBDIRS=$PWD modules
there's no error message except one warning "*** Warning: "kallsyms_lookup_name" [/root/program/kernel/module/sample/probe.ko] undefined!"
and I can find symbol in as well as /proc/kallsyms.
some one told me to enable the option "CONFIG_KALLSYMS", set to 'y'.
and I found out that the option was enabled[set to y] in my .config, located in the $HOME/kernel/linux-`uname -r`(which is my kernel source).
I don't know what to do now. I know this may be a newbie question, but I have no idea how to solve it for few weeks, even though I read the makefile.txt and modules.txt located in the $KERNEL_SOURCE/Documentation/kbuild.
I appreciate any suggestion, sincerely.

obj-m += probe.o
c0135190 t add_kallsyms
c0136100 T module_kallsyms_lookup_name
c0136610 T kallsyms_lookup_name
c01366f0 T kallsyms_lookup
c0136c40 t kallsyms_open
c0136cb0 t kallsyms_release
c0429b00 D kallsyms_op
c0429b20 d kallsyms_operations
c0486344 D kallsyms_addresses
c04947c0 D kallsyms_num_syms
c04947c4 D kallsyms_names
c04dd030 T kallsyms_init
c04f4cc0 t __initcall_kallsyms_init
c0135190 t add_kallsyms
c0136100 t module_kallsyms_lookup_name
c0136610 t kallsyms_lookup_name
c01366f0 t kallsyms_lookup
c0136c40 t kallsyms_open
c0136cb0 t kallsyms_release
c04dd030 t kallsyms_init

#include <linux/kallsyms.h>
#include <linux/init.h>

#include <linux/module.h>
#include <linux/kernel.h>

/* kprobes */
#include <linux/kprobes.h>

handler_pre(struct kprobe *p, struct pt_regs *regs)
printk("pre_hanlder: p->addr=0x%p, eflags=0x%lx\n",
p->addr, regs->eflags);
return 0;

handler_post(struct kprobe *p, struct pt_regs *regs, unsigned long eflags)
printk("post_handler: p->addr=0x%p, eflags=0x%lx \n",
p->addr, regs->eflags);

handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr)
printk("fault_handler->addr=0x%p, eflags=0x%lx\n",
p->addr, regs->eflags);
return 0;

struct kprobe kp;

printk(KERN_ALERT"init module!\n");
kp.addr=(kprobe_opcode_t *)kallsyms_lookup_name("do_fork");
printk("kallsyms_lookup_name could not find address for the specified sumbol name!\n");
return 1;
return 0;

printk(KERN_ALERT"cleanup module!\n");

Old 08-17-2005, 04:45 AM   #2
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,337

Rep: Reputation: Disabled
Re: Unkown symbol Error

Originally posted by shogun1234
Who knows how to solve "unknown symbol" error when `insmod probe.ko`?
I enconter this problem when writing a simple module with a function named "kallsyms_lookup_name" inside.
The error when `insmod probe.ko` is as bleow:...
Dunno whether that is still of interest nor am I by any means specialist here, but:
  • there is an existing program KProbe in KDE. Collision?
  • you have a "insmod: error inserting `porbe.ko`" in the message from the system. Typo in the make file?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
error: unresolved external symbol purefan Programming 3 03-26-2005 07:27 AM
wacom.ko has unkown symbol? bobbens Debian 0 01-16-2005 06:14 AM
Firefox Symbol Lookup Error Aeiri Linux - Software 2 11-16-2004 04:30 PM
Unkown Host Error- internet malikk Linux - Newbie 3 05-24-2004 10:57 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration