How Can I List Exported Symbols from a Shared Library (.so File)?
Dec 27, 2024 am 05:48 AMListing Symbols in a Shared Library (.so File)
To list the symbols exported from a shared library, a number of tools can be used.
nm
The nm utility lists symbols from object files and libraries. To list the symbols in a .so file using nm, use the following command:
nm -gD yourLib.so
objdump
If your .so file is in ELF format, you can use objdump to list its symbols. The -TC option can be used to display symbols and their types:
objdump -TC libz.so
readelf
Another option for listing ELF symbols is readelf. The -Ws option provides information about the symbol table:
readelf -Ws libz.so
Additional Options
- -C: Demangles C symbols, making them more readable.
- -g: Includes local as well as exported symbols.
- -D: Lists only defined symbols.
The above is the detailed content of How Can I List Exported Symbols from a Shared Library (.so File)?. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What are the types of values returned by c language functions? What determines the return value?

What are the definitions and calling rules of c language functions and what are the

C language function format letter case conversion steps

Where is the return value of the c language function stored in memory?

How do I use algorithms from the STL (sort, find, transform, etc.) efficiently?

How does the C Standard Template Library (STL) work?
