RE: memcpy in 2.2.19

From: Chris Funderburg (chris@directcommunications.net)
Date: Mon Apr 02 2001 - 02:32:14 EST


My head hurts. I tried the latest aic patch. Tried it on another machine,
same version of compiler though. (Redhat gcc 2.96 20000731) - I then
tried one of the gcc snapshots, but that won't compile _at all_.

Oddly enough, the problem also occurs in reiserfs.

I've attached a copy of my .config if anyone wants to try it for
themselves...

cc -D__KERNEL__ -I/usr/src/linux/include -E -C -P -I/usr/src/linux/include -
imacros /usr/src/linux/include/asm-i386/page_offset.h -Ui386
arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds
ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
init/version.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o
fs/fs.o ipc/ipc.o \
        fs/filesystems.a \
        net/network.a \
        drivers/block/block.a drivers/char/char.o drivers/misc/misc.a
drivers/net/net.a drivers/scsi/scsi.a drivers/cdrom/cdrom.a
drivers/pci/pci.a drivers/pnp/pnp.a drivers/video/video.a \
        /usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a
/usr/src/linux/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux
fs/filesystems.a(reiserfs.o): In function `ip_check_balance':
reiserfs.o(.text+0xa45e): undefined reference to `memset'
drivers/scsi/scsi.a(aic7xxx.o): In function `aic7xxx_load_seeprom':
aic7xxx.o(.text+0x116bf): undefined reference to `memcpy'
make: *** [vmlinux] Error 1

-----Original Message-----
From: Jeff Garzik [mailto:jgarzik@mandrakesoft.com]
Sent: 30 March 2001 11:00
To: Chris Funderburg
Cc: Linux-Kernel
Subject: Re: memcpy in 2.2.19

On Fri, 30 Mar 2001, Chris Funderburg wrote:
> What's wrong with this picture:
> ld -m elf_i386 -T /usr/src/kernel/stable/linux/arch/i386/vmlinux.lds -e
[...]
> -o vmlinux
> drivers/scsi/scsi.a(aic7xxx.o): In function `aic7xxx_load_seeprom':
> aic7xxx.o(.text+0x116bf): undefined reference to `memcpy'
> make: *** [vmlinux] Error 1
>
> Is this something outside the kernel tree that I've lost? Seems a bit
weird
> since memcpy must be
> used in thousands of other place.

It's even more strange because memcpy is not called at all from that
routine. <insert Twilight Zone music>

Generally when this occurs, someone is using a gcc feature to copy a
structure, instead of calling memcpy directly. Since the kernel is
sometimes compiled with -fno-builtins, and since we also have our own
kernel memcpy, using this particular gcc feature often runs into
problems.

It's not obvious from the code that this is going on, but it's one
possible cause.

Can you try the new aic7xxx driver? Just search any linux-kernel mail
archive for Justin Gibbs, he is always [re-]posting the link to the
latest aic7xxx driver. AFAIK it has kernel compatibility and thus
supports 2.2.x...

        Jeff



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



This archive was generated by hypermail 2b29 : Sat Apr 07 2001 - 21:00:09 EST