Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1And in Conclusion\dots

We spent one chapter covering one figure:

"TODO"

Flow chart for steps for compiling and running a C program.

2Textbook Readings

P&H 2.12

3Exercises

Check your knowledge!

3.1Conceptual Review

Solution to Exercise 1 #

Two: The first finds all the label addresses, and the second resolves forward references while using these label addresses.

Solution to Exercise 2 #

The assembler usually handles relative addressing. The linker handles absolute addressing, resolving the references to memory locations outside.

Solution to Exercise 3 #
  • Header: Sizes and positions of the other parts

  • Text: The machine code

  • Data: Binary representation of any data in the source file

  • Relocation Table: Identifies lines of code that need to be “handled” by the Linker (jumps to external labels (e.g. lib files), references to static data)

  • Symbol Table: List of file labels and data that can be referenced across files

  • Debugging Information: Additional information for debuggers