ARM: pxa/corgi: armv5te kernel 4.12 fails to decompress compiled with gcc7

Aaro Koskinen aaro.koskinen at iki.fi
Tue Oct 17 13:33:11 PDT 2017


Hi,

On Mon, Oct 16, 2017 at 01:55:18PM +0200, Petr Cvek wrote:
> Dne 15.10.2017 v 12:46 Aaro Koskinen napsal(a):
> > This seems to be simpler to debug/reproduce using busybox. Compiling
> > just busybox with GCC 7.2 and march=armv5te/mtune=xscale already
> > produces failing xz decompression:
> 
> Does it fail too when compiled with gcc 7.2 and with march=armv5t and/or
> march=armv4t ?

At least armv4t seems to work.

> > root at thecus-n2100:~$ gzip foo.txt
> > root at thecus-n2100:~$ ./busybox.gcc-7.2 gzip -d foo.txt.gz
> > gzip: crc error
> > root at thecus-n2100:~$ ./busybox.gcc-6.4 gzip -d foo.txt.gz
> > root at thecus-n2100:~$ cat foo.txt
> > foo
> > 
> 
> Is it really compiled with armv5te ("readelf -n -A")?

Yes.

> I've just found my old gcc 6.3 compiled some code with a default armv4t.

You can set the default with compiling GCC using --with-arch=...

BTW, the failing instruction seems to be STRD and there seems to be
already a related bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82445

A.



More information about the linux-arm-kernel mailing list