[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: undefined reference
Hello,
Your kernel has been compiled with the symbol versioning enabled. This means that the symbols exported by your kernel have a checksum attached (the 'load of characters'),
which depends on the symbol name and the kernel version.
In order to have your module properly compiled, include the following lines:
#define MODVERSIONS
#include <linux/modversions.h>
regards
Martin
jhorton wrote:
> Hi,
>
> I'm still having a bit of trouble compiling my drivers into the kernel.
>
> I get an undefined reference for printk and register_chrdev.
>
> For some reason, the compiler adds a whole load of characters and numbers after the printk and
>
> register_chrdev.
>
> what is going on?
>
> --
> #!/usr/bin/perl
> my@d=(60,58,65,68,70,65,64,18,63,72,59,69,70,51,0,53,65,63);my $s=scalar @d;
> for($i=0;$i<$s;$i++){my $c=@d[$i];$c+=sqrt(2116);$c=chr($c);print"$c";}
>
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> IRC Channel: irc.openprojects.net / #kernelnewbies
> Web Page: http://www.kernelnewbies.org/
--
Supercomputing System AG email: maletinsky@scs.ch
Martin Maletinsky phone: +41 (0)1 445 16 05
Technoparkstrasse 1 fax: +41 (0)1 445 16 10
CH-8005 Zurich
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/