On Wed, Apr 17, 2002 at 11:37:00AM +0530, Manish K Arya spoke out thus:
> Hi
>    when i try to compile kernel module it gives me following warning.
> /tmp/cckX293D.s: Assember messages:
> /tmp/cckX293D.s :8 Warning :Ignoring changed secton attributes for .modinfo
> 
> if i insert this modules ignoring this warning module does not works properly
>    actul module is for customizing system calls.but it works sometimes and not works 
>some times.
>    then i tried a small sample module for debuging this too gave same message
> 
> #define MODULE
> #include <linux/kernel.h>

Put in a #include <linux/module.h> here

> int init_module(void)
> {
>    printk("staring test...");

Bad boy - returning without a value from a non-void function. Put in a return 0; here.

> }
> 
> void cleanup_module(void)
> {
>    printk("ending test");
> }
> 
> now i compile this by
> $gcc -c test.c
> 
> it gives me warning
> /tmp/cckX293D.s: Assember messages:
> /tmp/cckX293D.s :8 Warning :Ignoring changed secton attributes for .modinfo
> although this sample module works if i insert it but custom system call module does 
>not works properly
> 

It's a good practice to compile modules with atleast the following options:

-O2 -Wall -DMODULE -D__KERNEL__

Regards,
-Varun
-- 
---------------------------------------
Mindframe Software & Services Pvt. Ltd.

http://www.mindsw.com
---------------------------------------

          ================================================
To subscribe, send email to [EMAIL PROTECTED] with subscribe in subject header
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header
Archives are available at http://www.mail-archive.com/ilugd%40wpaa.org
          =================================================

Reply via email to