how to link (Michael E. McNamara)
16 Oct 1996 17:50:07 -0400

          From comp.compilers

Related articles
how to link (1996-10-16)
| List of all articles for this month |

From: (Michael E. McNamara)
Newsgroups: comp.compilers
Date: 16 Oct 1996 17:50:07 -0400
Organization: Bowling Green State University, Bowling Green, OH (USA)
Keywords: linker, question

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
tables play.

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.

Michael McNamara
Computer Science
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]


Post a followup to this message

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