|how to link email@example.com (1996-10-16)|
|From:||firstname.lastname@example.org (Michael E. McNamara)|
|Date:||16 Oct 1996 17:50:07 -0400|
|Organization:||Bowling Green State University, Bowling Green, OH (USA)|
Class assigment is to write a linker in C++
Problem is, the school deosn't have any text on how linkers
are suppose to work, so we, as a class, are pretty clueless. No one
is really sure how to backtrack the addresses or what part the
Question: Were can I find a good descripton on the linking procedure?
Textbook? professional papaer? web site?
Respond if you have a clue. My entire class will be grateful.
Bowling Green State University
[I normally don't post questions asking to do students' homework, but
it's true that there isn't much available on linker design, so it's a
pretty tough assignment to give without offering some help. You can
always read the code of an actual linker, such as the GNU ld or the
one that comes with 4.4BSD.
The usual approach is to make two passes similar to those in an
assembler, one to figure out where each input module will end up and
to make a table the symbols and their values, then a second pass that
actually combines the input modules into the output, adjusting
addresses and resolving symbols. -John]
Return to the
Search the comp.compilers archives again.