Tsur Herman
Tsur Herman

Reputation: 101

Why a shared library found in obj/local/armeabi is bigger in size than its version in libs/armeabi?

I am building a native part of an application using ndk in eclipse in a bare project. I later copy the resulting libmylib.so in libs/armeabi/ to another project where it is used.

I noticed that the library size in obj/local/armeabi/ , which is the local build output path, is about 4x bigger than the library in libs/armeabi/ .

to be more precise:

libmylib.so is about 4mb in size in obj/local/armeabi/ and it depends on a 6mb static lib and on stl-port and it all boils down to 1.5mb in libs/armeabi/ ... I am worried.

Is it safe for me to just copy the libs/ folder to the other project? can I trust that my code run as expected?

In a different place and on a different platform the code runs perfectly well.

Upvotes: 2

Views: 1246

Answers (1)

Tsur Herman
Tsur Herman

Reputation: 101

Found the answer It was, as MichaeBurr suggested in his comment,due to the fact that the 'official' version of the lib does not contain any symbols, while the local build version containes all symbols.

One can use nm to list symbols in library to validate that.

Upvotes: 1

Related Questions