Question

Explain the concept of symbol table. How does the linker use the symbol table to create...

Explain the concept of symbol table. How does the linker use the symbol table to create executable object files?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Symbol Table:

  • The symbol table is one of the most important concepts that exist in the compiler designing. The symbol table can be defined as the data structure which is being created and maintained by the compilers for storing information about the important entities that exist in a program such as:
    • Variables
    • Function
    • Objects
    • Classes
    • Interfaces
    • Abstract Data types
  • The symbol table is being utilized by many parts of the compiler but the main usage relies on the analysis & synthesis part of a compiler. The symbol table can either be a complex hash table or a simple linear table and can maintain the entry of each and every name.
  • The symbol table serves various purposes on the field. Some of them are as follows:
    • For storing all the entities in one place in a particular structure
    • For verifying the variables that are being declared
    • For implementing the type checking, assignments and expressions that are present in the codes which are semantically correct.
    • For determining the scope resolutions

How does linker make use of symbol table?

  • The symbol table will be residing in the object file for the identifiers. When the linker accesses the object file it will start to identify and resolve the symbol references that are present in the object file.
  • Hence, this is how the linker makes use of the symbol table to develop an executable object file. When any tool is performing reverse engineering operation they make use of the symbol table to refer the addresses that are being assigned to the global variables and also the known functions.

Hence, this is how the symbol table can be utilized for most important tasks.

Add a comment
Know the answer?
Add Answer to:
Explain the concept of symbol table. How does the linker use the symbol table to create...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT