Slow linking for ARM
Titus von Boxberg
Wed Dec 22 19:50:00 GMT 2010
Am 21.12.2010 um 17:40 schrieb Bryan Hundven:
> On Tue, Dec 21, 2010 at 2:58 AM, Titus von Boxberg <firstname.lastname@example.org> wrote:
>> Hi all,
>> does anybody know why linking for ARM cpus
>> is much slower than for others?
>> I'm using tool chains for ELF/Linux/glibc
>> for X86, PowerPC and ARM.
>> binutils is of version 2.20
> Have you tried 2.20.1 or 2.21?
> I'd say if the problem still exists there, try posting something to:
> I've been building for the same architectures (ppc for e500, arm for
> xscale). Granted I've been more concerned with functionality over
> compile time, but next time I build, I will try comparing build times.
Yes, that's sensible. But if only linking a single not overly complex
application takes 200s I think also you would be concerned with
build times ;-)
I gathered some more statistics today.
- the factor between ARM and other archs varies wildly between
2 and 25. I also got no clue for the reason of the variation
of the factor ARM<->other archs for different applications.
- gold of 2.20 does not work, at least for ARM.
With a build of HEAD of binutils from today,
- ld's linking time for the 200s-app from above is reduced to approx 12 s
- gold seems to work, and reduces the linking time further by a factor
of about 4
- HEAD-ARM-ld's linking time is still about factor 2 longer than that of
ld-2.20 for the other archs when measured with the application that
A comparison of gold for the architectures would be next.
Though with binutils-HEAD the problem is not as dramatic as before,
I still would be interested to know the reason. Factor of 25 sounds
like a good CS classroom example.
>> Linking the same software is about 4 times slower
>> for ARM than for the other CPUs.
>> What might be the reason?
> If you could give an example of a package you are building, I will
> build the same package and compare build times. Hopefully then we can
> start to dig into the problem.
As a test apart from my company's own software,
I used the http server example of asio today, and got a factor of 2
between ARM and other archs (though linking time is quite short
in total: 0.21s user for PPC/X86 and 0.45 s user for ARM on a
2GHz Core 2 Duo Mac using binutils-2.20).
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc