Source and target have different EABI versions

老子叫甜甜 提交于 2019-12-22 16:37:25

问题


I'm trying to compile a .so file using an ARM toolchain. However I keep getting this error-

error: Source object has EABI version 0, but target has EABI version 5

I can't change anything in the tool chain as I have to use the one given. I've never seen this error before.

I used this compiler flag -
-Wl,--no-warn-mismatch
But had to take it out as it broke a lot of other stuff.

The compiler flags I'm using are:
-fPIC -O2 -marm -march=armv7-a


回答1:


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:

  • 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

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

Table 4-2, ARM-specific e_flags

This masks an 8-bit version number, the version of the ABI to which this ELF file conforms. This ABI is version 5. A value of 0 denotes unknown conformance.

although I don't know why exactly 0 popped up at all.



来源:https://stackoverflow.com/questions/35174275/source-and-target-have-different-eabi-versions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!