From: Bryan R. <br...@ix...> - 2000-09-26 22:03:32
|
Mitch Davis wrote: [regarding unresolved symbols when loading SH modules] > I compiled his version (based on modutils 2.3.7) and had > the same problem. I fixed it quite simply by adding > these lines to arch/sh/kernel/sh_ksyms.c: > > #include <asm/pgtable.h> > > EXPORT_SYMBOL(flush_dcache_page); > > EXPORT_SYMBOL(memset); > EXPORT_SYMBOL(memcpy); > > (I don't know if this is the way to really fix it - simply > does not imply correctly!) A look in arch/arm/kernel/armksyms.c suggests that it is sh_ksyms.c responsibility to export mem routines--whether or not we have fast assembly code for them in arch/sh/lib/*.S Here's a proposed patch against the latest LinuxSH CVS kernel's sh_ksyms.c: ----- --- sh_ksyms-orig.c Tue Sep 26 13:46:27 2000 +++ sh_ksyms.c Tue Sep 26 14:35:22 2000 @@ -17,6 +17,7 @@ #include <asm/hardirq.h> #include <asm/delay.h> #include <asm/irq.h> +#include <asm/pgtable.h> extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); @@ -36,6 +37,21 @@ EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); + +/* mem exports */ +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memmove); + +/* these are not provided by arch/sh/lib/*.S but are + potentially needed by modules (af_packet.o/unix.o + use memcmp, for instance) */ +EXPORT_SYMBOL(memcmp); +EXPORT_SYMBOL(memscan); + +/* needed by some modules */ +EXPORT_SYMBOL(flush_dcache_page); #ifdef CONFIG_VT ----- I think this patch should go into the main CVS tree ASAP since without these symbols it is impossible to load most kernel source modules! (almost all of them use some mem* routines) With my patch, dummy.o ramfs.o unix.o and af_packet.o all load (and appear to function) correctly: /lib/modules # uname -a Linux (none) 2.4.0-test9 #6 Tue Sep 26 14:48:06 PDT 2000 sh4 unknown /lib/modules # lsmod Module Size Used by ixdma 1676 0 (unused) ramfs 2548 0 (unused) dummy 1164 0 (unused) af_packet 9596 0 (unused) unix 16260 0 (unused) Comments Niibe-san? Regards, Bryan -- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |