arm-linux-gnueabi-readelf工具解决问题

编译一个32位平台的内核时,出现如下错误提示:

libschw.a: could not read symbols: File format not recognized

于是进入相应的目录发现,libschw.a这个文件是存在的,但是为啥编译不过呢,同样的编译在另外一个64位平台却没有这个报错。

思路:是否与32位64位平台有关?

使用readelf来查看一下这个库,

$ arm-linux-gnueabi-readelf -h modules/aw_schw/libschw
File: modules/aw_schw/libschw(aw_schw_lib.o)
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: REL (Relocatable file)
Machine: <unknown>: 0xb7
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 161192 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 29
Section header string table index: 24

果然,这个库显示是64位的,为了兼容32位的,只能修改Makefile,判断到32位时,使用32位的库。

+ifeq ($(LICHEE_ARCH),arm64)
cp libschw libschw.a
+else
+ cp libschw32 libschw.a
+endif

重新弄一份新32位的libschw32库后,重新编译,问题解决。

could not read symbols: File format not recognized的更多相关文章

  1. “undefined JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析

    如果编译时,报如下所示错误:../../third-party/hadoop/lib/libhdfs.a(jni_helper.c.o): In function `getGlobalJNIEnv': ...

  2. “undefined reference to JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析

    "undefined reference to JNI_GetCreatedJavaVM"和"File format not recognized"错误原因分析 ...

  3. GCC 源码编译 mpc mprf gmp 不用make(否则会有lib/libgmp.so: could not read symbols: File in wrong format等错误)

    错误信息: lib/libgmp.so: could not read symbols: File in wrong formatcollect2: error: ld returned 1 exit ...

  4. JVM Specification 9th Edition (4) Chapter 4. The class File Format

    Chapter 4. The class File Format Table of Contents 4.1. The ClassFile Structure 4.2. Names 4.2.1. Bi ...

  5. The Portable Executable File Format from Top to Bottom(每个结构体都非常清楚)

    The Portable Executable File Format from Top to Bottom Randy KathMicrosoft Developer Network Technol ...

  6. Java class file format specfication

    Java class file format spec Link: https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html Her ...

  7. Does the OpenSceneGraph have a native file format?

    From OpenSceneGraph-3.0 onwards we have new native file formats based on generic serializers that ar ...

  8. VMWare File Format Learning && Use VHD File To Boot VMWare && CoreOS Docker Configuration And Running

    目录 . Virtual Machine Introduce . Vmware Image File Format . VHD File Format . Convert VHD File Into ...

  9. 配置tomcat连接器后,启动服务报错“No Certificate file specified or invalid file format"异常

    1:原来的配置是 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true&quo ...

随机推荐

  1. mbed学习之Digital IO (一)

    mbed的IO操作非常灵活,常见的关于Digital IO操作整理如下表 ,其中蓝色字体是构造函数,绿色字体的是操作符重载,使用时只要创建对象,就可以调用对应的方法来操作,并且每种都提供了操作符重载, ...

  2. 227 Entering Passive Mode (xxx,xxx,,xxx,xxx,x)

    登录ftp时显示227 Entering Passive Mode (xxx,xxx,,xxx,xxx,x) 因为FTP有两种工作模式,PORT方式和PASV方式,中文意思为主动式和被动式 ,详细介绍 ...

  3. GIT版本库回滚【图文版】

    git 版本库回滚,在实际开发过程中总会遇得到   1. 先找出需要回滚的commitid     git log -3   2. 重置本地版本库到指定commitid, 注意:本地改动将丢失     ...

  4. SQL Server取datetime的日期部分

    在c#中有个Date属性用于返回日期,其实就是当天0点. DateTime dtNow = DateTime.Now; DateTime dtNow2 = dtNow.Date; Console.Wr ...

  5. qt qml ajax 获取 json 天气数据示例

    依赖ajax.js类库,以下代码很简单的实现了获取天气json数据并展示的任务 [TestAjax.qml] import QtQuick 2.0 import "ajax.js" ...

  6. CentOS 7 配置静态 ip

    1. 需求场景: 在 CentOS7 上部署了一个 svn ,由于centOS7 默认是 dhcp 的,所以每过一段时间 ip 就会有变化,而 svn 要求 ip 是不能变的,不然没法同步. 网上找了 ...

  7. POJ 1459:Power Network(最大流)

    http://poj.org/problem?id=1459 题意:有np个发电站,nc个消费者,m条边,边有容量限制,发电站有产能上限,消费者有需求上限问最大流量. 思路:S和发电站相连,边权是产能 ...

  8. postman插件安装教程

    第一步: 第二步: 第三步: 这样就可以了. 插件下载链接: http://pan.baidu.com/s/1eRVLMpk 密码: 49vb

  9. cookie 的创建 得到 删除

    //设置cookie function setCookie(attr,value,time){ if(time){ var newtime=new Date(); newtime.setTime(ne ...

  10. Discuz的安装 (原创帖,转载请注明出处)

    ========================写在前面的话========================= 1.LAMP环境搭建请查看这篇日志:http://www.cnblogs.com/yic ...