From: Andre Bonin <kernel@bonin.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Module building oddities with <module>-objs under Kernel 2.6.8.1
Date: Sat, 02 Oct 2004 01:13:54 -0400 [thread overview]
Message-ID: <415E3912.3000900@bonin.ca> (raw)
Hey all,
I have a simple module in datasim.c and several service functions in
another file status.c
The module compiles fine (no warnings) with the following Makefile, but
the printk function doesn't seem to output anything. The output doesn't
show with dmesg, tail -f /var/message and everything else I tried.
The same code works fine if copy-pasted inside the datasim.c module (and
not compiled using datasim-objs: in the makefile). It also works fine
if i do the ugly thing of (*shudder*) #include "status.c"
/usr/bin/nm datasim.ko yields "U printk".
I know the entry points get called properly because the module is
loaded, and functions after the printk's that set up sysfs attributes
are successfull (and appear under sysfs).
I find it odd that if i compile with the datasim-objs stuff that i can't
view the printk, but if i comment it out and do #include "datasim.c" it
works fine.
Thanks
Here is the Makefile.
----------------------------------------------------
KDIR := /usr/src/linux
PWD := $(shell pwd)
obj-m += datasim.o
datasim-objs := status.o
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD)
clean:
rm -rf *.o
rm -rf *.ko
rm -rf *.mod.c
rm -rf .datasim*
rm -rf .built-in.o.cmd
rm -rf *~
rm -rf *.cache
sudo rm -rf .tmp_versions
install:
sudo /sbin/insmod datasim.ko
uninstall:
sudo /sbin/rmmod datasim.ko
TAGS:
etags *.c
next reply other threads:[~2004-10-02 5:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-02 5:13 Andre Bonin [this message]
2004-10-02 9:04 ` Module building oddities with <module>-objs under Kernel 2.6.8.1 Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=415E3912.3000900@bonin.ca \
--to=kernel@bonin.ca \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox