Slow linking for ARM
Titus von Boxberg
Fri Dec 24 16:39:00 GMT 2010
Am 24.12.2010 um 15:53 schrieb Bill Pringlemeir:
> On 22 Dec 2010, email@example.com wrote:
>> Am 22.12.2010 um 21:09 schrieb Bryan Hundven:
>>>> 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).
>>> So your building apache2? lighttpd? custom httpd server? Just
>>> curious so I can repo the problem, and eventually start to provide
>> Sorry, that was a bit short. I meant boost's asio lib
>> (www.boost.org). Included are small samples e.g. for a http
>> server. That was something I had lying around for testing. But
>> maybe also other applications do the trick.
> It sounds like titus's primary apps are C++, perhaps with heavy
> template usage.
Yes, that's correct.
> The 'gold' linker has far higher performance for C++
> applications with large name mangling, etc.
> Ian Lance Taylor, golds creator, measures it as 5x faster. For
> pathological cases, it may be even more.
That's also what I've observed.
> Bryan and other ARM users may not notice the link times unless they
> are linking C++ templates. If 'gold' is not building for the ARM,
> this might explain everything as 'ld' can be 'gold' with the right
> configuration options. I think that 'whole program optimization'
> (-whopr?) might require 'gold'.
Apparently, gold now works for ARM. Unfortunately, the output of gold
does not seem to work for PowerPC.
My problem with the absolute linking time of some of my programs for ARM
is also solved by using ld of a recent binutils.
My main question (out of curiosity) was why linking for ARM might be slower
than for other archs.
Also gold exhibits that behaviour, as I found out yesterday:
Linking the same application for ARM takes about 20-30% longer than
for X86 and PPC. The resulting executable is biggest for PowerPC,
so that cannot be the reason; also the differences in size are not large
enough to explain the time figures.
Any ideas what makes ARM different for the linker?
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc