Is it possible for nm
to show the file that declares a symbol in a .so file? Let's say I have some file:
//file.cpp
int get_data();
int main(){
return 0;
}
If I compile this file into a shared object file, file.so
, I should get a "U" for the get_data
symbol when I use nm -C file.so
. Is it possible for nm to also show the file name? For larger projects it would be helpful to be able to determine what file is declaring the unresolved symbols.