From: | David Stes <stes@mundivia.es> |
Newsgroups: | comp.compilers |
Date: | 22 Aug 1998 23:28:35 -0400 |
Organization: | Compilers Central |
References: | 98-08-147 98-08-150 |
Keywords: | linker, C++ |
> I don't mind the grossness, I used to hand-punch 360/20 object code
> into cards on keypunches and you can't get much grosser than that.
:-)
> you have to hand-enumerate every possible thing that might have an
> initializer somewhere and it won't complain if you forget something.
Clearly, in practice, you have the symbols automatically generated ...
The basic idea for that, is that a module defines the symbol that
corresponds to itself as its initializer routine; for modules that are
#include'd, on the other hand, uninitialized symbols are emitted.
So basically you move the problem from the link editor to the compiler ...
The compiler does the enumeration of the symbols that are then merged by
the link editor.
But it means that you can link with an unmodified link editor.
In some environments it may be easy to replace the link editor, but
often you can only add an additional linker (or front-end) and then it
gets confusing which objects to link with which linker ... so in that
case, when you're not the maintainer of the system link editor, some
of the good old hacks may be useful !
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.