I have a shared library file built using the Android NDK for ARM. There is also a little bit of JNI in there. This SO file is linked against many other .a files (our own static libraries we build as dependencies) as well as a few other third party static libraries, such as boost.
I am using GCC 4.8 and utilizing STL with C++11 features.
I have done some self research on this. In particular, I came across this thread:
why my C++ output executable is so big?
That helped me figure out a few commands to run such as size
:
$ size libmine.so
text data bss dec hex filename
13017993 201972 54120 13274085 ca8be5 libmine.so
Unfortunately though, other than the commands to run, the linked SO question didn't help me much on the diagnostic side (Or perhaps maybe I am just not experienced enough with linux-style development to use the information reliably). I am not sure how to analyze the results produced in such a way that it would help me pinpoint the areas of code, specific libraries, or template functions/classes/etc that are causing any growth.
The shared library itself is 13MB, which is pretty huge. I did verify that my .SO file is "stripped", which I guess means no debug symbols. At this point I'm not sure if this is due to boost or some crazy template instantiation. How can I determine what is contributing to the massive growth of my shared library?