parallelized 'ld'?

Mathew Boorman matb@webone.com.au
Thu Jul 17 14:41:00 GMT 2003


On Tue, 2003-07-15 at 09:56, Kris Warkentin wrote:
> I don't know much about the subject one way or another but an interesting
> whitepaper on a related subject, Incremental Linking is here:
> 
> http://www.usenix.org/events/osdi2000/wiess2000/full_papers/mikulin/mikulin.
> pdf
> 
> I have a feeling that the gains from this would be similar to parallelizing
> (when only a few objects are changed) and perhaps, in the case of GNU ld,
> easier to implement.

Hi, I have been lurking with a plan to improve ld's performance, I was
expecting incremental linking would be the way to do it.  I had not
found the above paper though, it certainly makes the design effort
simpler.  I was not ready to de-lurk yet, but the issue turned up!

In our environment the biggest performance limitation of ld has simply
been the file io, which is very noticeable when over nfs on slow LANs.
For Solaris we turned on incremental linking which really helped, for
Linux we messed with our source control tools to get the object files
stored locally.

I only realised how much faster g++/ld/gdb could be when I used MS
Visual Studio again and could get debug/edit/build/debug cycles in sub 1
second. Of course msvc uses a whole bunch of tricks to achieve that, but
incremental linking is probably the next step given the g++ changes in
progress.

The other big factor was edit in place(name?), where code changes are
patched into the executable running in the debugger.  To implement that
you need to add the new version of the changed functions to the image
and link them in for future calls. The msvc one is much smarter than
that,  doing the duplication only if the changed functions are already
down the call stack, and manipulating the stack appropriately if the
change is to the currently active function.

Anyway as a newbie, pointers to useful places and documentation to get
familiar with are appreciated, and as usual ignore the stupider
questions! Meantime I'll go back to lurking for a while as I learn some
more about ld's inards.

Mat Boorman




More information about the Binutils mailing list