Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
Question
Book Icon
Chapter 7.5, Problem 7.1PP
Program Plan Intro

Sections in relocatable object files:

There are many sections in a relocatable object file. They are given below:

  • “.text”:
    • It is the machine code of the compiled program.
  • “.rodata”:
    • This section is used to read only the data in the format such as
      • Strings in “printf” statements.
      • Jump tables for switch statements.
  • “.data”:
    • This section is used in the initialized “C” variables of global variable and static “C” variables.
    • Local “C” variables are initialized at execution time on the stack.
      • It does not show in either the “.data” or “.bss” sections.
  • “.bss”:
    • It is used in the uninitialized global and static “C” variables, along with any global or static variables that are assigned to zero.
  • “.symtab”:
    • It is a symbol table.
    • It contains the information about functions and global variables that are defined and referenced in the program.
  • “.rel.text”:
    • This section contains a list of locations in the “.text” section.
      • It will require to be changed once the linker merges this object file with others.
  • “.rel.data”:
    • This section contains relocation information for any global variables that are referenced or defined by the module.
  • “.debug”:
    • It is a symbol table for debugging
    • It contains entries for following
      • Definition of Local variables, global variables and typedefs variables and original “C” source file.
  • “.line”:
    • It is a mapping between line numbers in the given program
      • That is in original “C” source program and machine code instructions in the “.text” section.
  • “.strtab”:
    • It is a string table.
      • It contains symbol tables in the “.symtab” and “.debug” sections.
      • It is the table for section names in the section headers.

Blurred answer
Students have asked these similar questions
Problem: UMLThis exercise is for a simplified supermarket cash register system. The normal procedure for using the cash register is as follows:• A customer arrives at the checkout with items to pay.• The cashier records the identification number of each item, as well as the quantity if it is greater than one.• The checkout displays the price of each item and its description.• When all purchases are recorded, the cashier signals the end of the sale.• The cash register displays the total purchases.• The customer chooses his method of payment:✓ cash: the cashier collects the money received; the cashier indicates the currency to be returned to the customer;✓ check: the cashier checks the creditworthiness of the customer by transmitting a request to an authorization center via the cashier;✓ credit card: a bank terminal is part of the cash register. It transmits an authorization request to an authorization center according to the type of card.• The cash register registers the sale and prints…
Problem: UMLThis exercise is for a simplified supermarket cash register system. The normal procedure for using the cash register is as follows:• A customer arrives at the checkout with items to pay.• The cashier records the identification number of each item, as well as the quantity if it is greater than one.• The checkout displays the price of each item and its description.• When all purchases are recorded, the cashier signals the end of the sale.• The cash register displays the total purchases.• The customer chooses his method of payment:✓ cash: the cashier collects the money received; the cashier indicates the currency to be returned to the customer;✓ check: the cashier checks the creditworthiness of the customer by transmitting a request to an authorization center via the cashier;✓ credit card: a bank terminal is part of the cash register. It transmits an authorization request to an authorization center according to the type of card.• The cash register registers the sale and prints…
Problem: UMLThis exercise is for a simplified supermarket cash register system. The normal procedure for using the cash register is as follows:• A customer arrives at the checkout with items to pay.• The cashier records the identification number of each item, as well as the quantity if it is greater than one.• The checkout displays the price of each item and its description.• When all purchases are recorded, the cashier signals the end of the sale.• The cash register displays the total purchases.• The customer chooses his method of payment:✓ cash: the cashier collects the money received; the cashier indicates the currency to be returned to the customer;✓ check: the cashier checks the creditworthiness of the customer by transmitting a request to an authorization center via the cashier;✓ credit card: a bank terminal is part of the cash register. It transmits an authorization request to an authorization center according to the type of card.• The cash register registers the sale and prints…
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr