想在将一个开源库移植到android上,因为之前做过一个移植,是直接将编译出的可执行文件放到目录下,然后再调用exec执行的。这次也想那样做,可是报了上面这个错误。
通过,google,发现,上面错误的含义为:
Magic number 7F45 specifies the Executable and Linkable Format (ELF) file type, a format that is not executable on ARM processors.
Reason could be either improper cross compilation or either using wrong toolchain.
因此,我们要将gcc及target等换成 arm架构的。

本文探讨了在将开源库移植到Android平台时遇到的MagicNumber错误问题,详细解释了错误原因并提供了相应的解决方案,包括更换gcc及target以适应ARM架构。
5316





