All of lore.kernel.org
 help / color / mirror / Atom feed
* Off topic ...about writing module
@ 2000-12-13 22:07 naushit
  0 siblings, 0 replies; only message in thread
From: naushit @ 2000-12-13 22:07 UTC (permalink / raw)
  To: linuxppc-embedded


Hi

I apologize in advance for writing off topic mail.

I am trying to write some module on my pc. but I dont get output at all.
Here is the sample code that I am trying out


hello.c
-------------------------------------------------
#define MODULE
#define __KERNEL__
#define LINUX

#if CONFIG_VERSIONS==1
#define MOD_VERSIONS
#include <linux/modversions.h>
#endif

#include <linux/module.h>

int init_module(void)
{
	printk("<1> Hello world\n";
	return 0
}

void cleanup_module(void)
{
	printk("<1> bye bye world \n");
}
-----------------------------------------

while I compile , I get following warnings... I dont understand those
warning and I dong know how to get rid of it...any suggestions?
---------------------------------------------
gcc -c hello.c
/tmp/ccMwbBAv.s:Assembler messges:
/tmp/ccMwbBAv.s:8:Warning:Ignoring changed section attributes for .modinfo.

---------------------------------------
now when I load module

#insmod hello.o
#
#lsmod hello
Module		Size 	Usedby
hello		336	o(unused)

Why dont I see hello world on my screen.??? I tried to see console which I
started with xterm -C also.

Please...........Please reply if you know my problem....

Thanking you very much for your time

Regards,
Naushit


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-13 22:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-13 22:07 Off topic ...about writing module naushit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.