Re: 2.3.26 undefined reference...

Matti Aarnio (matti.aarnio@sonera.fi)
Mon, 8 Nov 1999 23:09:13 +0200


On Mon, Nov 08, 1999 at 02:26:31PM -0600, Peter Samuelson wrote:
> [Michael H. Warfield]
> > ] fs/fs.o: In function `quota_on':
> > ] fs/fs.o(.text+0x165a5): undefined reference to `__umoddi3'
>
> Yeah, more 64-bit math. The workaround is to link with
> `gcc -print-libgcc-file-name`. The fix is probably something like
> (untested)

Which compiler do you have ?

Oddly I don't see this 64-bit division case at all, as if
'sizeof(struct dquot)' were e.g. power of two and egcs-1.1.2
is able to optimize this case ?

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

The patch is - likely - correct.

> --- linux-2.3.26/fs/dquot.c~ Thu Oct 7 14:47:37 1999
> +++ linux-2.3.26/fs/dquot.c Mon Nov 8 14:23:59 1999
> @@ -1308,7 +1308,7 @@
> if (!S_ISREG(inode->i_mode))
> goto cleanup;
> error = -EINVAL;
> - if (inode->i_size == 0 || (inode->i_size % sizeof(struct dqblk)) != 0)
> + if (inode->i_size == 0 || ((int)inode->i_size % sizeof(struct dqblk)) != 0)
> goto cleanup;
>
> /* OK, there we go */
>
> --
> Peter Samuelson
> <sampo.creighton.edu!psamuels>

/Matti Aarnio <matti.aarnio@sonera.fi>

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