Forum Discussion
unresolved symbols
Hello,
I've written a kernel module for some I/O stuff. When I compile it I get the following warnings
Code:
*Building modules, stage 2.
*MODPOST
*** Warning: "request_irq" [drivers/misc/samira/samirainterface.ko] undefined!
*** Warning: "free_irq" [drivers/misc/samira/samirainterface.ko] undefined!
*** Warning: "outsw" [drivers/misc/samira/samirainterface.ko] undefined!
*CC * * *drivers/misc/samira/samirainterface.mod.o
drivers/misc/samira/.samirainterface.mod.o.d: done.
*LD [M] *drivers/misc/samira/samirainterface.ko
I have all required headers included, and in /proc/kallsyms are the "undefined" symbols
Code:
010050a0 t free_irq
01004f88 t request_irq
01008148 t outsw
These symbols don't appear in build/Module.symvers. Why not?
here is the code of my module
Code:
1 Reply
- Altera_Forum
Honored Contributor
The problem is not from your module. Those symbols should have been exported by the kernel. To export request_irq/free_irq, go to arch/nios2nommu/kernel/irq.c, add an include file
then add at the end of the file:#include <linux/module.h>
You can do similar change to io.c in the same directory to remove the "warning" about outsw.EXPORT_SYMBOL(request_irq); EXPORT_SYMBOL(free_irq);