Re: Smart linking under UNIX

William Roberts <liam@dcs.qmw.ac.uk>
27 Aug 91 11:32:15 GMT

          From comp.compilers

Related articles
[9 earlier articles]
Re: Smart linking under UNIX weitek!ars@Sun.COM (1991-08-22)
Re: Smart linking under UNIX dalamb@umiacs.umd.edu (1991-08-23)
Re: Smart linking under UNIX pardo@gar.cs.washington.edu (1991-08-23)
Re: Smart linking under UNIX thorinn@diku.dk (1991-08-25)
Re: Smart linking under UNIX przemek@rrdstrad.nist.gov (1991-08-26)
Re: Smart linking under UNIX davidsen@crdos1.crd.ge.com (1991-08-26)
Re: Smart linking under UNIX liam@dcs.qmw.ac.uk (William Roberts) (1991-08-27)
Re: Smart linking under UNIX mjs@hpfcso.fc.hp.com (Marc Sabatella) (1991-08-27)
| List of all articles for this month |

Newsgroups: comp.arch,comp.compilers
From: William Roberts <liam@dcs.qmw.ac.uk>
Keywords: linker
Organization: Compilers Central
References: <1991Aug15.205912.6553@sono.uucp>
Date: 27 Aug 91 11:32:15 GMT

In 91-08-126 weitek!ars@Sun.COM (Allen Samuels) writes:


>HOWEVER, in my experience neither the appropriate use of the existing tools
>NOR a new "smart" linker (which accomplishes that same end via a different
>path) will solve the true problem -- library bloat.


>I call some library routine which is simple and therefore small. I discover
>much to my horror that my executable has grown in size much more than I
>expected. Obviously I got more than I asked for, conclusion: a smarter linker
>would not have include the extraneous stuff.


An anecdote concerning library bloat: the early implementations of the Sun
NeWS server provided a client-side library for sending PostScript to the
server. As per X11, they sugessted that you set a NEWSSERVER environment
variable so that the client knows the network address of the server, but
unlike X11 they didn't allow you to put a machine *name*, only the actual IP
address. I sent them patches to allow a machine name, and was told that they
had deliberately not done that because "you need gethostbyname and that pulls
in all of the Yellow Pages code" with the result that their little
demonstration binaries grew by several hundred percent....


>Library bloat is almost always caused by poor design or coding practices in
>the run time libraries.


Or raging functionality. Actually, I can't see any way that this could be
avoided, though it is true that YP stuff in libc makes use of things like
sprintf.


--


% William Roberts Internet: liam@dcs.qmw.ac.uk
% Queen Mary & Westfield College UUCP: liam@qmw-dcs.UUCP
% Mile End Road Telephone: +44 71 975 5234
% LONDON, E1 4NS, UK Fax: +44 81-980 6533
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.