Question on improving link speed: ld -r vs. ar

Skip Montanaro montnaro at spyder.crd.ge.com
Wed Feb 27 01:39:58 AEST 1991


I have a program that is built by linking from 10 to 30 libraries,
selectable at build time. Each library contains from five to 50 object
modules. Each object module has two externally visible symbols, the rest
being static. Each library has an interface function that stitches the
visible symbols into a lookup table for run-time function access

I'm toying with the idea of switching from a set of libraries built using ar
to a set of object modules built using ld -r to improve link speed.
Presumably, most of the symbol resolution will be done during the relatively
infrequent ld -r steps, and much less in the more frequent final link.
Before I rip my makefiles to shreds, I have a couple of questions.

	1. Given the restricted number of visible symbols in each module, is
	   it likely to improve link speeds?

	2. How widely available is the -r flag to ld? I looked around a
	   number of machines on which we currently support our software,
	   and it seems to be on all of them (Sun, Stellar, HP 9000/300,
	   SGI), but I'm hesitant about future ports.

Thanks,

--
Skip (montanaro at crdgw1.ge.com)



More information about the Comp.unix.programmer mailing list