본문 바로가기
Computer Architecture/컴퓨터구조[01]

[컴퓨터구조] 2. Instructions: Language of the Computer (1)

by leziwn.cs 2023. 9. 13.
Compiler - Assembler - Linker - Loader
  1. Compiler: C program --> Assembly language program
    **Assembly language: A symbolic form of what the machine understand.
  2. Assembler: Assembly language program --> Object file
    **Object file: A combination of machine language instructions, data and information needed to place instructions properly in memory.
  3. Linker: Independently assembled machine language --> Executable file
    - The linker uses the relocation information, symbolic table in each object module to resolve(해결하다) all undefined labels.
  4. Loader: Load the executable file into memory for execution.

 

Other Information
  • Symbolic table
    : A table that matches names of labels to the addresses of the memory words that instructions occupy(차지하다).
  • Executable file
    : A functional program in the format of an object file that contains no unresolved references, relocation information, symbolic table, or debugging information.

 

 

Library: Static vs. Dynamic

▶ Static

: Loading tha whole library no matter that is running or not.

--> Becoming a part of the executable file.

 

▶ Dynamic

: Not linked nor loaded until the program is run.

--> Pay a good deal of overhead the first time a routine is called.

 

 

A Translation Hierarchy For C

A Translation Hierarchy For C

 

Machine Language

: Computer instructions can be represented as a sequences of bits.

 

Assembly Language

: Very closely related to machine language.

  • Assembler: Assembly language --> Machine language.

Because of the close relationship between machine languages and assembly languages, each different machine architecture usually has its own assembly language.