Re: unresolved symbol "irq_desc"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/23/06, Deepak Joshi <deepak_cins@xxxxxxxxxxx> wrote:
Hi all,

I am using irq_desc array in my program to list out
the names of all devices those who registered their
interrupt handler. while loading the module i am
getting "unresolved symbol irq_desc" as an error. i am
using 2.4.24 kernel and this is my code. Can anybody
plz explain me whats the problem.


Deepak,

irq_desc is not EXPORTED symbol ..... so you can not use that in your
module. While loading a module insmod trying to link the unresolved
symbols with only EXPORTED symbols of running kernel. If any of the
symbols used in module is not actually exported by kernel, then insmod
fails to link your module and gives this error.

For loading your module, you need to export irq_desc symbol
explicitely using EXPORT_SYMBOL() macro in your kernel sources, build
the new kernel image and boot your machine from that kernel image,
then try to load your module, it should be loaded properly.

regards,
Gaurav


Thanks and Regards,
Deepak Joshi.



int init_module(void)
{
        int i;
        struct irqaction *action;
        printk("\n\t The no of IRQ lines are
%d",NR_IRQS);
        for(i=0;i<NR_IRQS;i++)
        {
                desc++;
                action = desc->action;
                if(!action)
                        continue;
                printk("\n\t The irq handler for irq
%d is %s",i,action->name);
                while(action!=NULL){
                        printk("\n\t The irq handler
for irq %d is %s",i,action->name);
                        action=action->next;
                }



        }
        return 0;
}
"show.c" 53L, 1260C written



___________________________________________________________
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal
http://uk.docs.yahoo.com/nowyoucan.html

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
Gaurav
Email: gauravd.chd@xxxxxxxxx
--------------------------------------------
Read my articles at: http://lkdp.blogspot.com
--------------------------------------------
Easy to get air tickets at affordable price,
US to India Air Tickets: www.Ritz-Travel.com
Call at 001-503-848-2299 or mail at info@xxxxxxxxxxxxxxx
--------------------------------------------

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux