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
Expert Solution & Answer
Book Icon
Chapter 7, Problem 7.13HW

A.

Explanation of Solution

Object files in the versions in “libc.a” and “libm.a”:

For “libm.a”:

  • The “libm.a” means “C” math library.
  • First user needs to find the “libm.a” path using below command:

Command: whereis libm.a

  • After entering the above command, the following output will be displayed.

libm: /usr/lib/libm.so /usr/lib64/libm.so

  • Now find the number of object files in “libm.a” using

ar t /usr/lib64/libm...

B.

Explanation of Solution

Difference between executable code in “gcc -Og –g” and “gcc -Og”:

When compiling code with “gcc -Og –g” and “gcc -Og”, the result will be same.

Example:

The example for compiling code with “gcc -Og –g” and “gcc -Og” is shown below:

sample...

C.

Explanation of Solution

Shared libraries in the GCC driver on given system:

  • Object files that are dynamically loaded and linked into an application.
    • That is either in load time or run time.
    • It is also called as dynamic link libraries (DLL) that is format of “.so” files.
  • Dynamic linking can happen when executable is first loaded and run.
    • The libraries are controlled automatically by the dynamic linker in Linux that is using “ld-linux.so”.
    • In general, the standard “C” library are dynamically linked by using “libc.so”.

Example:

The example for shared libraries in the GCC driver on given system is shown below:

Sample...

Blurred answer
Students have asked these similar questions
If you have experience with a language like C, C++, or Rust, in which dynamically allocated space must be manually reclaimed, describe your experience with dangling references or memory leaks. How often do these bugs arise? How do you find them? How much effort does it take? Learn about open-source or commercial tools for finding storage bugs (Valgrind is a popular open-source example). Do such tools weaken the argument for automatic garbage collection?
Describe the concept of versioning in object serialization. How can you handle changes to serialized objects over time?
Describe the concept of versioning in object serialization. How can you handle backward and forward compatibility of serialized objects in a system?
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