On Thu, 25 Jul 2002, Michael Svetlik wrote:
> The kernel checks the module version against the actual kernel version.
> If they dont match, you get an 'unresolved external' for each kernel
> resource reference.
> Check, which 'version.h' your compiler actually includes (-v, dependency
> files by -M). I assume, you have a stall header in /usr/include/linux -
> Thanks to RedHat, Inc.
> You may force your compiler to generate a loadable module a few ways:
> #define the verion tags yourself, #undef MODVERSION, or edit the
> .modinfo section of your ouput file :
>
> using_checksums=0 ;-)
I see that /usr/include/linux has header files for 2.4.9. I changed
it to be a link:
/usr/include/linux -> /usr/src/linux/include/linux/
(why did redhat do this?)
Then I recompiled my kernel, RTLinux, and my applications. Same problem:
# /sbin/insmod lp.o
lp.o: unresolved symbol sprintf
Using a hex editor I was able to find the following in my kernel module:
00003040 6b 65 72 6e 65 6c 5f 76 65 72 73 69 6f 6e 3d 32 kernel_version=2
00003050 2e 34 2e 31 38 2d 72 74 6c 33 31 00 75 73 69 6e .4.18-rtl31.usin
00003060 67 5f 63 68 65 63 6b 73 75 6d 73 3d <31>00 69 6e g_checksums=1.in
If I changed "check_sum=1' to 'check_sum=0', my module will load.
A work-around, but not a real soution to getting compiled modules to work.
My uname -a is:
Linux wobbegong 2.4.18-rtl31 #2 Thu Jul 25 09:06:43 HST 2002 i686 unknown
My 'cat /usr/include/linux/version.h' saids:
#define UTS_RELEASE "2.4.18-rtl31"
My RTL compiled module lp.o has:
kernel_version=2.4.18-rtl31.using_checksums=1
But my '/sbin/insmod lp.o' still does unresolved symbol sprintf.
Any advice on how to fix it?
Thanks,
Tony
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/