Q: How to check if library is Debug or Release in Linux I want to check if compiled library is of DEBUG MODE or RELEASE MODE.
I found objdump --syms, but it seems not working. I tried objdump --syms *.a | grep debug objdump --syms *.a | grep release. But both print nothing.
How can I check a compile type of library in Linux?

A: Strictly speaking, there are no such notions as "debug" or "release" mode for libraries in linux. gcc can produce libraries with or without debugging symbols that can be used later by the gdb debugger, and with or without optimizations. The debugging symbols output is controlled by option -g passed to gcc when compiling any unit, the optimizations are controlled by flags -O1, -O2 and -O3 for different levels of optimization.
Assuming you want to find out whether or not the library contains debugging symbols, you have ran the right command for it: objdump --syms *.a | grep debug usually produces non-empty output for the objects that do contain debugging symbols. Filtering output by the "release" word will not give you any information about the compilation method of a library since there is no term "release".
Note, also, that many open-source libraries are distributed compiled with both debugging symbols and optimizations enabled, so there is some sort of mixing of what is considered to be "debug" and "release".
