Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092997
Author: Bryant
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
ok thank you, how would I use the code from the follow up to make a makfile, is it possible to do with just 1 file ? The makefile follows these directives:  The makefile directives will have a target for each .c that will create the object file, a target to create the executable (binary) file using the object files created by the object targets and a target called clean to remove all object files.
What is the purpose of version control in object serialization, and how can it prevent compatibility issues?
Discuss the role of versioning in object serialization. How can you handle versioning issues when deserializing objects that have evolved over time?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr