armeabi和armeabi-V7A的区别区别、armeabi、V7A

2023-09-06 13:19:13 作者:丅①站→莪

据我可以告诉从文档,ARM架构的Andr​​oid的NDK的两个支持的口味之间的差别只在一组支持的CPU指令。这真的是这样吗?是否有调用约定没有什么区别,或者系统调用序列,还是其他什么东西?

As far as I can tell from the docs, the difference between the two supported flavors of ARM architecture in Android NDK is only in the set of supported CPU instructions. Is that really so? Is there no difference in calling conventions, or system call sequence, or something else?

我想知道如果我编译模块的ARM目标文件(编译器比NDK等 - 的Free Pascal专)会发生什么,指定的ARMv6的结构,然后将其链接到两个armeabi和armeabi,V7A共享库。该FPC位不应该既不执行系统调用,也只是通过我自己的C型接口的Java调用。

I'm wondering what will happen if I compile a module to an ARM object file (with a compiler other than NDK - Free Pascal specifically), specifying ARMv6 as the architecture, and then link it to both armeabi and armeabi-v7a shared libraries. The FPC bits are not supposed to perform neither system calls nor Java calls, except via my own C-based interface.

编辑:一个Hello World库,与FPC为ARM编译,链接和运行下ARMv7a模拟器

a hello world library, compiled with FPC for ARM, links and runs under ARMv7a emulator.

推荐答案

您绝对可以运行在V7 armeabi共享库,你可以从其他模块调用它的导出函数。所以,为了安全起见,我将创建一个从你的Pascal code单独的.so 文件,坚持armeabi(也许有一些C / C ++包装) ,并使用此共享库与你的armeabi和armeabi-V7A库。加载一切都在正确的顺序,最简单的方法是使用

You definitely can run armeabi shared library on v7, and you can call its exported functions from another module. So, to be on the safe side, I would create a separate .so file from you Pascal code, sticking to armeabi (maybe with some C/C++ wrappers), and use this shared library with both your armeabi and armeabi-v7a libraries. The easiest way to load everything in correct order is to use

System.loadLibrary("pascal"); // armeabi
System.loadLibrary("c++"); // the platform will choose armeabi or armeabi-v7a