ISSUE and PATCH: failure to build certain modules on alpha
Hello,
This concerns a failure to build certain modules on the Alpha
platform. A patch to fix this is attached.
The current kernel sources fail to build certain parts as modules
on the Alpha correctly. The modules in question are udf.o (UDF filesystem), ext2.o (ext2 filesystem) and ymfpci.o (sound module).
The apparent problem with the filesystem modules is that the function
'memscan' is implemented as a macro on the i386 platform, but as a regular functions on other architectures like the Alpha. I only attempted to fix the issue on the Alpha, as my experience in kernel hacking isn't extensive. If other platforms are affected, I presume the fix would be similar to what I did for the Alpha.
From what I can see, the issue with the ymfpci module is general in
nature and probably affects all platforms. The macro 'mdelay' is defined in include/linux/delay.h, which is not included by drivers/sound/ymfpci.c.
Keywords: drivers, modules, alpha, unresolved symbols
Versions affected: all 2.4 versions (confirmed on 2.4.10 and 2.4.13). Environment:
This is a Debian GNU/Linux system running unstable.
marsupilami:~# cat /proc/version Linux version 2.4.10 (stroucki@marsupilami) (gcc version 2.95.4 20010902 (Debian prerelease)) #1 Tue Sep 25 02:02:22 EDT 2001 marsupilami:~# uname -a Linux marsupilami 2.4.10 #1 Tue Sep 25 02:02:22 EDT 2001 alpha unknown
Triggering issue:
Kernel compile (using make-kpkg) completes successfully, but on installing (via dpkg -i), unresolved symbols are found by depmod. The kernel boots, but the affected modules to not insert.
Here's a detailed output of depmod:-
marsupilami:/lib/modules/2.4.13# depmod -e -a -F /boot/System.map-2.4.13 2.4.13 depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/drivers/sound/ymfpci.o depmod: mdelay depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/ext2/ext2.o depmod: memscan depmod: *** Unresolved symbols in /lib/modules/2.4.13/kernel/fs/udf/udf.o depmod: memscan
Patch:
The patch is attached to this message and fixes the issue on the Alpha. It is quite small, only 19 lines. It was generated from the 2.4.13 sources, but should apply to 2.4.10 and others also.
Verification:
I first became annoyed enough to work on this with the 2.4.10 version. After the patch was applied, the warnings from depmod were absent, and upon booting, the relevant modules inserted (and removed) correctly:-
marsupilami:~# lsmod Module Size Used by udf 141904 0 (unused) ... ext2 50024 2 (autoclean)
Personal info:
I do not read the kernel mailing list regularly, but will do so for the next week. I am reachable at [email protected] .
Greetings,
Michael.
Signature · 4 lines
This message may have passed through thousands of machines throughout the entire civilised world. It might have cost the net hundreds, if not thousands of dollars to send everywhere. Michael Stroucken ++ [email protected] ++ DEC Alpha ++ 1982 Honda CM450C
arch/alpha/kernel/alpha_ksyms.c +1 -0
@@ -257,3 +257,4 @@EXPORT_SYMBOL_NOVERS (memchr);EXPORT_SYMBOL (get_wchan); +EXPORT_SYMBOL (memscan);
drivers/sound/ymfpci.c +1 -0
@@ -51,6 +51,7 @@#include <linux/soundcard.h> #include <linux/ac97_codec.h> #include <linux/sound.h> +#include <linux/delay.h> #include <asm/io.h> #include <asm/dma.h>