Kernel module, undefined symbol show_regs
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello. I can't solve problem that happens while I'm making my kernel module.
part of my module:
// ...
#include <linux/sched.h>
//....
static u32 task_syscall_entry(enum utrace_resume_action action, struct utrace_engine *engine, struct task_struct *task, struct pt_regs *regs){ // ...
show_regs(regs);
}
But, while making I get:
WARNING: "show_regs" [/home/tehhi/module/trace.ko] undefined!
extern void show_regs(struct pt_regs *); define in header linux/sched.h, place of source code is linux/arch/x86/kernel/process_32.c
It use extern void __show_regs(struct pt_regs *); and extern asmlinkage void __backtrace(void);
I think that extern means that I can use it (and there are no static symbols in this function).
When trying to insert module, it predictably complains of an unknown symbol show_regs.
What am I missing here?
Thanks in advance.
Quoted 26 lines · Tanya Gornak
Hello. I can't solve problem that happens while I'm making my kernel module.
part of my module:
// ...
#include <linux/sched.h>
//....
static u32 task_syscall_entry(enumutrace_resume_actionaction, structutrace_engine*engine, structtask_struct*task, structpt_regs*regs){ // ...
show_regs(regs);}
But, while making I get:WARNING: "
show_regs" [/home/tehhi/module/trace.ko] undefined!extern void
show_regs(struct pt_regs *); define in headerlinux/sched.h, place of source code islinux/arch/x86/kernel/process_32.c
It use extern void__show_regs(struct pt_regs *); and extern asmlinkage void__backtrace(void);
I think that extern means that I can use it (and there are no static symbols in this function).
Quoted 4 lines
When trying to insert module, it predictably complains of an unknown symbol
show_regs.What am I missing here?
You're using a function in a module which is not exported to modules. See http://lwn.net/images/pdf/LDD3/ch02.pdf for more details.
Signature · 2 lines
Regards/Gruss, Boris