The suitution is I want the kernel source use the symbol from module.
What I did in the module code are:
1. EXPORT_SYMBOL(func) in the source code of module
2. Set "extern int func()" in the module header
What I did in the kernel source code are:
1. Insert "func()" in the inode.c
2. Add the module header in the kernel source code
Then I use "make bzImage", I got no error message on compiling inode.c, but
I got
"fs/fs.o(.text+0x1377d): undefined reference to `func'"
in the linking stage.
I also set condition inode.c to check the existing of module before calling
func()
Thanks
Regards,
Anthony
----- Original Message -----
From: "Bart Trojanowski" <bart@jukie.net>
To: "Anthony Chee" <anthony.chee@polyu.edu.hk>;
<linux-kernel@vger.kernel.org>
Cc: <kbuild-devel@vger.kernel.org>; <kernelnewbies@vger.kernel.org>;
<linux-kernel@vger.kernel.org>
Sent: Tuesday, March 26, 2002 5:45 AM
Subject: Re: undefined reference
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/