Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-10-2004, 12:44 AM   #1
Registered: Nov 2004
Location: india
Distribution: Fedora core 1
Posts: 67

Rep: Reputation: 15
how to add own 2 kernel modules to kernel

I have written 2 modules that i want to be loaded each time kernel has been loaded. I add them in kernel directory of kernel source but i am getting following error
deny2.o(.text+0x50): In function `init_module':
: multiple definition of `init_module'
deny1.o(.text+0x190): first defined here
ld: Warning: size of symbol `init_module' changed from 110 to 57 in deny2.o
deny2.o(.text+0x90): In function `cleanup_module':
: multiple definition of `cleanup_module'
deny1.o(.text+0x200): first defined here
ld: Warning: size of symbol `cleanup_module' changed from 29 to 17 in deny2.o
make[2]: *** [kernel.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.24-module/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.24-module/kernel'
make: *** [_dir_kernel] Error 2

Both kernel modules have following similar calls code

static void __init init(void)
nfho.hook = hook_func;
nfho.hooknum = NF_IP_POST_ROUTING; = PF_INET;
nfho.priority = NF_IP_PRI_FIRST;



static void __exit fini(void)


how to solve this error?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add 'modules' without re-compiling the kernel b0nd Linux - Newbie 4 10-03-2005 10:22 AM
kernel : how to add sys call through modules only? pinkeshzaveri Programming 1 09-14-2005 03:17 AM
kernel: No module symbols loaded - kernel modules not enabled. Qucho Debian 9 05-26-2004 02:50 AM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 08:29 PM
need to recompile modules if i add something to kernel option? doublefailure Linux - General 1 03-05-2003 10:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration