[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ´ð¸´: Re: How large file can be pr ocessed by the linker "ld"?

From: Nick Clifton
Subject: Re: ´ð¸´: Re: How large file can be pr ocessed by the linker "ld"?
Date: Mon, 17 Nov 2008 16:17:43 +0000
User-agent: Thunderbird (X11/20080723)

Hi shihhuangti,

I want to know why the linker use such amount memory to put the objs together? it is possible to be optimized?

Yes, but it would be a lot of work. (Essentially it would mean rewriting the linker with minimizing memory usage as the main aim). But ... this does suggest an alternative - have you tried using a different linker ? There are two that I know of that might work for you - the "gold" linker which is currently under development in the binutils project and the linker which comes with the elfutils project. (I am not really involved in the elfutils project so I cannot tell you any more about their linker). The gold linker can be built from the current binutils sources by specifying --enable-gold on the configure command line. Give it a try and see if it helps.

if I doesn't use option "-X -s" when invoking the linker ld, and with option "-r" the relocated obj file can be generated which has size of 2g bytes above.

I think this is a bug, am I right?

I don't think so. The problem is that you are dealing with a very big program and you are attempting to link it on a machine with only a limited amount of memory.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]