RE: SMP kernels and linking - update

Lee Rhodes (LeeR@eicon.com)
Tue, 26 Oct 1999 11:05:58 -0400


Thanks to Keiths tip, I got things going. I put everything back into the
Linux src tree and did a make modules (after some twiddling). When that
worked, I just took note of the compile options and brought them back out to
my stand-alone source tree. It built and insmod'ed just fine. Now I'm having
difficulties building my driver with RedHat. The running kernel is labelled
as
2.2.5-15smp

My built module (as with other modules after the make modules) has been
tagged with 2.2.5-15. When I try insmod'ing with -f (to force it) I get
unresolved symbols of the variety
unresolved symbol printk_R1b7d4074

cat /proc/ksyms reveals:
c0115534 printk_Rsmp_1b7d4074

For some reason the smp_ is not being prefixed when I make modules. I can
see in the /usr/src/linux/Rules.make that genksyms is run with -p smp_ but
that does not seem to be 'kicking in'.

It's the same if I try any other newly built module (e.g. slhc). After
-f'ing the insmod I get unresolved symbols.

Here's what options are being used when compiling my source code:
gcc -D__KERNEL__ -I/usr/src/linux-2.2.5/include -Wall
-Wstrict-prototypes -O2
-fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -m386
-DCPU=386 -DMODULE
-DMODVERSIONS -include
/usr/src/linux-2.2.5/include/linux/modversions.h ...

Anyone?
L

> -----Original Message-----
> From: Fabian.Frederick@prov-liege.be
> [mailto:Fabian.Frederick@prov-liege.be]
> Sent: 26 October 1999 15:29
> To: kaos@ocs.com.au
> Cc: linux-kernel@vger.rutgers.edu
> Subject: RE: SMP kernels and linking
>
>
> > You *really* should use the kernel Makefile structure
> instead of using
> > your own Makefiles. You have built your module without
> kernel symbols
> > but the kernel was built with symbols, instant mismatch. You almost
> > guarantee this sort of problem when you roll your own Makefile. You
> > need to compile *exactly* the same way that the kernel was
> compiled so
> > why not hook your code into the kernel tree?
> How could you explain so that kind of feature :
>
> Let's say I've got a kernel compiled using both 686 directive &
> SMP
> OTOH, one module is compiled with extern makefile using
> _only_ _D__MODULE and insmod(ing) works ... why ?
> IMHO, that module is 386 UP release.
>
> Take care,
> Fabian
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/