Re: arch/mips/boot/compressed/decompress.c:undefined reference to `__ashldi3'

From: Andrew Morton

Date: Thu Oct 01 2026 - 21:07:21 EST


On Thu, 1 Oct 2026 11:30:09 +0100 Pedro Falcato <pfalcato@xxxxxxx> wrote:

> > - bits |= (bd->inbufBits >> bd->inbufBitCount)&((1 << bits_wanted)-1);
> > + bits |= (bd->inbufBits >> bd->inbufBitCount) & ((1ULL << bits_wanted) - 1);
> >
> > return bits;
> > }
> >
> > 32-bit MIPS should be able to do this?
>
> FWIW the patch seems entirely bogus. I don't think you can have inbufBitCount >=
> 32. If you could, then the patch would still not fix anything, because
> bd->inbufBits is an (32-bit) unsigned int.
>
> As per MIPS itself, MIPS does not link ashldi3.o into the decompressor for BZ2.
> It only does so for XZ and ZSTD.
>
> Changing arch/mips/boot/compressed/Makefile would work, but since the change is
> entirely wrong I would suggest perhaps reverting?

Sure, thanks. Do you have time to send a formal patch?