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…
Description Develop a C program that computes the different roots in a quadratic equation, ax + bX?=0. r= -b ± v (b? – 4ac) , rl is the root when the + is used in the equation and r2 is the root when 2a the – is used. The roots r1 and r2 can only be computed when the discriminant (b - 4ac) is greater than the zero else the quadratic equation does not have any roots and therefore the program should display "no roots". NOTE: sąrt is a built in function in C to extract the roots. The program will prompt to input the values of a, b and c and output the roots r1 and r2 or no roots at all. Check your answer manually. Sample Output if Applicable CT 0:Ruel Lauron\C_Programs\QUAD.exe Enter the value of a:1 Enter the value of b:-3 Enter the value of c:-10 The value of x1 is 5.00 The value of x2 is -2.00
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education