我有一个使用 g++ 构建的共享对象文件,如下所示。
g++ -shared -fPIC -lpthread -O1 -std=c++11 -c AOTelemetry.cpp -L /home -I /opt/java7/include/ -I /opt/java7/include/linux/ -lstdc++ -ldl -lcsfutil -lcsfthread -ldata -lservices -lserviceutil -levent -lhealth -o AOTelemetry.so
nm 实用程序在对象文件上运行时将大量内存地址引用(我认为它们是)显示为零。这是什么意思?
0000000000000000 V typeinfo name for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>
0000000000000000 V vtable for ProcessJob
0000000000000000 V vtable for NativePlugin
0000000000000000 V vtable for AOTelemetryPlugin
0000000000000000 V vtable for Shutdown
0000000000000000 V vtable for BdtBuffer
U vtable for __cxxabiv1::__class_type_info
U vtable for __cxxabiv1::__si_class_type_info
0000000000000000 V vtable for std::_Sp_counted_ptr<ProcessJob*, (__gnu_cxx::_Lock_policy)2>
0000000000000000 V vtable for std::_Sp_counted_ptr<Shutdown*, (__gnu_cxx::_Lock_policy)2>
0000000000000000 V vtable for std::_Sp_counted_ptr<BdtBuffer*, (__gnu_cxx::_Lock_policy)2>
0000000000000000 V vtable for std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>
最佳答案
我建议阅读有关 nm
的手册页或唯一的教程/文档。
来自 this 教程:
关于c++ - 这个nm输出是什么意思?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25210629/