我试图打造为GT-I9300 objdump的可执行文件。的Android NDK建立独立的工具链ARM
我得到当我试图使用的是Android NDK 在亚行外壳采用SU提供一个以下错误:
[email protected]:/data/local/tmp # ./arm-linux-androideabi-objdump
sh: ./arm-linux-androideabi-objdump: not executable: magic 7F45
根据this blog post的错误是由于不同的架构抛出该文件和设备。所以,我需要得到一个版本objdump的为我设备:
[email protected]:/ $ uname -a
Linux localhost 3.0.64-CM #1 SMP PREEMPT Fri May 9 09:17:55 CEST 2014 armv7l GNU/Linux
到目前为止,我通过编译它放在我的的Ubuntu通过以下方式得到了arm-linux-androideabi-objdump 12.10
[email protected]:~$ uname -a
Linux ubuntu1210 3.11.0-20-generiC#35~precise1-Ubuntu SMP Fri May 2 21:32:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
我编译独立工具链,我用ARM作为CPU:
[email protected]:~/Programs/android-ndk-r9d$ ./build/tools/make-standalone-toolchain.sh --platform=android-19 --install-dir=/home/someuser/my-android-toolchain --verbose
Auto-config: --arch=arm
Auto-config: --toolchain=arm-linux-androideabi-4.6
Targetting CPU: arm
Using GCC version: 4.6
Copying prebuilt binaries...
## COMMAND: copy_directory ./toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64 /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6
Copying directory:
from ./toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6
Copying directory:
from ./prebuilt/linux-x86_64/include/python2.7
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/python2.7
Copying directory:
from ./prebuilt/linux-x86_64/lib/python2.7
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/lib/python2.7
Copying file: python python2 python2.7
from ./prebuilt/linux-x86_64/bin
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/bin
Copying sysroot headers and libraries...
## COMMAND: copy_directory_nolinks ./platforms/android-19/arch-arm/usr/include /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/sysroot/usr/include
Copying directory (without symlinks):
from ./platforms/android-19/arch-arm/usr/include
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/sysroot/usr/include
## COMMAND: copy_directory_nolinks ./platforms/android-19/arch-arm/usr/lib /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/sysroot/usr/lib
Copying directory (without symlinks):
from ./platforms/android-19/arch-arm/usr/lib
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/sysroot/usr/lib
Copying libstdc++ headers and libraries...
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/include
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi//bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi//thumb/bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib//thumb
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib//thumb
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi/armv7-a/bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi/armv7-a/thumb/bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/thumb
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/thumb
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi/armv7-a/hard/bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/.
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/hard
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/.
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/hard
Copying directory:
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/include/bits
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/include/c++/4.6/arm-linux-androideabi/armv7-a/thumb/hard/bits
Copying file: libgnustl_shared.so
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/thumb/hard
Copying file: libsupc++.a
from ./sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a-hard/thumb
to /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6/arm-linux-androideabi/lib/armv7-a/thumb/hard
Copying files to: /home/someuser/my-android-toolchain
## COMMAND: copy_directory /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6 /home/someuser/my-android-toolchain
Copying directory:
from /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6
to /home/someuser/my-android-toolchain
Cleaning up...
## COMMAND: rm -rf /tmp/ndk-someuser/tmp/build-3493/standalone/arm-linux-androideabi-4.6
Done.
[email protected]:~/Programs/android-ndk-r9d$ cd /home/someuser/my-android-toolchain/
[email protected]:~/my-android-toolchain$ cd bin/
[email protected]:~/my-android-toolchain/bin$ file arm-linux-androideabi-objdump
arm-linux-androideabi-objdump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
[email protected]:~/my-android-toolchain/bin$
我得到的格式[R编译:
[email protected]:~/my-android-toolchain/bin$ file arm-linux-androideabi-objdump
arm-linux-androideabi-objdump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
我的问题是:为什么不想要的格式产生的汇编arm-linux-androideabi-objdump,这样我可以从设备亚行外壳执行呢?