Click to See Complete Forum and Search --> : Modules


dogn00dles
08-22-2002, 10:26 PM
When I compile my crap module, which does nothing, I use a <1> cardinal in printf, some kind of niceness value. I use gcc -c hellowhatever.c

I get an error, oh boy:
assembler message:
ignoring changed section attributes for .modinfo

It seems to be a minor error, because I have a fresh .o file. I insmod file.o, still nothing prints, same goes with rmmod.

I've tried this exact same thing before, with results that actually, well worked. Maybe as root I messed something up; 3 p100s have already seen my wrath firsthand!

The Kooman
08-22-2002, 11:44 PM
Originally posted by dogn00dles
When I compile my crap module, which does nothing, I use a <1> cardinal in printf, some kind of niceness value. I use gcc -c hellowhatever.c

is it printk or printf?! You can have only printk()s in the kernel!


I get an error, oh boy:
assembler message:
ignoring changed section attributes for .modinfo

It seems to be a minor error, because I have a fresh .o file. I insmod file.o, still nothing prints, same goes with rmmod.


I don't know about the assembler, but did you define the MODULE and __KERNEL__ macros as well?

gcc -DMODULE -D__KERNEL__ -I/your/kernel/sources/include -c hellowhatever.c


Another thing is that it might be going to your syslog file (/var/log/syslog on Mandrake). Check that file out!


I've tried this exact same thing before, with results that actually, well worked. Maybe as root I messed something up; 3 p100s have already seen my wrath firsthand!
Or Maybe I'm missing something altogether :D!

dogn00dles
08-23-2002, 06:41 PM
Hmm...I heard that it only logs to syslog if you use it from X, but from a shell it still only logs to syslog. Weird. Yeah, that whole printf thing was a typo, it was kind of late. And before I tried the same thing, only it worked both from a shell & X! Weird...well thanks for the 2 cents, I'm sure I'll find some way.