Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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

    #include <linux/module.h>

    then add at the end of the file:

    EXPORT_SYMBOL(request_irq);
    EXPORT_SYMBOL(free_irq);

    You can do similar change to io.c in the same directory to remove the "warning" about outsw.