FAQ Database Discussion Community


How can I differentiate static functions with nm or readelf output in C

c,static,nm,symbol-table
I am trying to process the output of a nm or readelf -s on an executable. However, I am having trouble differentiating static functions from each other in the output. Here is what I am working with: test.c static int foo() { int x = 6; } main() {} other.c...

Static member of template base class doesn't get exported to shared library

c++,shared-libraries,ubuntu-14.04,nm,template-classes
I have a class 'ModelManager' which is derived from a template class 'TModelManager'. Their declaration is as follows: template<class TModel,class TModelMesh,class TModelSubMesh> class TModelManager { protected: static std::map<std::string,ModelHandle> m_models; static std::vector<std::map<std::string,ModelHandle>::iterator> m_marked; [...] }; class DLLNETWORK ModelManager : public TModelManager<Model,ModelMesh,ModelSubMesh> { [...] }; There are two shared libraries, "shared" and...

What all local variables goto Data/BSS segment?

c++,c,nm
The man page of nm here: MAN NM says that The symbol type. At least the following types are used; others are, as well, depending on the object file format. If lowercase, the symbol is usually local; if uppercase, the symbol is global (external) And underneath it has "b" and...

nm versus gdb break

gdb,virtual-address-space,nm
I am working on Ubuntu 14.04 LTS. I have an executable file exec compiled from file.c. The file.c makes use of functions from a static library. For example, let's says that fubar() is a function of the static library that is used in file.c. This is something that I have...