Android编译32或64位程序
★★★ 個人博客導讀首頁—點擊此處 ★★★
1、查看一個程序是32位還是64位:
$ readelf -h tee-supplicant
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2’s complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: AArch64
Version: 0x1
Entry point address: 0x182c
Start of program headers: 64 (bytes into file)
Start of section headers: 26208 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 9
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 26
2、如何編譯32、64位程序
在Android.mk中加入如下語句,即可指定編譯。
LOCAL_MULTILIB := both
LOCAL_MULTILIB := 32
LOCAL_MULTILIB := 64
總結
以上是生活随笔為你收集整理的Android编译32或64位程序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Sphinx文档的展示-个人学习笔记
- 下一篇: system.img格式打包学习