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
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