armeabi 和 armeabi-v7a 的区别 [英] Difference between armeabi and armeabi-v7a

查看:31
本文介绍了armeabi 和 armeabi-v7a 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,Android NDK 中两种支持的 ARM 架构风格之间的区别仅在于支持的 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 位不应该既不执行系统调用也不执行 Java 调用,除非通过我自己的基于 C 的接口.

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 for ARM 编译,链接并在 ARMv7a 模拟器下运行.

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

推荐答案

你绝对可以在v7上运行armeabi共享库,你可以从另一个模块调用它的导出函数.所以,为了安全起见,我会从你的 Pascal 代码中创建一个单独的 .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

这篇关于armeabi 和 armeabi-v7a 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆