i got some source from freshmeat, cdfs filesystem, and am trying to get it
working on my redhat 7.3 box. I can compile it without any troubles but when
i try and install the module with insmod i get lots of errors such as:
cdfs.o: unresolved symbol kfree_Rsmp_037a0cba
cdfs.o: unresolved symbol printk_Rsmp_1b7d4074
when i check /proc/ksyms for these symbols i get:
c01186a0 printk_R1b7d4074
c012f5a0 kfree_R037a0cba
so i know there there but the compiled module seems to be looking for a smp
version ? I read somewhere that redhat does things diffrent so i would need
to compile using -DMODVERSIONS and -include
/usr/src/linux/include/linux/modversions.h but after i included this in the
Makefile and ran make there was no diffrence.
the output from uname -r is "Linux 2.4.18-17.7.x #1 i686 unknown" and as far
as i know its not a smp kernel.
i have included below the full Makefile, cause its just a short one, as it
is in its original state i.e without me adding in -DMODVERSIONS so if
someone knows this is what the problem is, if they could insert the
modifications in there or tell me where to insert them in to the Makefile
that would be really great. Just in case its as silly as me making
modifications to the Makefile in the wrong place.
big thanks,
Scott
-------------- Makefile for cdfs filesystem --------------
# Generated automatically from Makefile.in by configure.
CC=gcc
moddir=/lib/modules/2.4.18-17.7.x/kernel/fs/cdfs
CONFIG_CDFS_VERSION=0.5c
kaversion=2.4.18-17.7.x
kversion=2
kpatchlevel=4
ksublevel=18
kextraversion=-17.7.x
CONFIG_CDFS_KERNELDIR=/usr/src/linux
CONFIG_CDFS_MVERSION=1
CFLAGS=-Wall -O2 -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -
DCPU=686 -DLINUX -DCONFIG_CDFS_VERSION=\"0.5c\"
COPTS=$(c_opts) -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe
OBJS=audio.o cdXA.o cddata.o hfs.o iso.o proc.o root.o utils.o daemon.o
discid.o
TARGET_OBJ=cdfs.o
ALL=$(TARGET_OBJ)
all: $(ALL)
cdfs.o: $(OBJS)
$(LD) -r $(OBJS) -o $@
$(OBJS) $(TARGET_OBJ): cdfs.h
.c.o:
$(CC) $(CFLAGS) $(c_opts) -I$(CONFIG_CDFS_KERNELDIR)/include -c $< -Wall
.PHONY: install clean reload tags
install: $(TARGET_OBJ)
/usr/bin/install -c -m755 -d $(moddir)
/usr/bin/install -c -m644 $(TARGET_OBJ) $(moddir)
if [ -r $(CONFIG_CDFS_KERNELDIR)/System.map ]; then \
depmod -ae -F $(CONFIG_CDFS_KERNELDIR)/System.map $(kaversion); \
else \
if [ -r /boot/System.map-$(kaversion) ]; then \
depmod -ae -F /boot/System.map-$(kaversion) $(kaversion); \
else \
echo 1>&2 "No System.map found to compare symbols against."; \
echo 1>&2 "Using default (running kernel); may fail"; \
depmod -ae $(kaversion); \
fi; \
fi
clean:
-rm -f *.o *~ core tags tags
distclean: clean
-rm -f Makefile config.*
reload: cdfs.o
-umount /mnt/cdfs
-rmmod cdfs
insmod -m cdfs.o | tail +10 | grep -v ^00000000 | cat /System.map ->
/tmp/map
mount /mnt/cdfs
tags:
ctags *.[ch]
---------------------------------------------
> i got some source from freshmeat, cdfs filesystem, and am trying to get it
> working on my redhat 7.3 box. I can compile it without any troubles but when
> i try and install the module with insmod i get lots of errors such as:
> cdfs.o: unresolved symbol kfree_Rsmp_037a0cba
> cdfs.o: unresolved symbol printk_Rsmp_1b7d4074
> when i check /proc/ksyms for these symbols i get:
> c01186a0 printk_R1b7d4074
> c012f5a0 kfree_R037a0cba
> so i know there there but the compiled module seems to be looking for a smp
> version ? I read somewhere that redhat does things diffrent so i would need
> to compile using -DMODVERSIONS and -include
> /usr/src/linux/include/linux/modversions.h but after i included this in the
> Makefile and ran make there was no diffrence.
> the output from uname -r is "Linux 2.4.18-17.7.x #1 i686 unknown" and as far
> as i know its not a smp kernel.
I may be completely of the mark but anyway: did you sometime ago run e.g.
"make xconfig" in the kernel source directory, switched the settings to
SMP and possibly afterwards did a "make dep"?
I ask because from what you get from /proc/ksyms it looks as of you have
a kernel with versioning switched on and without SMP, but from what insmod
tells I get the impression that what the module included were the settings
for a SMP kernel. And the simplest possibility that this could happen
is that you messed around a bit with kernel configuration sometime ago
(or that you installed kernel sources already set up for a SMP machine).
As a test you also could go to /usr/src/linux/include/linux/modules.h
(assuming /usr/src/linux is a symbolic link to the sources for the kernel
you're running, but that what's the Makefile assumes anyway) and have a
look at e.g. printk.ver. If it has lines like
#define __ver_printk smp_1b7d4074
#define printk _set_ver(printk)
then the configuration for the kernel sources is definitely for a SMP
kernel and not for the running kernel. In this case you should go to the
root of the kernel sources, run "make xconfig", switch off SMP support
and then run "make dep". Afterwards the module must be compiled again.
Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Jens.T...@physik.fu-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring