Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!hplabs!hpda!hpcupt1!bla From: bla@hpcupt1.cup.hp.com (Brad Ahlf) Newsgroups: comp.sys.hp Subject: Re: HP-UX `ld' tricks. Message-ID: <-286539938@hpcupt1.cup.hp.com> Date: 14 Nov 90 00:10:27 GMT References: <1783@kuling.UUCP> Organization: Hewlett Packard, Cupertino Lines: 33 > I am trying to speed up my linking and have played around with > the HP-UX 7.0 `ld' options "-X" and "-A". For very large programs, you might have better luck speeding up your links using the '-r' option to accomplish 'prelinks' with 'ld'. This could result in a lot less work for the linker to do when rebuilding very large executables. You could create a makefile setup for your very large program that uses the '-r' 'prelinks' of thousands of .o files into handfuls of .o files. Each 'prelink' merges some hundreds of .o files into a single .o target file and this work is not repeated in the 'final link' of the few .o files. Then, a change to a single source file would require a recompile of file.c, a -r link of file.o into merge1.o and a final link of the few merge*.o files. In this way, only the hundred or so files which make up merge1.o are again prelinked, and the other multiple thousands of files are already prelinked, potentially saving the linker a lot of work. This method was found, on older releases of HP-UX for huge executable files, to save significant amounts of link time. This method could probably save some link time on just about any vendors' UN*X platform. Of course, your mileage may vary. Try it out and see for yourself. And let us know your results too. > Bo Brad Ahlf bla@hpda.hp.com This response does not represent the official position of, or statement by, the Hewlett-Packard Company. The above data is provided for informational purposes only. It is supplied without warranty of any kind.