NDK分析显示"。所以没有符号" [英] NDK profiling showing ".so has no symbols"
问题描述
我做NDK分析了使用Android的NDK廓-3.1我的项目。我在Android.mk中所做的更改如下...
I am doing NDK profiling for my project using android-ndk-profiler-3.1. I have made changes in Android.mk as follows...
LOCAL_PATH := $(call my-dir)
-include android-ndk-profiler.mk
include $(CLEAR_VARS)
# Module name -------------------------------------------------------
LOCAL_CFLAGS += -O3
TARGET_ARCH_ABI :=armeabi
LOCAL_CFLAGS := -pg
LOCAL_STATIC_LIBRARIES := andprof
LOCAL_LDLIBS += -llog
LOCAL_MODULE := libitv
include $(BUILD_SHARED_LIBRARY)
Application.mk如下:......
Application.mk is as follows...
APP_ABI := armeabi
APP_PLATFORM := android-10
我呼吁monstartup(itv.so);在本地code和moncleanup的开始()函数;功能的停止方法。而且是gmon.out文件被创建successfully.And以后,我贴在是gmon.out
D:\\android\\android-ndk-r6-windows\\android-ndk-r6\\toolchains\\arm-linux-androideabi-4.4.3\\$p$pbuilt\\windows\\bin 。目录
I have called monstartup("itv.so"); function in the beginning of the native code and moncleanup(); function in the stop method. And gmon.out file is created successfully.And then I have pasted gmon.out in D:\android\android-ndk-r6-windows\android-ndk-r6\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin directory.
但是,当我想读是gmon.out使用下面的命令......
But when I am trying to read gmon.out using the following command...
D:\android\android-ndk-r6-windows\android-ndk-r6\toolchains\arm-linux-androideab
i-4.4.3\prebuilt\windows\bin>arm-linux-androideabi-gprof D:\InternetTV_FD_Canvas
\libs\armeabi\libitv.so > out.txt
这是错误...显示
arm-linux-androideabi-gprof: file `D:\InternetTV_FD_Canvas\libs\armeabi\libitv.so'
has no symbols
我不能够做出来的,为什么这个错误来了连我都做了一切正常。
任何人都可以请帮助我。
Can anybody please help me.
任何帮助将AP preciated。
Any help will be appreciated.
先谢谢了。
推荐答案
NDK的构建过程将创建2库,其中一个符号,一个没有剥离。您安装的剥离,符号库少你的APK,但你需要使用剥开版本使用gprof。如果你运行:
The NDK build process creates 2 libraries, one with symbols and one stripped without. You install the stripped, symbol-less library in your APK, but you need to use the unstripped version with gprof. If you run:
arm-linux-androideabi-gprof D:\InternetTV_FD_Canvas\obj\local\armeabi\libitv.so
...那么,应该是正确的库。
... then that should be the correct library.
这篇关于NDK分析显示"。所以没有符号"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!