2003-05-28 05:32:23

by Andres Salomon

[permalink] [raw]
Subject: [PATCH] register_ioctl32_conversion symbol exports fix

I get the following error when compiling 2.5.70 for sparc64, using
gcc-3.3:


CC init/version.o
scripts/fixdep init/.version.o.d init/version.o 'gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -finline-limit=100000 -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=version -DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c' > init/.version.o.tmp; rm -f init/.version.o.d; mv -f init/.version.o.tmp init/.version.o.cmd
LD init/built-in.o
LD vmlinux
fs/built-in.o(*ABS*+0xb766971): In function `__crc_register_ioctl32_conversion':util.c: multiple definition of `__crc_register_ioctl32_conversion'
make: *** [vmlinux] Error 1


The problem is apparently register_ioctl32_conversion() is exported twice
for a few architectures:

./fs/compat.c:int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
./fs/compat.c:EXPORT_SYMBOL(register_ioctl32_conversion);
./arch/ppc64/kernel/ppc_ksyms.c:EXPORT_SYMBOL(register_ioctl32_conversion);
./arch/sparc64/kernel/sparc64_ksyms.c:EXPORT_SYMBOL(register_ioctl32_conversion);

Since compat.c is only built if CONFIG_COMPAT is defined, the entries in
${arch}_ksyms.c are incorrect (at the very least, they need to test for
this sort of thing). I don't see the harm in removing the exports
altogether from the arch-specific stuff; so, that's what this patch does
(to both {,un}register_ioctl32_conversion). Please apply (or correct me
;)




On Mon, 26 May 2003 19:08:45 -0700, Linus Torvalds wrote:
>
> Ok,
> there's been too much delay between 69 and 70, but I was hoping to make
> 70 the last "Linus only" release before getting together with Andrew and
> figuring out how to start the "pre-2.6" series and more of a code slush.
>
[...]
> o I2C: And another it87 patch
> o I2C: And yet another it87 patch



2003-05-28 07:54:01

by Andres Salomon

[permalink] [raw]
Subject: Re: [PATCH] register_ioctl32_conversion symbol exports fix

Oops, sorry. One of these days, I will find an NNTP client that suck..


On Wed, 2003-05-28 at 03:47, Adrian Bunk wrote:
> On Wed, May 28, 2003 at 01:45:33AM -0400, Andres Salomon wrote:
> >...
> > altogether from the arch-specific stuff; so, that's what this patch does
> > (to both {,un}register_ioctl32_conversion). Please apply (or correct me
> >...
>
> -ENOPATCH
>
> cu
> Adrian


Attachments:
ioctl32.diff (1.90 kB)