extern variables in .c and .h files

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

 



hi!

i've been been coding a LKM that should be
able to use variables, that are declared as extern.
i am using a 2.4.20 kernel.

the module is based on some code of
kernel/module.c.
(http://lxr.linux.no/source/kernel/module.c)

well, i tried different stuff with that LKM now.
take as an example:
i have the tulip module loaded. with my LKM i can make use of
extern const char * const medianame[];
(http://lxr.linux.no/source/drivers/net/tulip/tulip.h)
and display it, when using the same declaration in my LKM.

but for some strange reason i cannot use
variables that were declared a similar way in .c files in the
kernel source tree.
for example:
extern const struct exception_table_entry __start___ex_table[]; (kernel/module.c)

why can i access extern vars from header files and not
from source C files, that have been compiled as
part of my current kernel?

thank you for your time!

regards, threadhead
______________________________________________________________________________
WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und
nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130

--
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