I compiled an open source library and it turned out that there are unresolved symbols within the generated shared library (.so). The natural next step seemed to me finding out which object has the unresolved symbols, but I could not apply nm or objdump to the intermediate libtool object files (.lo). Is there any way I can take a look at the list of symbols within .lo files?

有帮助吗?

解决方案

You need to run nm or objdump on the object files (.o files), not the .lo files. The .lo files are used by libtool and are text files that can tell you where your object files really are:

# Name of the PIC object.
pic_object='.libs/libfoo_la-foo.o'

# Name of the non-PIC object
non_pic_object='libfoo_la-foo.o'

Since you need to know about a DSO (the .so file), the pic_object files are probably the ones you want to examine.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top