源和目标具有不同的EABI版本 [英] Source and target have different EABI versions

查看:340
本文介绍了源和目标具有不同的EABI版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ARM工具链来编译.so文件.但是,我不断收到此错误-

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

错误:源对象的EABI版本为0,而目标的对象为EABI版本5

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.

我使用了此编译器标志-
-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

表4-2,特定于ARM的e_flags

Table 4-2, ARM-specific e_flags

这掩盖了一个8位版本号,即该版本号所对应的ABI版本 ELF文件符合.该ABI是版本5.值为0表示未知 一致性.

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.

尽管我不知道为什么完全弹出0.

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

这篇关于源和目标具有不同的EABI版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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