Re: pre-patch-2.1.37-3 comment / compile fixes

Systemkennung Linux (linux@mailhost.uni-koblenz.de)
Sun, 4 May 1997 00:58:31 +0200 (MET DST)


>
> Martin von Loewis said:
> > > CFLAGS := $(CFLAGS) -fno-inline-functions
> > >
> > > This second one is a problem where newer pgcc snapshots [and thus the
> > > long-awaited 2.8.0] will aggressively inline the code and cause multiply
> > > defined symbols in checksum.c. Shouldn't affect performance as I don't
> > > see any code that would benefit from inlining in there.
> >
> > This is the wrong fix. Which are the multiple symbols you get? Either this
> > is a bug in gcc, or a bug in checksum.c (e.g. including include files it
> > shouldn't include).
>
> helix,1:~/src/linux/arch/i386/lib% gcc -D__KERNEL__ -I/usr/src/linux/include -O6
> -c checksum.c
> /tmp/cca00480.s: Assembler messages:
> /tmp/cca00480.s:604: Fatal error: Symbol end_of_body already defined.

Martin is right. The bug is produced by GCC inlining
csum_partial_copy_generic() into csum_partial_copy() AND keeping one
outlined copy of csum_partial_copy_generic() for the other callers
in include/asm-i386/checksum.h. Fix is to use local labels only in
all inline assembler.

Ralf