libtool-patches
[Top][All Lists]
Advanced

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

Re: speed up large library linking


From: Howard Chu
Subject: Re: speed up large library linking
Date: Tue, 10 May 2005 23:53:17 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050508

Alexandre Oliva wrote:
On May 10, 2005, Ralf Wildenhues <address@hidden> wrote:


* Ralf Wildenhues wrote on Mon, May 09, 2005 at 10:58:01PM CEST:

- rewrite piecewise old archive linking


While reading the GNU ld manpage:
| A number of modifiers (mod) may immediately follow the p keyletter,  to
| specify variations on an operation's behavior:
| [...]
| S   Do not generate an archive symbol table.  This can speed up  build-
|     ing  a  large  library in several steps.  The resulting archive can
|     not be used with the linker.  In order to build a symbol table, you
|     must  omit  the S modifier on the last execution of ar, or you must
|     run ranlib on the archive.


Is there any reason we don't use this?  Should I hack up a patch for it?


I don't think so, and Yes, please!, respectively :-)

While at that, how about losing ranlib when ar already does its job?
Ian Lance Taylor suggested we could test for this by creating an
archive with ar, no ranlib, and trying to link an executable that
pulls symbols from the archive.  We should probably make sure the
symbol we bring in form the archive isn't available if the archive
isn't linked in (e.g., from libc), just to be paranoid.

Can't you detect this just by whether "ar rs" is a valid command? If that fails, then that should mean ar doesn't generate the symbol table, and if it succeeds, then it does.

--
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support




reply via email to

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