Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 3 Oct 2002 11:32:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 3 Oct 2002 11:32:41 -0400 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:26257 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Thu, 3 Oct 2002 11:32:36 -0400 Date: Thu, 3 Oct 2002 10:37:59 -0500 (CDT) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: Tobias Ringstrom cc: Kernel Mailing List Subject: Re: 2.5.40: CONFIG_CRC32=Y is broken In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2409 Lines: 72 On Thu, 3 Oct 2002, Tobias Ringstrom wrote: > I seems that CONFIG_CRC32=Y is broken. The symbols crc32_le and crc32_be > do not appear in the System.map file, and insmod complains about crc32_be > being missing when trying to load the module via-rhine.o. > > I suspect that it happens because crc32.o is put in a lib file (.a), and > since the functions are not used at link time, the file (crc32.o) is > dropped. Yes. There is actually one reference to crc32_[lb]e, from __ksymtab, as generated by the EXPORT_SYMBOL statement. Unfortunately, the __ksymtab entry is not referenced anywhere, either, so the whole things still gets dropped. One way to fix it is to make sure the the EXPORT_SYMBOL() is a file which definitely gets linked in, as in the patch below. BTW, I strongly suspect that crc32.o is broken when compiled modular, since in this case init_crc32() won't be called. --Kai ===== kernel/ksyms.c 1.139 vs edited ===== --- 1.139/kernel/ksyms.c Sun Sep 29 23:39:05 2002 +++ edited/kernel/ksyms.c Thu Oct 3 10:30:08 2002 @@ -54,6 +54,7 @@ #include #include #include +#include #include #if defined(CONFIG_PROC_FS) @@ -585,6 +586,10 @@ EXPORT_SYMBOL(strnicmp); EXPORT_SYMBOL(strspn); EXPORT_SYMBOL(strsep); +#ifdef CONFIG_CRC32 +EXPORT_SYMBOL(crc32_le); +EXPORT_SYMBOL(crc32_be); +#endif /* software interrupts */ EXPORT_SYMBOL(tasklet_init); ===== lib/Makefile 1.13 vs edited ===== --- 1.13/lib/Makefile Sun Sep 15 16:04:18 2002 +++ edited/lib/Makefile Thu Oct 3 10:27:03 2002 @@ -9,7 +9,7 @@ L_TARGET := lib.a export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o \ - crc32.o rbtree.o radix-tree.o + rbtree.o radix-tree.o obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o \ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o ===== lib/crc32.c 1.5 vs edited ===== --- 1.5/lib/crc32.c Mon Apr 8 15:22:00 2002 +++ edited/lib/crc32.c Thu Oct 3 10:26:50 2002 @@ -566,6 +566,3 @@ fs_initcall(init_crc32); module_exit(cleanup_crc32); - -EXPORT_SYMBOL(crc32_le); -EXPORT_SYMBOL(crc32_be); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/