Use nm command.

Dynamic library

nm -D --defined-only mylib.so

Static library

nm mylib.a

List file in a static library

ar -t mylib.a