building ltrace for android

只谈情不闲聊 提交于 2019-12-08 04:02:31

问题


I'm trying to build ltrace for android. I've tryed a few ways none worked....

I was able to produce a bin file compiling the source code using crosstool-ng's arm-unknown-linux-gnueabi and

./configure -host=arm-linux-gnueabi -target arm-linux-gnueabi CC=/path/to/toolchain/bin/arm-unknown-linux-gnueabi-gcc -prefix=/path/to/destination/folder

but when i tried to execute that bin on android i get:

./ltrace: not found

Any ideas?


回答1:


Looks like executable bit is not set? You can check by doing ls -l ltrace and if needed, set it with chmod a+x ltrace.




回答2:


Your probably have the wrong path to the dynamic linker inside the ltrace binary. On android the linker lives in /system/bin/linker. By default the path will be /bin/ld-linux.so. The way to go is to either port ltrace to work with the Android NDK, build some sample code with Android NDK and figure out all the build flags, link statically, or just find a working pre-built ltrace. I am in the process of solving this problem right now, will post when I have results.



来源:https://stackoverflow.com/questions/15957874/building-ltrace-for-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!