tags:

views:

71

answers:

3

Basically, I'm just curious about the history.

When was the first linker written? What was the rationale at the time? E.g. was multi-language development an issue? What platform did it target? What languages and compilers were supported? What interesting stages did they evolve through?

+3  A: 

According to Linkers and Loaders by John Levine the concept, at least, was around in 1947, with significant development of the modern linkage editor by the 1960s. They are used to allow the reuse of libraries of modules developed separately by various programs that need them. I suggest reading the text (linked above from Google book search) for more information.

tvanfosson
Excellent link - thanks.
Steve314
+1  A: 

Doubtless there is a person or two here older than me, but I know when I first started coding back in the late 70's, compiled languages (particularly assembers) already had separate linkers for decades. You need something like a linker in order to deal with separately-compiled source files, even in assembler.

Looking back further, you would start needing a symbolic linker the first time you started using relocatable symbolic addresses for system calls, rather than just trapping to some well-known location.

T.E.D.
+1  A: 

The reasons why linkers were separate programs is that in the past RAM memory was pretty low and there was a need to split compiler and linker. I have seen a very old fortran compiler that worked on 16 KB of RAM but had to run through dozends of different passes. Linking was just a few of them.

Lothar
Good point. I vaguely remember when I was first starting out arguments about two-pass vs. three-pass compilers, though the single pass compilers that were already starting to appear put the whole issue to an end. At the time, I thought multiple passes were all about avoiding forward declarations, which was right to some small degree, but of course with enough memory available, that issue pretty much goes away - you can walk over an AST (or any part of it) as many times as you need to.
Steve314