I am using the latest version of NDK android-ndk-r8b
I have some files that were created using the Android compiler from NDK. i686-android-linux-gcc
And now I want to profile these files.
I tried rebuilding it with the -pg option, but I got an error message:
/tmp/ccixJFcx.o: In function `main': test1.C:(.text+0x17): undefined reference to `mcount' collect2: ld returned 1 exit status
I want to try using i686-android-linux-gprof , but without successfully compiling with the -pg option -pg I cannot do this.
For example, let the sources of test1.C be:
int main() { return 0; }
I can compile the file using standard gcc using the following options:
-g -O2 -m32 -Wa,--32 -Wl,-melf_i386 -pg And use this file with i686-android-linux-gprof
But I can not use the pg key with i686-android-linux-gcc , does anyone know why? And how can I use it, maybe I should use some additional libraries / compilation options during the NDK recovery process?
source share