lkml.org 
[lkml]   [2000]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.3.99-pre2: shm.c and ide-as-module compile failures
Date
Two things:

=== 1. shm.c does not compile:

gcc -D__KERNEL__ -I/usr/src/linux/include -D__SMP__ -Wall -Wstrict-prototypes -O
2 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -DCPU=586 -march=i586
-fno-strict-aliasing -c -o shm.o shm.c
shm.c:142: `THIS_MODULE' undeclared here (not in a function)
shm.c:142: initializer element is not constant
shm.c:142: (near initialization for `shm_fs_type.owner')
make[2]: *** [shm.o] Error 1
make[2]: Leaving directory `/u/usr/src/linux-2.3/ipc'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/u/usr/src/linux-2.3/ipc'
make: *** [_dir_ipc] Error 2

Adding "#include <linux/module.h>" helps this but I am not sure if this
is a right approach.

=== 2. If ide driver is configured as module, image does not link:
....
-o vmlinux
fs/fs.o: In function `msdos_partition':
fs/fs.o(.text+0x1fab5): undefined reference to `ide_xlate_1024'
fs/fs.o(.text+0x1fae5): undefined reference to `ide_xlate_1024'
fs/fs.o(.text+0x1fb6e): undefined reference to `ide_xlate_1024'
make: *** [vmlinux] Error 1

This is because in fs/partitions/msdos.c ide_xlate is referred if
any of CONFIG_BLK_DEV_IDE and CONFIG_BLK_DEV_IDE_MODULE is defined,
while ide-geometry.o is not inlcuded in the kernel image unless
CONFIG_BLK_DEV_IDE is defined. If you modify Makefile and
drivers/Makefile to include ide-geometry.o in the kernel, you notice
that ide-geometry has some unresolved symbols from ide.c...

Eugene

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.041 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site