问题描述
我正在尝试使用ARM工具链来编译.so文件.但是,我不断收到此错误-
I'm trying to compile a .so file using an ARM toolchain. However I keep getting this error-
我不能更改工具链中的任何内容,因为我必须使用给定的工具.我以前从未见过此错误.
I can't change anything in the tool chain as I have to use the one given. I've never seen this error before.
我使用了此编译器标志-
-Wl,--no-warn-mismatch
但是不得不将其取出,因为它破坏了许多其他东西.
I used this compiler flag -
-Wl,--no-warn-mismatch
But had to take it out as it broke a lot of other stuff.
我正在使用的编译器标志是:-fPIC -O2 -marm -march=armv7-a
The compiler flags I'm using are:-fPIC -O2 -marm -march=armv7-a
推荐答案
使用as -meabi=5
Use as -meabi=5
我不会说我完全理解它... :-),但是它解决了问题.
I'm not going to claim I fully understand it... :-) but it solved the problem.
我试图做的事情失败了:
What I was trying to do that failed:
- 与GNU AS一起组装,该GNU AS是从master编译的,配置为
--target arm-elf
,位于4de5434b694fc260d02610e8e7fec21b2923600a - 与Ubuntu 16.04
arm-linux-gnueabihf-gcc
版本5.3.1链接
- assemble with GNU AS compiled from master at 4de5434b694fc260d02610e8e7fec21b2923600a configured with
--target arm-elf
- link with Ubuntu 16.04
arm-linux-gnueabihf-gcc
version 5.3.1
我认为EABI规范中提到了该值,并附有其他说明 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf
I think that the value is mentioned in the EABI specs say something along about it http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf
这掩盖了一个8位版本号,即该版本号所对应的ABI版本ELF文件符合.该ABI是版本5.值为0表示未知一致性.
This masks an 8-bit version number, the version of the ABI to which thisELF file conforms. This ABI is version 5. A value of 0 denotes unknownconformance.
尽管我不知道为什么完全弹出0.
although I don't know why exactly 0 popped up at all.
这篇关于源和目标具有不同的EABI版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!