Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!crdgw1!montnaro From: montnaro@spyder.crd.ge.com (Skip Montanaro) Newsgroups: comp.unix.programmer Subject: Question on improving link speed: ld -r vs. ar Message-ID: Date: 26 Feb 91 14:39:58 GMT Sender: news@crdgw1.crd.ge.com Reply-To: montanaro@crdgw1.ge.com (Skip Montanaro) Organization: GE Corporate Research & Development, Schenectady, NY Lines: 25 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@crdgw1.ge.com) Brought to you by Super Global Mega Corp .com