Issue
I have a .so file provided by a third-party vendor that is to be included in my Android application. I do not have access to the source code nor can I (easily) contact the vendor.
Is there a way for me to figure out by examining the .so file whether or not it was compiled targeting the armeabi or armeabi-v7a ABI?
I'm asking for two reasons. First, I prefer for it to have been compiled targeting the armeabi-v7a ABI to get the improved performance compared to armeabi; knowing this will give me confidence that I'm getting the best possible performance. Also, I would like to name the directory in which the .so files live appropriately (i.e. name the folder "armeabi" or "armeabi-v7a" corresponding to the ABI that it was compiled targeting).
Solution
I ended up disassembling the .so files using the arm-linux-androideabi-objdump
program from the Android NDK. In the disassembled code I found the vmaxnm.f32
instruction, which is present in the armeabi-v7a instruction set but not in armeabi. Based on that I concluded that the .so was compiled targeting armeabi-v7a. There are probably other instructions that I could have looked for but I'm not at all familiar with the ARM instruction set to be able to tell. I got lucky that this one was fairly obvious (being that it is a floating point operation, one of the major differences between armeabi and armeabi-v7a). Thanks for the ideas to those who posted.
Answered By - denversc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.