nm --dynamic
should be the option you look for, since it displays the symbols you can link against (from a shared library). readelf --dyn-syms
should display the same information (different output).
When using nm
, check for symbols that have the "T"
attribute. From the man page:
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). There are however a few lowercase symbols that are shown
for special global symbols ("u", "v" and "w").
[...]
"T"
"t" The symbol is in the text (code) section.
If you want to be 100% sure, you can always write a test program that links against your shared library and attempts to use one of the ST_LIB_
symbols.