bug-binutils
[Top][All Lists]
Advanced

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

答复: Re: ´ð¸´: Re: How large fil e can be processed by the linker "ld"?


From: shihhuangti
Subject: 答复: Re: ´ð¸´: Re: How large fil e can be processed by the linker "ld"?
Date: Wed, 26 Nov 2008 20:01:25 +0800


Hi nick,

the gold doesn't help too;

after my reading the ld's code and debugging it, I find the reason of the latter problem: maybe it is due to the gcc's bug( about when using "-g3", some asm-inlined function may be placed in section ".debug_macinfo", but the maintainer doesn't think so), and I use another method of inlining asm code to avoid the latter problem;

the first problem about ld is the output of error message "memory exhausted", after reviewing of the src code, I think I can resolve it by modification of the code.




Nick Clifton <address@hidden>

2008-11-18 00:21

收件人
address@hidden
抄送
address@hidden
主题
Re: ´ð¸´: Re: How large file can be processed by the linker "ld"?





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.

Cheers
  Nick



reply via email to

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