7.13

    A.

    libm.a path

    1. whereis libm.a

    output:

    1. libm: /usr/lib64/libm.a /usr/lib64/libm.so

    libm.a files

    1. ar t /usr/lib64/libm.a

    output:

    1. s_lib_version.o
    2. s_matherr.o
    3. s_signgam.o
    4. fclrexcpt.o
    5. fgetexcptflg.o
    6. fraiseexcpt.o
    7. fsetexcptflg.o
    8. ftestexcept.o
    9. fegetround.o
    10. fesetround.o
    11. fegetenv.o
    12. feholdexcpt.o
    13. fesetenv.o
    14. feupdateenv.o
    15. t_exp.o
    16. fedisblxcpt.o
    17. feenablxcpt.o
    18. fegetexcept.o
    19. powl_helper.o
    20. e_acos.o
    21. e_acosh.o
    22. e_asin.o
    23. e_atan2.o
    24. e_atanh.o
    25. ....

    similar way for libc.a

    B.

    compile code with -Og and -Og -g

    1. !INCLUDE "./code/7.13/little.c"
    1. (cd chapter7/code/7.13; make && make dump-exe-code)
    2. # objdump -d og-little
    3. # objdump -d dog-little

    they are same

    C.

    1. ldd og-little

    output:

    1. linux-vdso.so.1 (0x00007ffef51d3000)
    2. libc.so.6 => /lib64/libc.so.6 (0x00007f27c6b8b000)
    3. /lib64/ld-linux-x86-64.so.2 (0x00007f27c6f24000)