android如何编译出带符号表的.so库

  • Post author:
  • Post category:其他


android如何编译出带符号表的.so库

关于这个问题,其实编译器带-g就会有调试信息。这是gcc相关的。

默认其实android编译的就是带符号表的,只是在strip掉了。

例如下面的操作:

/$ find . | grep libext2_e2p.so

./obj/SHARED_LIBRARIES/libext2_e2p_intermediates/LINKED/libext2_e2p.so

./obj/lib/libext2_e2p.so

./symbols/system/lib64/libext2_e2p.so

./symbols/system/lib/libext2_e2p.so

./obj_arm/SHARED_LIBRARIES/libext2_e2p_intermediates/LINKED/libext2_e2p.so

./obj_arm/lib/libext2_e2p.so

./system/lib64/libext2_e2p.so

./system/lib/libext2_e2p.so

/$ ls -l ./obj/SHARED_LIBRARIES/libext2_e2p_intermediates/LINKED/libext2_e2p.so

-rwxrwxr-x 1 neil neil 109808 12月 19 21:20 ./obj/SHARED_LIBRARIES/libext2_e2p_intermediates/LINKED/libext2_e2p.so

/$ ls -l ./obj/lib/libext2_e2p.so

-rwxrwxr-x 1 neil neil 31448 12月 19 21:25 ./obj/lib/libext2_e2p.so

/$ ls -l ./symbols/system/lib64/libext2_e2p.so

-rwxrwxr-x 1 neil neil 109808 12月 19 21:24 ./symbols/system/lib64/libext2_e2p.so

/$ ls -l ./symbols/system/lib/libext2_e2p.so

-rwxrwxr-x 1 neil neil 86172 12月 19 21:20 ./symbols/system/lib/libext2_e2p.so

/$ ls -l ./system/lib64/libext2_e2p.so

-rwxrwxr-x 1 neil neil 31448 12月 19 21:27 ./system/lib64/libext2_e2p.so

/$ ls