编译.so .a的结果

ocs52:/home2/billing/panpan/C++>ls
hello  hello.cpp  hello.h  hello.o  libhello.a  libhello.so  libwpp.a  main.cpp  main.o
ocs52:/home2/billing/panpan/C++>nm hello.o
                 U __cxa_atexit
                 U __dso_handle
000000000000003e t _GLOBAL__I__Z5helloPKc
                 U __gxx_personality_v0
0000000000000054 t __tcf_0
0000000000000000 t _Z41__static_initialization_and_destruction_0ii
000000000000006c T _Z5helloPKc
                 U _ZNSolsEPFRSoS_E
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
                 U _ZSt4cout
                 U _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
0000000000000000 b _ZSt8__ioinit
                 U _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
ocs52:/home2/billing/panpan/C++>nm libhello.a

hello.o:
                 U __cxa_atexit
                 U __dso_handle
000000000000003e t _GLOBAL__I__Z5helloPKc
                 U __gxx_personality_v0
0000000000000054 t __tcf_0
0000000000000000 t _Z41__static_initialization_and_destruction_0ii
000000000000006c T _Z5helloPKc
                 U _ZNSolsEPFRSoS_E
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
                 U _ZSt4cout
                 U _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
0000000000000000 b _ZSt8__ioinit
                 U _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
ocs52:/home2/billing/panpan/C++>ldd libhello.so
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002ab3dc282000)
        libm.so.6 => /lib64/libm.so.6 (0x00002ab3dc480000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002ab3dc5d5000)
        libc.so.6 => /lib64/libc.so.6 (0x00002ab3dc6e3000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
ocs52:/home2/billing/panpan/C++>nm libwpp.a

hello.o:
                 U __cxa_atexit
                 U __dso_handle
000000000000003e t _GLOBAL__I__Z5helloPKc
                 U __gxx_personality_v0
0000000000000054 t __tcf_0
0000000000000000 t _Z41__static_initialization_and_destruction_0ii
000000000000006c T _Z5helloPKc
                 U _ZNSolsEPFRSoS_E
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
                 U _ZSt4cout
                 U _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
0000000000000000 b _ZSt8__ioinit
                 U _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc

main.o:
                 U __gxx_personality_v0
0000000000000000 T main
                 U _Z5helloPKc
ocs52:/home2/billing/panpan/C++>ldd hello
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b6c9bd03000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b6c9bf01000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b6c9c056000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b6c9c164000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b6c9bbe7000)
ocs52:/home2/billing/panpan/C++>

原文链接: https://www.cnblogs.com/angelpan1014/archive/2012/10/25/2738817.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    编译.so .a的结果

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/66993

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月9日 下午12:38
下一篇 2023年2月9日 下午12:38

相关推荐