[Arm-netbook] Executable size, armv6 vs armv7

Gordan Bobic gordan at bobich.net
Tue Apr 24 11:05:34 BST 2012


Barry Kauler wrote:
> Guys,
> There was recently some discussion on this mail list about why we
> would want to compile for a armv7-specific CPU or go for something
> lower.

The distros generally fall into 3 camps:

1) armv5tel only (Fedora <= 16, RedSleeve (based on upstream that is 
loosely based on Fedora ~12) - generally due to the toolchain versions 
they are based on not being stable for armv7hl

2) armv7hl only (latest Ubuntu, previous versions were armv5tel)

3) armv5tel + armv7hl (separate builds, obviously, e.g. Fedora 17).

Thus, to be sure, I would argue you should probably have both armv5tel 
and armv7hl builds.

> There was a lack of data on this. For example, the thumb2 instructions
> in the armv7 are supposed to reduce executable size, but we don't know
> by how much.

A more important consideration is the stability of the toolchains. 
Saving a few bytes may be a nice optimization, but it shouldn't get in 
the way of getting it to work properly first.

> I have got my first comparison. I am running Ubuntu Lucid from SD card
> (the one that Tom uploaded :) ), and I optioned it up with many -dev
> packages, to be able to compile X and GTK apps.
> 
> I compiled ROX-Filer. I have reported about this on my blog:
> 
> http://bkhome.org/blog/?viewDetailed=02800
> 
> The size difference is very interesting, 361KB versus 489KB. I presume
> that the second case is due to not using the thumb2 instructions? I
> don't know what else could account for such a big difference.
> 
> For each test, I started with pristine source.

Hard to tell without disassembling. Also, I thought that thumb2 isn't 
available by default unless you explicitly enable it. Could it be that 
ARMv7 has single instructions that have to be emulated in a more complex 
way on earlier ARMs?

Gordan



More information about the arm-netbook mailing list