Re: Smart linking under UNIX (Douglas W. Jones,201H MLH,3193350740,3193382879)
21 Aug 91 14:50:26 GMT

          From comp.compilers

Related articles
Smart linking under UNIX (1991-08-19)
Re: Smart linking under UNIX (Marc Mengel) (1991-08-19)
Re: Smart linking under UNIX (1991-08-19)
Re: Smart linking under UNIX sef@kithrup.COM (1991-08-20)
Re: Smart linking under UNIX (1991-08-21)
Re: Smart linking under UNIX (1991-08-22)
Re: Smart linking under UNIX (1991-08-22)
Re: Smart linking under UNIX (1991-08-22)
Re: Smart linking under UNIX (1991-08-22)
Re: Smart linking under UNIX weitek!ars@Sun.COM (1991-08-22)
Re: Smart linking under UNIX (1991-08-23)
[6 later articles]
| List of all articles for this month |

Newsgroups: comp.arch,comp.compilers
From: (Douglas W. Jones,201H MLH,3193350740,3193382879)
Keywords: linker
Organization: Compilers Central
References: 91-08-095
Date: 21 Aug 91 14:50:26 GMT

>From article 91-08-095, sef@kithrup.COM (Sean Eric Fagan):
  The reason it generally doesn't exist under *nix is because it's generally
> not worth the bother. It's *possible* to do it, but, on most systems, you
> don't gain much.

(-: Face red, angry reaction suppressed, hold my breath and count to ten :-)

You gain a huge amount! I've got an RT on my desk with 2 meg of RAM and 180
meg of disk. I run X-windows, and every time I fire up a window, the system
sits there thrashing for 15 seconds trying to get the thing crammed into
memory. The X library is huge, and most X applications don't need half of it.
I'd guess that most X windows users could get by with half the memory they
currently need if the linkers were smart enough to include only those parts
that are required.

I admit that 2 meg is considered small for an RT, but you can't get RT memory
very easily these days, except from IBM, and they charge an arm and a leg (I
only have two of each and I want to keep them!).

Furthermore, it hardly takes any bother to make a linker that can selectively
link only those routines in the library that are needed! I've written one in
a few weeks! Actually, I've written two of them, one is described in a paper
I published in Software Practice and Experience, Volume 13, Number 8, August
1983, titled Assembly Language as Object Code. The upshot of that paper is
that the source-code inclusion, conditional assembly, and symbolic address
calculation facilities of any decent assembler are exactly sufficient to do
smart linking. There's a paper I cite there, by Fraser and Hanson, where they
show a similar result, starting with a flexible linkage editor and
demonstrating that it could be used as a rudimentary assembly language.

Doug Jones
[I'd be interested to hear whether shared libraries that are page faulted
into the address space alleviate the performance problems of library bloat.
I can imagine that it might or might not, but data would be interesting.

Post a followup to this message

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