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
expand_more
expand_more
format_list_bulleted
Question
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.
- This section is used to read only the data in the format such as
- “.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.
- This section contains a list of locations in the “.text” section.
- “.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.
- It is a mapping between line numbers in the given program
- “.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.
- It is a string table.
Expert Solution & Answer
Trending nowThis is a popular solution!
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
Chapter 7 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 7.5 - Prob. 7.1PPCh. 7.6 - Practice Problem 7.2 (solution page 718) In this...Ch. 7.6 - Practice Problem 7.3 (solution page 718) Let a and...Ch. 7.7 - Prob. 7.4PPCh. 7.7 - Prob. 7.5PPCh. 7 - This problem concerns the m. o module from Figure...Ch. 7 - Without changing any variable names, modify bar5.c...Ch. 7 - Prob. 7.8HWCh. 7 - Consider the following program, which consists of...Ch. 7 - Let a and b denote object modules or static...
Knowledge Booster
Similar questions
- In C language please; Requirements: You must use the correct program and function descriptions. You must use a user defined function for the sequential search and it must use pointers to keep track of the number of successful searches as well as how many test comparisons were made. You must use the srand() function and offset and range correctly.arrow_forwardPLEASE USE C LANGUAGE The objective is to be able to implement a graph data structure and graph traversals. 1. Make a code for a program that follows the details in the PROGRAM SPECIFICATION section.2. Develop a program following the structured programming approach at the very least. No global variable declarations are allowed. The program specifications are as follows:Write a program that performs depth first search/traversal and breadth first search/traversal on predefined graphs.(see the attached pictures for predefined graphs) The graph search program will have the following main menu: Graph Traversal Program [1] Perform DFS Traversal [2] Perform BFS Traversal [3] Search Item using DFS [4] Search Item using BFS [0] Exit Enter choice: Details of the menu items are as follows: Perform DFS Traversal Once selected, the user is asked which graph to traverse. The program then performs depth-first search traversal and prints out the nodes in the order they are visited. Perform…arrow_forwardThe memory diagram contains (i) and several pointers. Write a code to declare i, x, y, z and w with the correct types and set their values so they align with the diagram.arrow_forward
- Data Structure Using C++ (Queue) We can use a queue to simulate the flow of customers through a check-out line in a store. In this simulation we will have the following details: one check-out line the expected service time for each customer is one minute (However, they may have to wait in line before being serviced) between zero and two customers join the line every minute We can simulate the flow of customers through the line during a time period n minutes long using the following algorithm: Initialize the queue to empty. for ( minute = 0 ; minute < n ; ++minute ) { if the queue is not empty, then remove the customer at the front of the queue. Compute a random number k between 0 and 3. If k is 1, then add one customer to the line. If k is 2, then add two customers to the line. Otherwise (if k is 0 or 3), do not add any customers to the line. } In addition, the algorithm will keep track of the following: the total number of customers served the…arrow_forwardDesign and write a C program that performs the following functionality:1. Prompt the user to enter a vector of maximum 10 digits. Note: the vector entered cancontain spaces.2. Read and store the vector that can contain spaces.3. Use a recursive function to transpose the vector from a row vector to a column vector.4. For example, if the user is prompted and enters the following in the command line(italicized and in red):Enter a vector of maximum 10 digits between 0 and 9: 1 2 3 4 55. Write a recursive function that will produce the following output (in blue):123456. Write and compile your codearrow_forwardProblem B. Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…arrow_forward
- PROBLEM Create a C++ program that will perform record management of students. The code must involve implementation of control structures / array / struct / user-defined functions / class. INSTRUCTION: Create a User’s Menu for your program. An example is given below: Record Management [1] Add Record [2] Display Record Input your Choice: _ 2. If 1 is chosen, the user will be allowed to create 2 unique student records using the ADD_RECORD user-defined function. 3. After creating 2 records, the user may choose 2 to display existing and non-existing records. Use DISPLAY_RECORD user-defined function. 4. Perform the following 4 Test Cases below.arrow_forwardPROBLEM Create a C++ program that will perform record management of students. The code must involve implementation of control structures / array / struct / user-defined functions / class. INSTRUCTION: Create a User’s Menu for your program. An example is given below: Record Management [1] Add Record [2] Display Record Input your Choice: _ 2. If 1 is chosen, the user will be allowed to create 2 unique student records using the ADD_RECORD user-defined function. 3. After creating 2 records, the user may choose 2 to display existing and non-existing records. Use DISPLAY_RECORD user-defined function. 4. Perform the following 4 Test Cases below. 5. Submit the following through our Summative Assessment submission link on our Course Site on or before the deadline: a. C++ Code (.cpp) file…arrow_forwardPROBLEM: Create a C++ program with pseudocode that will perform record management of students. The code must involve implementation of control structures / array / struct / user-defined functions / class. SPECIFICATIONS: User must create first 3 unique student records using ADD_RECORD function. After creating 3 records, the user must be allowed to perform the following activities. Add student record Edit existing student record - EDIT_RECORD function Delete existing student record.- DELETE_RECORD function TEST CASES:ADD RECORDStudent No: 123456789Last Name: CruzFirst Name: PedroAge: 171 record/s added EDIT RECORD <existing record>Student No: 123456789Last Name: CruzFirst Name: PedroAge: 171 record/s updatedEDIT RECORD <non-existing record>Student No: 123456788record does not existDELETE RECORD <existing record>Student No: 123456789Last Name: CruzFirst Name: PedroAge: 171 record/s deletedDELETE RECORD <non-existing record>Student No: 123456788record does…arrow_forward
- (6) If L is context free, then LUL must be regular. True Falsearrow_forwardQ # 1. Note: write in c programming. Implement a Result Compilation System for CP Course. Program will take Marks of 3 Quizzes, 2 assignments, one midterm and one final term from the user as input. Marks of each quiz will be out of 15, marks of each assignment will be out of 40. Marks of Midterm will be out of 60 and Final term out of 80. Program will compute total marks in the subject according to the following grading scheme and display on the screen. 图 Category Weightage 1 Quizzes 25% 2 Assignments 15% 3 Mid-term 20% 4 Final-term 40% Total Marks 100arrow_forwardPROBLEM Create a C++ program that will perform record management of students. The code must involve implementation of control structures / array / struct / user-defined functions / class. INSTRUCTION: Create a User’s Menu for your program. An example is given below: Record Management [1] Add Record [2] Display Record Input your Choice: _ 2. If 1 is chosen, the user will be allowed to create 2 unique student records using the ADD_RECORD user-defined function. 3. After creating 2 records, the user may choose 2 to display existing and non-existing records. Use DISPLAY_RECORD user-defined function.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education