问题
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